-
Notifications
You must be signed in to change notification settings - Fork 331
staged-deploy: Verify we didn't fail to unmount /sysroot or /etc #3520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a test case to verify that unmounting /sysroot
and /etc
does not fail during a staged deployment. My review found a critical bug in the implementation due to a filename typo, which would cause the test to fail for the wrong reason. I've also provided a suggestion to improve the script's readability and robustness by combining two commands into one.
7c895a5
to
f4b08be
Compare
assert_streq "$syncfs" 2 | ||
|
||
# And verify there were no failures to unmount /etc or /sysroot | ||
journalctl -b -1 -u sysroot.mount -u etc.mount >previous-journal.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: looks like it accepts globs, so -u '*.mount'
also works and catches more.
syncfs=$(journalctl -b -1 -u ostree-finalize-staged --grep='Completed syncfs.*for system repo' | wc -l) | ||
assert_streq "$syncfs" 2 | ||
|
||
# And verify there were no failures to unmount /etc or /sysroot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When doing soft-reboot I think we keep the full journal, but on normal reboot this would only catch failures before /var umount.
I think we want to duplicate this test for the soft-reboot case.
Best would be to have the VM serial output, but I don't know what kola can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you're right, moved to soft reboot.
Best would be to have the VM serial output, but I don't know what kola can do.
We do gather it, but it's currently outside what external tests can gate on with coreos-assembler. I'm working in the background on some things like bootc-dev/podman-bootc#99 which can help form the core of a more powerful container-native testing framework.
Followup to ostreedev#3513 Signed-off-by: Colin Walters <[email protected]>
f4b08be
to
c0dfd44
Compare
test '!' -f /run/ostree/nextroot-booted | ||
|
||
# And verify there were no failures to unmount /etc or /sysroot | ||
journalctl -b -1 -u sysroot.mount -u etc.mount >previous-journal.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you do a soft reboot, for the journal it's still the same boot, ie you must use -b0
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it more, the journal is pretty small, we can just remove the -b
Followup to #3513