Commit 9913e47
authored
CA-403379: pre-flight cluster_host state before pool-ha-enable (#7130)
When the chosen HA cluster_stack is corosync (i.e. for a gfs2 heartbeat
SR) every pool host must have an enabled, joined cluster_host on the
matching cluster stack, and this host must currently be quorate. Without
this preflight, that failure surfaces much later inside
Xha_statefile.check_sr_can_host_statefile with the misleading SR_NO_PBDS
error from pool-ha-enable.
This change adds a per-host preflight in `Xapi_ha.enable` that reuses
the existing `NO_COMPATIBLE_CLUSTER_HOST`, `CLUSTERING_DISABLED` and
`CLUSTER_HOST_NOT_JOINED` errors so the caller can pinpoint exactly
which host is the problem.
The preflight runs BEFORE the cluster_stack persisted to the pool DB and
local db, matching the pattern of the existing host_offline check, so a
failed precondition does not leak ha_cluster_stack into the pool state.
The final assert_cluster_host_quorate call queries xapi-clusterd
diagnostics directly rather than reading the Cluster_host.live DB field,
which the corosync_notifyd watcher only updates asynchronously and which
is reset to false for all hosts on any transient quorum blip.3 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
366 | 412 | | |
367 | 413 | | |
368 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1908 | 1908 | | |
1909 | 1909 | | |
1910 | 1910 | | |
| 1911 | + | |
| 1912 | + | |
1911 | 1913 | | |
1912 | 1914 | | |
1913 | 1915 | | |
| |||
0 commit comments