-
Notifications
You must be signed in to change notification settings - Fork 582
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
overlord/fdestate/fdestate.go: fix path to data mount point on hybrid #14734
base: fde-manager-features
Are you sure you want to change the base?
overlord/fdestate/fdestate.go: fix path to data mount point on hybrid #14734
Conversation
That should make |
19c0055
to
6f19bb3
Compare
6f19bb3
to
39ad1ff
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fde-manager-features #14734 +/- ##
=======================================================
Coverage ? 78.83%
=======================================================
Files ? 1093
Lines ? 147838
Branches ? 0
=======================================================
Hits ? 116549
Misses ? 24013
Partials ? 7276
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Can you update the PR description?
@@ -218,7 +219,12 @@ func initializeState(st *state.State) error { | |||
|
|||
// FIXME mount points will be different in recovery or factory-reset modes | |||
// either inspect degraded.json, or use boot.HostUbuntuDataForMode() | |||
dataUUID, dataErr := disksDMCryptUUIDFromMountPoint(dirs.SnapdStateDir(dirs.GlobalRootDir)) | |||
dataDir := dirs.GlobalRootDir |
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.
isn't this true on hybrid as well? Unless, I'm misunderstanding what the problem is and which path exists in which scenario.
dataDir := dirs.GlobalRootDir | |
dataDir := dirs.SnapdStateDir(dirs.GlobalRootDir) |
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.
I do not think it is a mount point on hybrid. On core it is a bind mount.
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.
Also tests/nested/manual/muinstaller-real
fails with this.
overlord/fdestate/fdestate.go
Outdated
if osutil.FileExists(writable) { | ||
dataDir = writable | ||
} |
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.
if osutil.FileExists(writable) { | |
dataDir = writable | |
} | |
if osutil.FileExists(writable) { | |
// appears be an Ubuntu Core device, where /writable exists | |
dataDir = writable | |
} |
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 of it, I will test it is a mount point. Because someone could create /writable
and easily break it.
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.
could we check whether release
indicates we are on Core and so choose the right path?
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.
Sure. That might be just simpler.
… hybrid overlord/fdestate/fdestate.go: fix path to data mount point on hybrid We used a path that is not a mount point on hybrid to discover the data disk. Insted we now use / for hybrid, and /writable on core.
… hybrid overlord/fdestate/fdestate.go: fix path to data mount point on hybrid We used a path that is not a mount point on hybrid to discover the data disk. Instead we now use / for hybrid, and /writable on core.
We used a path that is not a mount point on hybrid to discover the data disk. Instead we now use / for hybrid, and /writable on core.