In a multiple backend environment, a volume can be created
on a different backend from a group, add volume to group
will fail in this case. The 'host' field of a volume or a
group is an internal field that cannot be retrieved by
using Cinder volume APIs. The only way to make sure a volume
is created on the same backend as the host is to create the
volume with the group_id parameter. After that remove the
volume from the group, and then add the volume back to the
group. This way the volume to be added to the group will be
on the same backend as the group.
This will make the test longer than desired, but it is
the only way to make sure the added volume is on the same
backend as the group.
Reviewed: https:/ /review. openstack. org/492969 /git.openstack. org/cgit/ openstack/ tempest/ commit/ ?id=5805d32137d 6b930244b06a7f8 373c167c35cb26
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5805d32137d6b93 0244b06a7f8373c 167c35cb26
Author: xing-yang <email address hidden>
Date: Fri Aug 11 04:31:27 2017 -0700
Volume and group on same backend in update_group
In a multiple backend environment, a volume can be created
on a different backend from a group, add volume to group
will fail in this case. The 'host' field of a volume or a
group is an internal field that cannot be retrieved by
using Cinder volume APIs. The only way to make sure a volume
is created on the same backend as the host is to create the
volume with the group_id parameter. After that remove the
volume from the group, and then add the volume back to the
group. This way the volume to be added to the group will be
on the same backend as the group.
This will make the test longer than desired, but it is
the only way to make sure the added volume is on the same
backend as the group.
Change-Id: I376f0188984d70 6e83740f67bd6f3 01f680914f8
Closes-Bug: #1709739