Skip to content

Conversation

markgoddard
Copy link

Sometimes we see a bootstrap failure, where cephadm cannot read the previously generated SSH key. This seems to be because it generates the key on one host, then tries to bootstrap on another.

This can happen when running under Kayobe, and the ansible_host variable is not respected with delegate_to.

There is another issue, where the facts seen when using delegate_to are of the original host, but the task is executed on the delegate host. This results in cephadm bootstrap getting the wrong value for --mon-ip, and failing a port binding check.

This change reworks the cephadm role to avoid delegate_to, and instead uses include_tasks and a condition, to only include for a single bootstrap host.

Fixes: #62

Sometimes we see a bootstrap failure, where cephadm cannot read the
previously generated SSH key. This seems to be because it generates the
key on one host, then tries to bootstrap on another.

This can happen when running under Kayobe, and the ansible_host variable
is not respected with delegate_to.

There is another issue, where the facts seen when using delegate_to are
of the original host, but the task is executed on the delegate host.
This results in cephadm bootstrap getting the wrong value for --mon-ip,
and failing a port binding check.

This change reworks the cephadm role to avoid delegate_to, and instead
uses include_tasks and a condition, to only include for a single
bootstrap host.

Fixes: #62
@markgoddard markgoddard requested a review from a team as a code owner September 20, 2022 15:37
@markgoddard markgoddard self-assigned this Sep 20, 2022
Copy link
Member

@mnasiadka mnasiadka left a comment

Choose a reason for hiding this comment

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

LGTM

@markgoddard markgoddard merged commit c7312d3 into master Sep 20, 2022
@markgoddard markgoddard deleted the issues/62 branch September 20, 2022 16:04
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.

SSH key generation and bootstrap may happen on different hosts
2 participants