Bug 1668727

Summary: Cinderlib- implement ManagedVolume.volume_info
Product: [oVirt] vdsm Reporter: Fred Rolland <frolland>
Component: GeneralAssignee: Vojtech Juranek <vjuranek>
Status: CLOSED CURRENTRELEASE QA Contact: Avihai <aefrat>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.30.3CC: aefrat, bugs, frolland, vjuranek
Target Milestone: ovirt-4.3.1Flags: aefrat: needinfo-
aefrat: needinfo-
aefrat: needinfo-
rule-engine: ovirt-4.3+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-13 16:40:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1539837    

Description Fred Rolland 2019-01-23 13:01:43 UTC
Description of problem:

Implement ManagedVolume.volume_info:

Get volume information

The user is able to get the information of a specific volume using
ManagedVolume.volume_info with the volume ID.
Vdsm will return the volume information, as in the attach flow.
For example:

{
  "path" : "/dev/mapper/20024f400585401ce",
  "attachment":
  {
    "path": "/dev/sda",
    "scsi_wwn": "20024f400585401ce",
    "type": "block"
  }
}

Comment 1 Shir Fishbain 2019-03-07 16:18:51 UTC
Please provide a clear scenario

Comment 4 Vojtech Juranek 2019-03-11 10:38:50 UTC
Tests scenario:
1. Add couple of records into sqlite database /var/lib/vdsm/storage/managedvolume.db
   The records can look like this:
   
   {
        "connection_info": {
            "connection": 1
        }, 
        "path": "/dev/mapper/36001405376e34ea70384de7a34a2854d", 
        "vol_id": "vol-id-1", 
        "attachment": {
            "path": "/dev/sda",
            "scsi_wwn": "20024f400585401ce",
            "type": "block"
        },
        "exists": false
    }

2. Run 
     vdsm-client ManagedVolume volumes_info
   and verify it returns all the records.

3. Create json file `ids.json` with IDs of records which are subset of all insrted records, e.g.
     {
       "vol_ids": ["vol-id-1", "vol-id-3"]
     }

4. Run 
     vdsm-client -f ids.json ManagedVolume volumes_info
   and verify it returns only the records which ID's are in `ids.json`.

Comment 5 Avihai 2019-03-11 11:39:26 UTC
verified on ovirt-engine 4.3.2-0.1.el7
vdsm-4.30.10-1.el7ev.x86_64

Comment 6 Sandro Bonazzola 2019-03-13 16:40:31 UTC
This bugzilla is included in oVirt 4.3.1 release, published on February 28th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.