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

devicestate: add reading of modeenv to uc20 firstboot code #7810

Merged
merged 6 commits into from Nov 28, 2019

Conversation

@mvo5
Copy link
Collaborator

mvo5 commented Nov 27, 2019

The firstboot code in UC20 needs to know what recovery system
it needs to pick for the firstboot and what mode it is in. This
is communicated from the earlier boot parts via the
/var/lib/snapd/modeenv file.

This commit implements support to read/use this file.

The firstboot code in UC20 needs to know what recovery system
it needs to pick for the firstboot and what mode it is in. This
is communicated from the earlier boot parts via the
/var/lib/snapd/modeenv file.

This commit implements support to read/use this file.
@mvo5 mvo5 added the UC20 label Nov 27, 2019
Copy link
Contributor

cmatsuoka left a comment

Thanks. I had a déjà vu feeling looking at this PR like it was already merged before. Anyway, it looks good to me.

…install-set-runmode
@mvo5 mvo5 requested a review from pedronis Nov 28, 2019
Copy link
Contributor

pedronis left a comment

I don't think re-reading and cross checking makes a lot of sense

overlord/devicestate/devicemgr.go Outdated Show resolved Hide resolved
@pedronis

This comment has been minimized.

Copy link
Contributor

pedronis commented Nov 28, 2019

For clarity, I think when it gets to update the modeenv there should be probably exactly one clear path going DeviceManager -> boot code to do that

@pedronis

This comment has been minimized.

Copy link
Contributor

pedronis commented Nov 28, 2019

For clarity, I think when it gets to update the modeenv there should be probably exactly one clear path going DeviceManager -> boot code to do that

Actually things are somewhat simpler:

  • ephemeral modes will receive their modeenv and not change it, they might though write the run system one
  • the run system one will always have mode = run and change base only
Copy link
Contributor

pedronis left a comment

thanks, one comment

overlord/devicestate/devicemgr.go Outdated Show resolved Hide resolved
@mvo5 mvo5 merged commit 4721082 into snapcore:master Nov 28, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.