Upgrade fails when having cinder_qos_specs defined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
High
|
Jesse Pretorius |
Bug Description
If you run the os-cinder-install playbook and have specified cinder_qos_specs the playbook will fail if the qos already exist in the system.
The error occurs here:
https:/
Here it does a: `{{ cinder_bin }}/cinder qos-list | grep -x {{ item.name }}`
grep definition:
`-x, --line-regexp force PATTERN to match only whole lines`
The output from cinder qos-list will be something like:
```+---
| ID | Name | Consumer | specs |
+------
| 1a12340d-
+------
item.name in the task will match the qos.name defined in this case:`my-qos-name`.
Since the "grep -x" matches the entire line it won't get any “hit”, which will make ansible try and create the qos again and that results in a failure on duplicate name.
If we do a `grep -w {{item_name}}` instead it will do a word match, which will work in this specific case.
Or, since we already know the name of the qos, we could just as well just do a cinder `qos-show <name>`, register that and base further execution based on if it exists or not.
Changed in openstack-ansible: | |
status: | Confirmed → Fix Released |
Related patch: https:/ /review. openstack. org/#/c/ 561218/