Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1208125

Summary: [New] - Create Brick should be blocked if the device is already been used.
Product: [Retired] oVirt Reporter: RamaKasturi <knarra>
Component: ovirt-engine-webadminAssignee: Ramesh N <rnachimu>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: high    
Version: 3.6CC: bugs, ecohen, gklein, knarra, lsurette, mgoldboi, rbalakri, sabose, yeylon
Target Milestone: ---   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: gluster
Fixed In Version: ovirt-engine-3.6.0-0.0.master.20150428172821.git6090d93.el6.noarch.rpm Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-04 11:19:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1187461, 1209358, 1211138    

Description RamaKasturi 2015-04-01 13:02:00 UTC
Description of problem:
When user tries to create a brick by selecting the disk which is already in use he should not be allowed to do so.

Version-Release number of selected component (if applicable):
ovirt-engine-3.6.0-0.0.master.20150331112358.git627bb22.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a cluster and add rhel7 nodes to the host.
2. Now sync all the devices by clicking on the sync button.
3. Select the device and create brick.
4. Now select the same device with which you created the brick.

Actual results:
User is still allowed to click create brick and it is enabled.

Expected results:
User should not be allowed to click create brick / it should be disabled.

Additional info:

Comment 1 Sahina Bose 2015-04-06 07:11:46 UTC
Could you provide logs from vdsm node?

Comment 2 Ramesh N 2015-04-14 05:28:20 UTC
Create Brick will be disabled in following conditions
 1. When Host is not in up state
 2. When there is no device in the device list
 3. When there is no free device(device without lock)
 4. When a device with lock selected

Comment 3 Ramesh N 2015-04-20 06:12:29 UTC
Ignore my previous comment. #Comment2.

 CreateBrick will be enabled only when there is a free device(Device
with canCreateBrick flag true) selected and there is no used
device (Device with canCreateBrick false) selected.

 Only selected devices will be shown in the create brick dialog
instead of all available devices.

Comment 4 RamaKasturi 2015-05-04 06:04:00 UTC
Verified and works fine with build ovirt-engine-3.6.0-0.0.master.20150429182702.git939c2e8.el6.noarch.

With this fix, create brick is enabled only when the device is free, i.e it does not have a lock symbol associated to it.

When there is a lock symbol with the device, create brick remains in disabled state.

when user clicks on the create brick by selecting one of the device only that brick is shown in the create Brick dialog and it does not list all the devices.

Comment 5 Sandro Bonazzola 2015-11-04 11:19:34 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.