Skip to content

fix(maas): reject compute+network roles without split roles - #1075

Open
rkosegi wants to merge 1 commit into
canonical:stable/2024.1from
rkosegi:bug/2140652-2024.1
Open

rkosegi wants to merge 1 commit into
canonical:stable/2024.1from
rkosegi:bug/2140652-2024.1

Conversation

@rkosegi

@rkosegi rkosegi commented Dec 3, 2026

Copy link
Copy Markdown

On 2024.1/2025.1 the compute and network roles are mutually exclusive
unless feature.split-roles is enabled. The local provider enforces this
at bootstrap/join, but the MAAS provider did not: a machine tagged with
both roles passed sunbeam deployment validate and the deployment only
failed much later, while reapplying the openstack-hypervisor plan.

  • Add MachineRoleCombinationCheck, a per-machine check run by
    sunbeam deployment validate (via DeploymentMachinesCheck) and
    sunbeam deployment machine validate, so the problem is reported
    before bootstrap.
  • MaasAddMachinesToClusterdStep fails early as a backstop, so
    sunbeam cluster bootstrap / deploy stop before any machine is
    deployed if validation was skipped.

Both checks are skipped when feature.split-roles is enabled. The error
tells the user to remove one of the tags, or to enable split roles
together with the gates it requires (feature.microovn-sdn); the
required gates are read from FEATURE_GATES rather than hard-coded.

Closes-Bug: https://bugs.launchpad.net/snap-openstack/+bug/2140652

Assisted-By: Claude Opus 5.5

Signed-off-by: Richard Kosegi richard.kosegi@dnation.cloud

Links

Jira card: OPEN-5029

On 2024.1/2025.1 the compute and network roles are mutually exclusive
unless feature.split-roles is enabled. The local provider enforces this
at bootstrap/join, but the MAAS provider did not: a machine tagged with
both roles passed `sunbeam deployment validate` and the deployment only
failed much later, while reapplying the openstack-hypervisor plan.

- Add MachineRoleCombinationCheck, a per-machine check run by
  `sunbeam deployment validate` (via DeploymentMachinesCheck) and
  `sunbeam deployment machine validate`, so the problem is reported
  before bootstrap.
- MaasAddMachinesToClusterdStep fails early as a backstop, so
  `sunbeam cluster bootstrap` / `deploy` stop before any machine is
  deployed if validation was skipped.

Both checks are skipped when feature.split-roles is enabled. The error
tells the user to remove one of the tags, or to enable split roles
together with the gates it requires (feature.microovn-sdn); the
required gates are read from FEATURE_GATES rather than hard-coded.

Closes-Bug: https://bugs.launchpad.net/snap-openstack/+bug/2140652

Assisted-By: Claude Opus 5.5

Signed-off-by: Richard Kosegi <richard.kosegi@dnation.cloud>
(cherry picked from commit 30c430b)
@rkosegi

rkosegi commented Dec 3, 2026

Copy link
Copy Markdown
Author

this is cherry-pick of #1066 to stable/2024.1

@gboutry

gboutry commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Let's wait for 2025.1 to land before 2024.1

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