Tasks handling nova-status upgrade check are too restrictive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
Medium
|
Mariusz Karpiarz | ||
Stein |
Fix Released
|
Medium
|
Unassigned | ||
Train |
Fix Released
|
Medium
|
Mariusz Karpiarz |
Bug Description
When upgrading from Rocky to Stein with active Ironic nodes, `nova-status upgrade check` fails with this warning:
```
+------
| Check: Resource Providers |
| Result: Warning |
| Details: There are 1 compute resource providers and 4 compute nodes |
| in the deployment. Ideally the number of compute resource |
| providers should equal the number of enabled compute nodes |
| otherwise the cloud may be underutilized. See |
| https:/
| for more details. |
+------
```
This command returns code 1, which causes the "Check nova upgrade status" task in `ansible/
Here is the relevant part of this file:
```
- name: Check nova upgrade status
become: true
command: docker exec -t nova_api nova-status upgrade check
register: nova_upgrade_
when: inventory_hostname == groups[
- name: Upgrade status check result
fail:
msg:
- "There was an upgrade status check warning or failure!"
- "See the detail at https:/
vars:
first_
when: hostvars[
```
Now, there are two problems here. Firstly, on https:/
My opinion is we should tell Ansible to ignore errors from the first task and then add more conditions to handle the returned code. It may also be worth adding a parameter controlling how strict the check should be, so if this parameter is set to true, only code 0 is allowed, otherwise both code 0 and 1 are acceptable.
Changed in kolla-ansible: | |
assignee: | nobody → Mariusz Karpiarz (mkarpiarz) |
status: | New → In Progress |
Changed in kolla-ansible: | |
importance: | Undecided → Medium |
Reviewed: https:/ /review. opendev. org/668177 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=c68ed4dd516 e37844a3eb9cdd2 089c985173571d
Committed: https:/
Submitter: Zuul
Branch: master
commit c68ed4dd516e378 44a3eb9cdd2089c 985173571d
Author: Mariusz <email address hidden>
Date: Fri Jun 28 13:33:39 2019 +0000
Handle more return codes from nova-status upgrade check
In a single controller scenario, the "Upgrade status check result" upgrade_ check_stdout` can then be analysed.
does nothing because the previous task can only succeed when
`nova-status upgrade check` returns code 0. This change allows this
command to fail, so that the value of returned code stored in
`nova_
This change also allows for warnings (rc 1) to pass.
Closes-Bug: 1834647
Change-Id: I6f5e37832f43f2 3604920b9d890cc 505ca924ff9