Page MenuHomeFreeBSD

vmrun: add -x flag to disable reboot loop
Needs ReviewPublic

Authored by rgrimes on Aug 26 2018, 9:31 PM.
Tags
None
Referenced Files
F81627399: D16913.diff
Fri, Apr 19, 5:16 AM
Unknown Object (File)
Dec 20 2023, 3:10 AM
Unknown Object (File)
Nov 22 2023, 8:00 PM
Unknown Object (File)
Nov 22 2023, 7:55 PM
Unknown Object (File)
Nov 22 2023, 6:05 PM
Unknown Object (File)
Nov 22 2023, 6:04 PM
Unknown Object (File)
Nov 13 2023, 8:49 AM
Unknown Object (File)
Aug 14 2023, 8:01 AM
Subscribers

Details

Reviewers
allanjude
Group Reviewers
bhyve
Summary

This adds a -x flag to allow the reboot loop of bhyve(8) to be managed by an external process rather than internally by vmrun.sh

Submitted By: Paul Vixie

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19193
Build 18809: arc lint + arc unit

Event Timeline

I do not believe this is a desirable change, at least it does not do what it claims it does.

share/examples/bhyve/vmrun.sh
386

Man pages sayes this is reboot, not sure what the differences are yet. I believe it is actually reset, and you have to do the reboot externally by re running the bhyve(8) command.

389

There are now exit code of 4, "exited due to an error"

392

The only case that this new code would trigger on would be if the bhyve exit code is 0, and -x was specified. How does that add any exit information?

Furthermore that would break the reboot while [ 1 ] loop, is that what your trying to achive?

To add information, I have email from Paul Vixie and in fact he is wanting to break the reboot loop with -x so that it can be handled externally.

Personally I'm not a vmrun.sh user, but I have no objection related with this change and I don't see anything harmful.

This revision is now accepted and ready to land.Aug 27 2018, 6:20 AM

Allan, would you update the diff please

share/examples/bhyve/vmrun.sh
98

Per emails with Paul Vixie we have come up with this:

-x Exit reboot loop even if bhyve exits with reboot code

Allan, can you update the diff please

128

We should probably call this exit_rebootloop, passthrough has a great deal of other context in bhyve.

Hi @allanjude is there anything pending to move this patch forward?

I am back at home now, so I'll get this refreshed

This revision now requires review to proceed.Feb 22 2019, 1:23 AM

@allanjude I know your work load is huge as well, if you need me to push a new diff I can do that, but then you have to agree to commit it or I have to pester bde/phk for an approval.

share/examples/bhyve/vmrun.sh
128

please do make this exit_rebootloop, no doubts in my mind now as to what is going on here, and that this should not be called passthrough due to confusion factor.

386

Above statement is correct, we should probably fix up the man page to more clearly explain the exit code 0

392

Adding a note, to above, yes this is trying to break the reboot while [1] loop, ie you want to manage reboots in a loop outside bhyve(8).

rgrimes retitled this revision from vmrun: add -x flag to always exit when bhyve exists to vmrun: add -x flag to disable reboot loop.May 24 2019, 3:33 PM

@rgrimes If you want to commandeer this review and put an updated diff, that would be great.

Note: this was originally submitted by Paul Vixie, it is not my work.

I am happy to commit it, although you are now release from mentorship if you want to commit it yourself, although remember to credit 'Paul Vixie (original version)'

rgrimes edited the summary of this revision. (Show Details)
rgrimes edited reviewers, added: allanjude; removed: rgrimes.

I'm going through my list of reviews and noticed this one. Does it need more work, or can it be committed?

jhb added inline comments.
share/examples/bhyve/vmrun.sh
98

How about just "disable auto-reboot"

389

4 already falls into the "all other" comment

392

And, since the script uses 'exit $bhyve_exit' it does pass through a different exit value to the caller when -x is used (the caller would never see 0 otherwise).