Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

cgwalters
Copy link
Member

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 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.

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.
@cgwalters cgwalters force-pushed the deployment-sanity-check branch from a3f177a to 3c7c2e2 Compare July 26, 2017 18:01
@cgwalters
Copy link
Member Author

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"))
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ⬇️

@jlebon
Copy link
Member

jlebon commented Jul 27, 2017

@rh-atomic-bot r+ 6a9afe7

@rh-atomic-bot
Copy link

⌛ Testing commit 6a9afe7 with merge 34b5a00...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 34b5a00 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants