Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override bootstrap host assuming mon[0] is available #109

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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
@@ -8,5 +8,5 @@
changed_when: true
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.

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