Bug 1653062 - Volume attached to instance is available to be attached to same instance
Summary: Volume attached to instance is available to be attached to same instance
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.12.0
Assignee: Sam Lucidi
QA Contact: Ido Ovadia
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1767822 1672695
TreeView+ depends on / blocked
 
Reported: 2018-11-25 10:53 UTC by Jad Haj Yahya
Modified: 2020-03-25 18:02 UTC (History)
6 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1672695 1767822 (view as bug list)
Environment:
Last Closed: 2020-03-25 18:02:40 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of error (146.73 KB, image/png)
2018-11-25 10:53 UTC, Jad Haj Yahya
no flags Details

Description Jad Haj Yahya 2018-11-25 10:53:44 UTC
Created attachment 1508419 [details]
screenshot  of error

Description of problem:
Volume attached to instance is available to be attached to same instance in dropdown list

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Navigate to Storage > Block Storage . Volumes
2. Enter volume Details view
3. Go to Configuration >  Attach this Cloud Volume to an instance
4. Select an instance and click Attach
5. Refresh provider relationships and wait volume to be attached
6. Revisit Configuration >  Attach this Cloud Volume to an instance
7. Previously selected instance is available. select it and click Attach

Actual results:
An error message will appear (see attachment)

Expected results:
1. The volume is already in-use so the "Attach this Cloud Volume to an instance" options should be grayed out

Additional info:

Comment 2 Sam Lucidi 2018-12-05 22:58:28 UTC
This appears to be an Openstack provider specific BZ, so claiming this one.

Recent versions of Cinder support multi-attachment for volumes created with the multi-attach flag enabled, so it doesn't necessarily make sense to grey out the attach option on the volume just because it has a VM attached. Until the Openstack provider can collect this information about volumes, it makes sense to filter the obviously invalid duplicate attachment to the same VM, but allow the operation in general. If it's an invalid request for a given volume, the human readable response from the API will be displayed as usual.

https://github.com/ManageIQ/manageiq-providers-openstack/pull/409

Comment 3 CFME Bot 2018-12-14 14:21:59 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/bf034abb51ccfe38b2721da56b372791ccada07d
commit bf034abb51ccfe38b2721da56b372791ccada07d
Author:     Sam Lucidi <slucidi>
AuthorDate: Wed Dec  5 16:58:06 2018 -0500
Commit:     Sam Lucidi <slucidi>
CommitDate: Wed Dec  5 16:58:06 2018 -0500

    Exclude already attached VM from the volume attachment form

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1653062

 app/models/manageiq/providers/openstack/cloud_manager/cloud_volume.rb | 2 +-
 spec/models/manageiq/providers/openstack/cloud_manager/cloud_volume_spec.rb | 6 +
 2 files changed, 7 insertions(+), 1 deletion(-)

Comment 5 Ido Ovadia 2019-07-09 10:01:41 UTC
This is partial fix:

- Volume attached to instance is not available to be attached to same instance, but it is still available to other instances
- From user experience, better solution is as the expected results https://bugzilla.redhat.com/show_bug.cgi?id=1653062#c0 :
  "The volume is already in-use so the "Attach this Cloud Volume to an instance" options should be grayed out"


Note You need to log in before you can comment on or make changes to this bug.