-
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
cmd/snap-bootstrap: mount base directly on /sysroot #14537
base: master
Are you sure you want to change the base?
cmd/snap-bootstrap: mount base directly on /sysroot #14537
Conversation
Mount the base directly on /sysroot in UC's run mode, while for hybrid we mount /run/mnt/data instead of the /run/mnt/sysroot symlink that was pointing to the former.
Opening as draft as we will need canonical/core-initrd#265 landed first. As a side note, we should discuss how to handle this initramfs/snap-bootstrap interlocks in an easier way. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14537 +/- ##
========================================
Coverage 78.85% 78.86%
========================================
Files 1079 1080 +1
Lines 145615 145813 +198
========================================
+ Hits 114828 114997 +169
- Misses 23601 23619 +18
- Partials 7186 7197 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
} | ||
} | ||
|
||
// Do a daemon reload so systemd knows about the new mount units |
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.
will it also perform the mount then?
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.
Not really, as the new mount unit has an After=snap-initramfs-mounts.service
dependency
} | ||
} | ||
|
||
// Do a daemon reload so systemd knows about the new mount units | ||
sysd := systemd.New(systemd.SystemMode, nil) | ||
if err := sysd.DaemonReload(); err != nil { |
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.
Will will always have units that need loading? daemon-reload is costly. If we could try to not do it if we did not call writeSysrootMountUnit, then it would be very good.
Mount the base directly on /sysroot in all UC modes, while for hybrid
we mount /run/mnt/data instead of the /run/mnt/sysroot symlink that
was pointing to the former. With this change we do not need to have
the /run/mnt/base mount anymore.