Commit 77c5ed6
[multiple] Add per-node BMH label for deterministic node assignment
When `preProvisioned: false`, the OSDPO's `OpenStackBaremetalSet`
assigns BareMetalHost CRs to NodeSet nodes non-deterministically
(OSPRH-10282). This causes hostname shuffling: a node provisioned
from BMH `compute-0` may receive the hostname of `compute-2`,
breaking services that depend on hostname correctness (e.g. Ceph
`orch apply` fails with "hostname does not match expected hostname").
Fix by establishing a 1-to-1 mapping between BMH CRs and NodeSet
nodes using per-node `bmhLabelSelector`:
- `deploy_bmh` template: add a `nodeName` label to every BMH CR,
set to the node's name (e.g. `nodeName: compute-0`).
- `ci_gen_kustomize_values` common edpm-nodeset-values template:
when `cifmw_edpm_deploy_pre_provisioned` is `false`, emit a
per-node `bmhLabelSelector: {nodeName: <instance>}` so each
NodeSet node selects its specific BMH by label.
Pre-provisioned deployments are unaffected (the `bmhLabelSelector`
is only emitted when `cifmw_edpm_deploy_pre_provisioned` is false,
which defaults to true).
Depends-On: #3884
Depends-On: openstack-k8s-operators/architecture#746
Related-to: ANVIL-108
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>1 parent fffa721 commit 77c5ed6
2 files changed
Lines changed: 5 additions & 0 deletions
File tree
- roles
- ci_gen_kustomize_values/templates/common/edpm-nodeset-values
- deploy_bmh/template
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments