-
Notifications
You must be signed in to change notification settings - Fork 198
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
daemon: Add a sanitycheck(/bin/true) before we deploy a tree #892
Conversation
This is a followup to coreos#888 but more comprehensive; in the layering case, the sanitycheck runs after all the `%posttrans` scripts, so we'll get a consistent error message for the `rm -rf /` test. We also do the sanitycheck for the "pure ostree" case, as well as cases where we didn't actually layer packages (including `ex override remove` as well as simply regenerating an initrd). There's obviously a lot more we could do in a sanitycheck; as I say in the comment it's tempting to consider trying to boot systemd (in a fully volatile config), but for now let's do this. In the end of course the admin has rollback too.
a3f177a
to
3c7c2e2
Compare
Rebased 🏄♂️ |
* and might save someone in the future. The RPMOSTREE_SKIP_SANITYCHECK | ||
* environment variable is just used by test-basic.sh currently. | ||
*/ | ||
if (!self->final_revision && !getenv ("RPMOSTREE_SKIP_SANITYCHECK")) |
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.
Shouldn't we put the getenv
check in rpmostree_deployment_sanitycheck()
itself?
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.
Done ⬇️
☀️ Test successful - status-atomicjenkins |
This is a followup to #888
but more comprehensive; in the layering case, the sanitycheck runs
after all the
%posttrans
scripts, so we'll get a consistent error messagefor the
rm -rf /
test.We also do the sanitycheck for the "pure ostree" case, as well as cases
where we didn't actually layer packages (including
ex override remove
aswell as simply regenerating an initrd).
There's obviously a lot more we could do in a sanitycheck; as I say in the
comment it's tempting to consider trying to boot systemd (in a fully volatile
config), but for now let's do this. In the end of course the admin has rollback
too.