Skip to content

Move duplicate os-morphing code to core#453

Merged
petrutlucian94 merged 6 commits into
cloudbase:masterfrom
petrutlucian94:move_common_osmorphing
Jun 10, 2026
Merged

Move duplicate os-morphing code to core#453
petrutlucian94 merged 6 commits into
cloudbase:masterfrom
petrutlucian94:move_common_osmorphing

Conversation

@petrutlucian94

@petrutlucian94 petrutlucian94 commented Jun 8, 2026

Copy link
Copy Markdown
Member

There's a significant amount of os-morphing code duplication among Coriolis providers.

This PR moves the following to Coriolis core:

  • Windows virtio installation
  • Wheezy backports on Debian 7
  • UEFI fallback bootloader for Debian
  • initramfs update helper for Ubuntu

@petrutlucian94 petrutlucian94 marked this pull request as draft June 8, 2026 11:06
@petrutlucian94 petrutlucian94 force-pushed the move_common_osmorphing branch from 05ace55 to ce717a1 Compare June 8, 2026 13:03
@petrutlucian94 petrutlucian94 marked this pull request as ready for review June 8, 2026 13:03
@petrutlucian94 petrutlucian94 force-pushed the move_common_osmorphing branch 2 times, most recently from 72f04e4 to 76c69ac Compare June 8, 2026 14:48
@petrutlucian94 petrutlucian94 changed the title Move virtio installation helper to coriolis core Move duplicate os-morphing code to core Jun 8, 2026
Comment thread coriolis/tests/osmorphing/test_debian.py
Comment thread coriolis/tests/osmorphing/test_ubuntu.py Outdated
Comment thread coriolis/tests/osmorphing/test_windows.py
The virtio installation helper is currently duplicated across all
the providers. We'll move it to Coriolis core instead.
The code that enables Debian 7 backports is duplicated across
Coriolis providers. So is the method that enables an UEFI
fallback bootloader.

We'll go ahead and move them to Coriolis core. However, the UEFI
fallback bootloader won't be enabled by default since providers
that preserve the firmware type shouldn't actually need it.
The helper that updates the initramfs on Ubuntu is duplicated by
multiple providers, we'll move it to Coriolis core.
@petrutlucian94 petrutlucian94 force-pushed the move_common_osmorphing branch from 76c69ac to a28e65f Compare June 10, 2026 08:20
Comment thread coriolis/osmorphing/debian.py
Comment thread coriolis/osmorphing/debian.py
Comment thread coriolis/osmorphing/ubuntu.py Outdated
Comment thread coriolis/osmorphing/windows.py
As per the PR feedback, we'll move "_run_update_initramfs" to
the Debian os-morphing tools and call it by default during
"post_packages_install".
A previous commit added the helper but expected the providers to
call it.

There's no reason why we can't do it as part of "post_packages_install"
by default.
Container images such as the ones used by the integration tests
do not include the "linux-version" binary. We'll catch this
and log a warning.
@petrutlucian94 petrutlucian94 force-pushed the move_common_osmorphing branch from aaa29d8 to fd1a0f7 Compare June 10, 2026 11:29
@petrutlucian94 petrutlucian94 merged commit b2aee24 into cloudbase:master Jun 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