Skip to content

Conversation

stuartc-graphcore
Copy link

When rebuilding mon[0] we need to use a different bootstrap hosts, however many rules have mon[0] hard-coded

For case where mon[0] is being rebuilt we can't direct the bootstrap requests there.
For the case where we are rebuilding mon[0] we need to direct commands to another host
@stuartc-graphcore stuartc-graphcore requested a review from a team as a code owner July 3, 2023 14:22
when: cephadm_commands | length > 0

delegate_to: "{{ groups['mons'][0] }}"
delegate_to: "{{ cephadm_bootstrap_host }}"

Choose a reason for hiding this comment

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

Each of these roles will need a default for this variable.

I wonder how appropriate the name is, since these roles will execute after bootstrap is complete. How about cephadm_delegate_host?

@stuartc-graphcore
Copy link
Author

stuartc-graphcore commented Jul 4, 2023 via email

@jackhodgkiss
Copy link
Contributor

Some kayobe playbooks I have been working benefits from on PR such as this.

Something such as

delegate_to: "{{ lookup('vars', admin_oc_net_name ~ '_ips')[cephadm_delegate_host | default(groups['mons'][0], true)] }}"

Would allow for overriding the delegate host when needed and lookup resolves an issue whereby if --limit is used against a playbook the task doesn't secretly run on the limited host(s) instead of the chosen delegate.

@cityofships cityofships self-assigned this Aug 22, 2025
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