Cinder volume type creation race condition failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Medium
|
Chhavi Agarwal |
Bug Description
If you have multiple Ceph Cinder volume drivers on different HA proxied hosts pointing to the same ceph cluster the OSA deploy can fail due to a race condition when creating the volume types.
It fails like this:
TASK: [os_cinder | Add in cinder devices types]
failed: [sm14_cinder_
stderr: ERROR: Multiple volumetype matches found for 'ceph', use an ID to be more specific.
stdout: +------
| ID | Name | Description | Is_Public |
+------
| 2a2578d6-
+------
#######
openstack_
storage_hosts:
sm13:
ip: 172.29.236.13
container_vars:
cinder_
ceph:
rbd_pool: volumes
rbd_user: "{{ cinder_ceph_client }}"
sm14:
ip: 172.29.236.14
container_vars:
cinder_
ceph:
rbd_pool: volumes
rbd_user: "{{ cinder_ceph_client }}"
#######
What we see is that two volume_types with the name 'ceph' get created but neither of them have the volume_backend_name extra spec set:
root@sm14-
+------
| ID | Name | Description | Is_Public |
+------
| 2a2578d6-
| 9c89fb16-
+------
root@sm13-
+------
| Property | Value |
+------
| description | None |
| extra_specs | {} |
| id | 9c89fb16-
| is_public | True |
| name | ceph |
| os-volume-
| qos_specs_id | None |
+------
root@sm13-
+------
| Property | Value |
+------
| description | None |
| extra_specs | {} |
| id | 2a2578d6-
| is_public | True |
| name | ceph |
| os-volume-
| qos_specs_id | None |
+------
This is in line with the task code:
- name: Add in cinder devices types
shell: |
. {{ ansible_env.HOME }}/openrc
if ! {{ cinder_bin }}/cinder {{ keystone_
{{ cinder_bin }}/cinder {{ keystone_
{{ cinder_bin }}/cinder {{ keystone_
fi
What is likely happening is both hosts get into the "if it already exists, don't do it check", through the type-create and then they both fail when trying to the extra_spec key set due to two volume types having the same name and the set command would need the UUID to distinguish.
A fix for this would be to make this task run serialized.
Changed in openstack-ansible: | |
assignee: | nobody → Samuel Matzek (smatzek) |
Tasks can't be serialize with the 'serial' tag and you can only serialize at the at the playbook level. Looking for other options to fix it.