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

🐛 Setup / as shared mount on alpine #445

Merged
merged 2 commits into from
Nov 25, 2022
Merged

🐛 Setup / as shared mount on alpine #445

merged 2 commits into from
Nov 25, 2022

Conversation

mudler
Copy link
Member

@mudler mudler commented Nov 17, 2022

Since this is not handled in the boot process, we do this in our devoted file to setup the rootfs configuration. It also adds an e2e test to verify that the mounts are correctly set

Signed-off-by: Ettore Di Giacinto mudler@kairos.io

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #440

Thanks @christianprim for the finding!

@netlify
Copy link

netlify bot commented Nov 17, 2022

Deploy Preview for kairos-io canceled.

Name Link
🔨 Latest commit 5177289
🔍 Latest deploy log https://app.netlify.com/sites/kairos-io/deploys/6380f7300d13ba000915b029

@mudler mudler requested a review from a team November 17, 2022 16:10
jimmykarily
jimmykarily previously approved these changes Nov 18, 2022
jimmykarily
jimmykarily previously approved these changes Nov 18, 2022
@christianprim
Copy link
Contributor

Considering the output of "qemu-acceptance-tests (alpine) ", the command "mount --make-rshared /sysroot" failed in the fs stage. I wonder why not use "mount --make-rshared /" when root-partition is under /. Since the command recursively changes the type of all mounts, this should do the trick. Could be the last command before starting k3s...

@mudler
Copy link
Member Author

mudler commented Nov 18, 2022

Considering the output of "qemu-acceptance-tests (alpine) ", the command "mount --make-rshared /sysroot" failed in the fs stage. I wonder why not use "mount --make-rshared /" when root-partition is under /. Since the command recursively changes the type of all mounts, this should do the trick. Could be the last command before starting k3s...

right, what I'm trying to be careful here is to not break user-contract, and allow to have that set as soon as possible to avoid any possible race - and user assumption when it can be expected those to be effectively ready in the system. I'd prefer to have those as early as possible (as soon as a fs is set up) but that seems to be tricky. I'll first try to get a baseline and we can revisit this later on.

@mudler mudler force-pushed the shared_path branch 3 times, most recently from 44bf26a to 94c91f9 Compare November 18, 2022 21:49
@christianprim
Copy link
Contributor

right, what I'm trying to be careful here is to not break user-contract, and allow to have that set as soon as possible to avoid any possible race - and user assumption when it can be expected those to be effectively ready in the system. I'd prefer to have those as early as possible (as soon as a fs is set up) but that seems to be tricky. I'll first try to get a baseline and we can revisit this later on.

Good point!

@christianprim
Copy link
Contributor

Just for your information: mounts are shared when the command is executed in the network stage (did this for testing purposes in /oem/90_custom.yaml). But this may be very late in the boot process... [partition 2, 4 and 5 are remounted rather late in the boot-process, especially partition 4]

@mudler mudler self-assigned this Nov 25, 2022
@mudler mudler force-pushed the shared_path branch 5 times, most recently from 1d7f1f6 to e3e5385 Compare November 25, 2022 15:05
Since this is not handled in the boot process, we do this in our devoted file to setup the rootfs configuration

Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
@mudler mudler force-pushed the shared_path branch 2 times, most recently from 8d51f3c to 5177289 Compare November 25, 2022 17:11
@mudler mudler merged commit 2f61a90 into master Nov 25, 2022
@mudler mudler deleted the shared_path branch November 25, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

/var/lib/longhorn is not shared mounted
3 participants