From f77540b440d3e5224eb1648339dc8c945f29bbe2 Mon Sep 17 00:00:00 2001 From: spisarski Date: Wed, 7 Mar 2018 13:01:37 -0700 Subject: Ensure the project for volumes are handled properly. Although this patch has added the project_name member to VolumeConfig, it does not work properly due to a cinder bug https://bugs.launchpad.net/cinder/+bug/1641982. However, the code will now allow for volumes with the same name to be created on the same pod just as long as they do not exist within the same project/tenant. JIRA: SNAPS-270 Change-Id: Ia6f98e9b66793a69c0205d2d8e38bb3d03f3333e Signed-off-by: spisarski --- snaps/openstack/create_instance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'snaps/openstack/create_instance.py') diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py index eb4ade3..f897434 100644 --- a/snaps/openstack/create_instance.py +++ b/snaps/openstack/create_instance.py @@ -164,7 +164,8 @@ class OpenStackVmInstance(OpenStackComputeObject): for volume_name in self.instance_settings.volume_names: cinder = cinder_utils.cinder_client(self._os_creds) volume = cinder_utils.get_volume( - cinder, volume_name=volume_name) + cinder, self.__keystone, volume_name=volume_name, + project_name=self._os_creds.project_name) if volume and self.vm_active(block=True): vm = nova_utils.attach_volume( -- cgit 1.2.3-korg