RE: HPE 3PAR Cinder driver-Multiattach: Fails to detach second instance from volume
Hi All, Is there a way to find in cinder how many instances are attached to a volume? Thanks & Regards, Sneha Rai From: RAI, SNEHA Sent: Monday, July 1, 2019 5:26 PM To: openstack-dev@lists.openstack.org Subject: HPE 3PAR Cinder driver-Multiattach: Fails to detach second instance from volume Hi Team, There is a bug on 3PAR Cinder driver https://bugs.launchpad.net/cinder/+bug/1834660. I am able to attach multiple instances to 3PAR volume but only the first instance gets detached successfully. For the second instance, volume goes into detaching status due to "Host does not exist" error. What is happening here is, the first detach call invokes _delete_3par_host() which removes the compute host entry from 3PAR which ideally should be done only when the last instance is to be detached. It would be great if someone could help me understand if this needs to be handled in driver code or nova would internally take care of it. Code changes done to support multiattach-https://review.opendev.org/#/c/659443 Thanks & Regards, Sneha Rai
On 7/1/2019 11:14 PM, RAI, SNEHA wrote:
Is there a way to find in cinder how many instances are attached to a volume?
Yes, the response to GET /v3/{project_id}/volumes/{volume_id} has an "attachments" parameter which is a list of dicts of information about the servers that are attached to the volume. Note that a single server can have multiple attachments to the volume while the server is being migrated across compute hosts, so to determine unique server attachments you'd have to distinguish by server ID in the attachments list. -- Thanks, Matt
Yes, by determining the size of the attachments list. CLI: /openstack volume show /displays attachment details. API: The response for the volume details API <https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=show-a-volume-s-details-detail#show-a-volume-s-details> contains an /attachments /parameter. On 7/2/2019 1:14 PM, RAI, SNEHA wrote:
Hi All,
Is there a way to find in cinder how many instances are attached to a volume?
Thanks & Regards,
Sneha Rai
*From:* RAI, SNEHA *Sent:* Monday, July 1, 2019 5:26 PM *To:* openstack-dev@lists.openstack.org *Subject:* HPE 3PAR Cinder driver-Multiattach: Fails to detach second instance from volume
Hi Team,
There is a bug on 3PAR Cinder driver https://bugs.launchpad.net/cinder/+bug/1834660 <https://bugs.launchpad.net/cinder/+bug/1834660>.
I am able to attach multiple instances to 3PAR volume but only the first instance gets detached successfully.
For the second instance, volume goes into detaching status due to “Host does not exist” error.
What is happening here is, the first detach call invokes _delete_3par_host() which removes the compute host entry from 3PAR which ideally should be done only when the last instance is to be detached.
It would be great if someone could help me understand if this needs to be handled in driver code or nova would internally take care of it.
Code changes done to support multiattach-https://review.opendev.org/#/c/659443
Thanks & Regards,
Sneha Rai
participants (3)
-
Bernd Bausch
-
Matt Riedemann
-
RAI, SNEHA