Bug 1033942

Summary: [vdsm] getStorageDomainInfo fails due to key 'info' missing from poolInfo for master domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Gadi Ickowicz <gickowic>
Component: vdsmAssignee: Yoav Kleinberger <ykleinbe>
Status: CLOSED ERRATA QA Contact: Gadi Ickowicz <gickowic>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: abaron, acanan, adahms, amureini, bazulay, fsimonce, gickowic, iheim, lpeer, mkalinin, nlevinki, sbonazzo, scohen, tnisan, yeylon
Target Milestone: ---Keywords: Reopened, TestOnly, ZStream
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the getStorageDomainInfo action of the vdsClient command would fail when run under certain conditions. Now, the logic used to retrieve information on storage domains using the vdsClient command has been revised so that the action returns information correctly.
Story Points: ---
Clone Of:
: 1084970 (view as bug list) Environment:
Last Closed: 2014-06-09 13:26:37 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:
Bug Depends On:    
Bug Blocks: 1078909, 1084970, 1142926    
Attachments:
Description Flags
vdsm logs none

Description Gadi Ickowicz 2013-11-24 15:13:39 UTC
Created attachment 828343 [details]
vdsm logs

Description of problem:
for a domain created with vdsm-4.13.0-0.9.beta1.el6ev.x86_64 and attached to pool (as first domain - domain becomes master) getStorageDomainInfo (on same vdsm version) fails with the following error:

Thread-3682::ERROR::2013-11-24 16:49:10,100::task::850::TaskManager.Task::(_setError) Task=`aed651f3-62a9-4dcf-a749-25df7b06ddcd`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 857, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 45, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 2773, in getStorageDomainInfo
    info[key] = poolInfo['info'][key]
KeyError: 'info'


[root@aqua-vds4 ~]# vdsClient -s 0 getStorageDomainsList
75b648ae-e83c-4670-ae9e-9b4f2d5537a8
017717b0-570c-4db0-9666-248c024418d4

[root@aqua-vds4 ~]# vdsClient -s 0 getStorageDomainInfo 017717b0-570c-4db0-9666-248c024418d4
Error in storage domain action: ('sdUUID=017717b0-570c-4db0-9666-248c024418d4',)


getting info for domain that was created with same vdsm but not attached to pool works fine:

[root@aqua-vds4 ~]# vdsClient -s 0 getStorageDomainInfo 75b648ae-e83c-4670-ae9e-9b4f2d5537a8
        uuid = 75b648ae-e83c-4670-ae9e-9b4f2d5537a8
        vguuid = KezyhT-RMrl-uac6-C8y2-B87n-Q5Bp-VhLVlr
        lver = -1
        state = OK
        version = 3
        role = Regular
        pool = []
        spm_id = -1
        type = ISCSI
        class = Data
        master_ver = 0
        name = domain2


attaching the domain to the pool also gives proper info:
[root@aqua-vds4 ~]# vdsClient -s 0 getStorageDomainInfo 75b648ae-e83c-4670-ae9e-9b4f2d5537a8
        uuid = 75b648ae-e83c-4670-ae9e-9b4f2d5537a8
        vguuid = KezyhT-RMrl-uac6-C8y2-B87n-Q5Bp-VhLVlr
        lver = -1
        state = OK
        version = 3
        role = Regular
        pool = ['e5192c0a-4776-436c-ac90-6bd40da281f5']
        spm_id = -1
        type = ISCSI
        class = Data
        master_ver = 0
        name = domain2


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


How reproducible:
100%

Steps to Reproduce:
1. Create iscsi DC
2. Add iscsi domain to dc (pool is created)
3. getStorageDomainInfo on domain

Actual results:
getStorageDomainInfo fails

Expected results:
getStorageDomainInfo should return storage domain information

Additional info:

Comment 2 Eduardo Warszawski 2013-11-25 15:03:00 UTC
vdsm-4.13.0-0.9.beta1 lacks:

I8b0b2ad3dca19cf203d937c1a9f6a12ab0f1095f

Will better(TM) to backport:

I8b7323d4ccaaaec0f39d5590a06879faa7fc999e

Comment 3 Ayal Baron 2013-11-28 20:25:15 UTC
Gadi, does this fail creation of domain or import of ISO domain or any flow that we really care about?

Comment 4 Gadi Ickowicz 2013-12-01 06:53:59 UTC
(In reply to Ayal Baron from comment #3)
> Gadi, does this fail creation of domain or import of ISO domain or any flow
> that we really care about?

As far as I can tell, this did not cause any flows initiated through webadmin or REST to fail.

Comment 8 Federico Simoncelli 2014-02-10 15:39:15 UTC
This appears only in 3.3 because we were lacking the backport of a patch (see comment 2). Engine never uses getStorageDomainInfo so I am closing this WONTFIX.
Master and 3.4 branches were never affected by this issue.

Comment 15 Gadi Ickowicz 2014-04-09 11:56:31 UTC
verified on av6 (vdsm-4.14.6-0.1.beta3.el6ev.x86_64):

[root@gold-vdsc vdsm]# for i in `vdsClient -s 0 getStorageDomainsList`; do vdsClient -s 0 getStorageDomainInfo $i; done
        uuid = 129b13aa-a5dd-404a-9bd2-78c1588f888d
        vguuid = JcJaCG-fnPg-VtWu-ymzs-3dKD-YNHg-F3x2QR
        state = OK
        version = 3
        role = Regular
        type = ISCSI
        class = Data
        pool = ['36b71d5b-2e39-4784-8ae4-a13669bc4512']
        name = domain2

        uuid = 1d6ec6d3-e6c3-4ad7-8a34-7a5ad0d7805b
        vguuid = yRzzSY-N49G-1CzN-F6J5-led6-dCpU-Ru6Sdl
        state = OK
        version = 3
        role = Master
        type = ISCSI
        class = Data
        pool = ['36b71d5b-2e39-4784-8ae4-a13669bc4512']
        name = domain1

Comment 16 errata-xmlrpc 2014-06-09 13:26:37 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.

http://rhn.redhat.com/errata/RHBA-2014-0504.html