Skip to content

Add Ubuntu 26.04 support for OSMorphing minions - #486

Merged
Dany9966 merged 7 commits into
cloudbase:masterfrom
mihaelabalutoiu:add-ubuntu26-minion-support
Aug 10, 2026
Merged

Add Ubuntu 26.04 support for OSMorphing minions#486
Dany9966 merged 7 commits into
cloudbase:masterfrom
mihaelabalutoiu:add-ubuntu26-minion-support

Conversation

@mihaelabalutoiu

@mihaelabalutoiu mihaelabalutoiu commented Aug 6, 2026

Copy link
Copy Markdown
Member

This PR implements the following changes:

  • Remove the nested shell wrapper from the apt-get command;
  • Improve shell quoting for GRUB configuration commands:
    • set_grub_value placed quotes by hand when building its sed scripts, so values containing spaces or quotes could be split into separate options instead of reaching sed as a single argument.
  • Improve environment variable handling in OSMount tools:
    • the OSMount setup commands relied on sudo -E to forward the proxy configuration to the package managers, which does not work on sudo implementations that do not support the flag.
  • Improve environment variable handling for chroot commands:
    • sudo-rs, the default sudo on Ubuntu 26.04, does not implement the -E flag, so proxy variables no longer reached commands run inside the chroot. They are now passed through env(1), which chroot(1) preserves.
  • Add env command availability check on OSMorphing hosts;
  • Disable pty allocation for SSH commands
  • Sever mount propagation on OSMorphing chroot binds:
    • Systemd uses shared mount propagation, allowing mounts created under /proc, /sys, /dev or /run on the minion to propagate into the OSMorphing chroot.
    • On Ubuntu 26.04 this can leave systemd credential mounts under /run busy and cause the final umount -R to fail with target is busy.

@mihaelabalutoiu
mihaelabalutoiu force-pushed the add-ubuntu26-minion-support branch from cb68090 to f755f6e Compare August 6, 2026 07:53
Comment thread coriolis/osmorphing/osmount/base.py Outdated
Comment thread coriolis/osmorphing/osmount/base.py Outdated
Comment thread coriolis/utils.py
Comment thread coriolis/utils.py
@mihaelabalutoiu
mihaelabalutoiu force-pushed the add-ubuntu26-minion-support branch 2 times, most recently from 1614db9 to 57d1313 Compare August 6, 2026 14:46
@mihaelabalutoiu
mihaelabalutoiu marked this pull request as ready for review August 6, 2026 15:26
Comment thread coriolis/utils.py Outdated
@mihaelabalutoiu
mihaelabalutoiu force-pushed the add-ubuntu26-minion-support branch 2 times, most recently from 6d678e8 to 717c2b3 Compare August 7, 2026 14:35
Comment thread coriolis/osmorphing/debian.py Outdated
'-o Dpkg::Options::=\'--force-confdef\'"' % (
'-o Dpkg::Options::=--force-confdef' % (
" ".join(package_names)))
self._environment['DEBIAN_FRONTEND'] = 'noninteractive'

@petrutlucian94 petrutlucian94 Aug 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

osmount tools set the DEBIAN_FRONTEND env variable as part of the setup call. The osmorphing tools do not have a setup method but I think we can move it to the __init__ method.

Image

uninstall_packages needs it as well and it's cleaner to set this as part of the constructor as opposed to install_packages / uninstall_packages. Modifying the shared _environment field as a side effect here isn't a clean approach.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Gotcha, I updated the code, moved it to the constructor, so it covers uninstall_packages too and the side effect is gone from install_packages. Please take a look now, thank you!

@mihaelabalutoiu
mihaelabalutoiu force-pushed the add-ubuntu26-minion-support branch from 717c2b3 to d5ca2ac Compare August 10, 2026 10:21
Comment thread coriolis/tests/osmorphing/test_base.py Outdated
`sudo-rs`, which is the default sudo on `Ubuntu 26.04`, does not implement
the `-E` flag, so proxy variables no longer reached commands run inside
the chroot.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
The OSMount setup commands relied on `sudo -E` to forward the proxy
configuration to the package managers, which does not work on sudo
implementations that do not support the flag.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
`set_grub_value` placed quotes by hand when building its sed scripts, so
values containing spaces or quotes could be split into separate options
instead of reaching sed as a single argument.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Env variables are passed to privileged and chrooted commands
through `env(1)`, so a missing `env(1)` would surface as an unrelated
failure partway through OSMorphing.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
The pty was needed for older minion images, but is no longer required,
so set `get_pty` to `False` on all SSH commands.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Systemd uses shared mount propagation, allowing mounts created under
`/proc`, `/sys`, `/dev` or `/run` on the minion to propagate into the
OSMorphing chroot.

On `Ubuntu 26.04` this can leave systemd credential mounts under
`/run` busy and cause the final `umount -R` to fail with `target is busy`.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
@mihaelabalutoiu
mihaelabalutoiu force-pushed the add-ubuntu26-minion-support branch from d5ca2ac to b562652 Compare August 10, 2026 12:41
@Dany9966
Dany9966 merged commit 8b720b4 into cloudbase:master Aug 10, 2026
5 checks passed
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