staged-deploy: Verify we didn't fail to unmount /sysroot or /etc#3520
staged-deploy: Verify we didn't fail to unmount /sysroot or /etc#3520cgwalters wants to merge 1 commit intoostreedev:mainfrom
Conversation
There was a problem hiding this comment.
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.
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.
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.
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 <walters@verbum.org>
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.
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.
Thinking about it more, the journal is pretty small, we can just remove the -b
Followup to #3513