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

Retry mechanism for discover hosts #2501

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions playbooks/06-deploy-architecture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@
-n openstack
nova-cell0-conductor-0
nova-manage cell_v2 discover_hosts --verbose
--strict
Copy link
Contributor

Choose a reason for hiding this comment

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

From the doc:

If --strict is specified, the command will only return 0 if an unmapped host was discovered and mapped successfully.

So this change means that the discover_hosts will be called until at least 1 host is discovered. This could help a bit with the race condition between starting the nova-compute service by the DataPlaneDeployment, letting the nova-compute start up and report the first status to the DB, and between the ci_framework running the discover_hosts command to discover those computes.

However it will not be the final solution due to the following. If there are more than one compute in the deployment then discovering one of them is enough for this change to move forward. Which means maybe not all the compute will be discovered.

The final solution requires either of the two directions:

  • a) do not let the DataPlaneDeployment finish until the nova-compute not just started but also successfully reported its first status to the DB.
  • b) retry discover_hosts until not just one but all the deployed compute nodes are discovered.

register: discover_result
until: discover_result.rc == 0
retries: 3
delay: 30

- name: Run post_deploy hooks
when:
Expand Down
5 changes: 5 additions & 0 deletions roles/edpm_deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@
oc rsh
--namespace={{ cifmw_install_yamls_defaults['NAMESPACE'] }}
nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verbose
--strict
register: discover_result
until: discover_result.rc == 0
retries: 3
delay: 30

- name: Validate EDPM
when: cifmw_edpm_deploy_run_validation | bool
Expand Down
5 changes: 5 additions & 0 deletions roles/edpm_deploy_baremetal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,8 @@
oc rsh
-n {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verbose
--strict
register: discover_result
until: discover_result.rc == 0
retries: 3
delay: 30