Bug 1720187

Summary: SmartState Analysis resets a VMware Raw Device Mapped disk from "disk_type": "rdm-physical" to "disk_type": "thick"
Product: Red Hat CloudForms Management Engine Reporter: Peter McGowan <pmcgowan>
Component: SmartState AnalysisAssignee: Hui Song <hsong>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.4CC: dmetzger, hsong, mshriver, nansari, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.13 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:36:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1730805    
Bug Blocks:    

Description Peter McGowan 2019-06-13 10:52:21 UTC
Description of problem:

A VMware VM that has a Raw Device Mapped (RDM) disk presented to it is discovered correctly during inventory, and a boolean virtual column attribute "has_rdm_disk" is set to "true" on the VM object. The RDM disk is shown as "disk_type": "rdm-physical".

If a SmartState Analysis is now performed on the same VM, the "has_rdm_disk" attribute is set to "false", and the disk now incorrectly shows the "disk_type" as "thick".

If a subsequent inventory is performed of the same VM then the attributes are reset to their correct values, but this may be many hours after the SmartState Analysis.

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

How reproducible:
Every time

Steps to Reproduce:
1. Present a raw device mapped (RDM) disk to a VM in a VMware provider
2. In CloudForms, query the VM using the API call:
https://<IP address>/api/vms/<id>?expand=resources&attributes=name,has_rdm_disk,disks

{
    "href": "https://x.x.x.x/api/vms/168",
    "name": "pemcg-rdm-test",
    "id": "168",
    "has_rdm_disk": true,
    "disks": [
        {
            "id": "419",
            "device_name": "Hard disk 2",
            "device_type": "disk",
            "location": "0:1",
            "filename": "[iSCSI_Datastore] pemcg-rdm-test/pemcg-rdm-test_1.vmdk",
            "hardware_id": "170",
            "mode": "independent_persistent",
            "controller_type": "scsi",
            "size": 10737418240,
            "free_space": null,
            "size_on_disk": 10737418240,
            "present": true,
            "start_connected": true,
            "auto_detect": null,
            "created_on": "2019-06-06T09:31:38Z",
            "updated_on": "2019-06-06T15:48:50Z",
            "disk_type": "rdm-physical",
            "storage_id": "3",
            "backing_id": null,
            "backing_type": null,
            "storage_profile_id": null,
            "bootable": null
        }
    ]
}
3. Perform a SmartState Analysis of the VM, then repeat the same API call:
Note that the disk type has changed and the boolean has been reset:

{
    "href": "https://x.x.x.x/api/vms/168",
    "name": "pemcg-rdm-test",
    "id": "168",
    "has_rdm_disk": false,
    "disks": [
        {
            "id": "419",
            "device_name": "Hard disk 2",
            "device_type": "disk",
            "location": "0:1",
            "filename": "[iSCSI_Datastore] pemcg-rdm-test/pemcg-rdm-test_1.vmdk",
            "hardware_id": "170",
            "mode": "independent_persistent",
            "controller_type": "scsi",
            "size": 10737418240,
            "free_space": null,
            "size_on_disk": 10737418240,
            "present": true,
            "start_connected": true,
            "auto_detect": null,
            "created_on": "2019-06-06T09:31:38Z",
            "updated_on": "2019-06-13T10:40:21Z",
            "disk_type": "thick",
            "storage_id": "3",
            "backing_id": null,
            "backing_type": null,
            "storage_profile_id": null,
            "bootable": null
        }
    ]
}

Expected results:
SmartState Analysis should not reset the disk type.

Additional info:

Comment 7 Satyajit Bulage 2019-08-09 16:33:27 UTC
Able to scan VM which has RDM disk attached. After filing API query mentioned above gives required output.
Verified Version: 5.11.0.18.20190806180636_1dd6378

Comment 9 errata-xmlrpc 2019-12-12 13:36:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2019:4199