Skip to content

chore: update outdated help flag output - #894

Open
livnxin wants to merge 1 commit into
canonical:mainfrom
livnxin:cli-help-fix
Open

livnxin wants to merge 1 commit into
canonical:mainfrom
livnxin:cli-help-fix

Conversation

@livnxin

@livnxin livnxin commented Aug 4, 2026

Copy link
Copy Markdown

I updated the output of the help flag to ensure that it is up to date with current sunbeam since to my knowledge, region-controller is not a valid value if its not yet enabled by feature gates

QA steps

run

sunbeam cluster bootstrap --help

Links

callback=validate_roles,
help="Specify additional roles for the bootstrap node. "
"Possible values: compute, storage, network, region_controller. "
"Possible values: compute, storage, network, control. "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

region_controller is used for multi region deployments. [1]

control is not mentioned here because the bootstrap node implicitly always considered as control role when region_controller is not added.

[1] https://canonical.com/openstack/docs/2024.1/how-to/misc/multiregion-deployments/#region-controllers

@hmlanigan
hmlanigan self-requested a review November 4, 2026 18:19
@hmlanigan

Copy link
Copy Markdown

@livnxin Thank you for your first PR. Apologies for not reviewing in a timely manner. There is one item to fix, and please rebase to fix the functional test failure.

callback=validate_roles,
help="Specify additional roles for the bootstrap node. "
"Possible values: compute, storage, network, region_controller. "
"Possible values: compute, storage, network, control. "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium: The help text hard-codes the role list instead of using the dynamic Role.enabled_values() pattern already used in this same file for the other --role option (line 1372). If an operator enables feature.multi-region (ROLE_GATES in sunbeam/core/common.py:148-151), region_controller becomes an accepted value for this option (accepted by validate_roles, common.py:388-413), but the help will again be outdated because it now omits it — reintroducing the exact staleness this PR fixes. Suggested fix: build the list dynamically, e.g. f"Possible values: {', '.join(Role.enabled_values())}. " (Role is already imported in this module).

help="Specify additional roles for the bootstrap node. "
"Possible values: compute, storage, network, region_controller. "
"Possible values: compute, storage, network, control. "
"Defaults to the compute role. Can be repeated and comma separated.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Low: This same help string still claims "Defaults to the compute role.", but the option's default is default=["control", "compute", "network"] (line 609, changed in commit 76e221f to include control and network). Since this PR's purpose is to update outdated help output, leaving this adjacent stale claim makes the help only partially corrected. Suggested fix: reword to "Defaults to control, compute and network roles."

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.

4 participants