Copy VDisk from localstorage 400 BADREQUEST

Bug #1689515 reported by HuBingjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pypowervm
Invalid
Undecided
Unassigned

Bug Description

When I use this powervm library to copy the vdisk from localstorage, I got an error :
Traceback (most recent call last):
  File "test_storage.py", line 80, in <module>
    main()
  File "test_storage.py", line 37, in main
    createDiskForImgFromLocal(apt, vios_uuid, vg_uuid, image[0].udid, size, "test_create_vol", size, host_uuid, instance)
  File "test_storage.py", line 44, in createDiskForImgFromLocal
    newdisk = tsk_stg.crt_copy_vdisk(adapter, vios_uuid, vg_uuid, img_udid, image_meta_size, vol_name, disk_bytes)
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/tasks/storage.py", line 135, in crt_copy_vdisk
    base_image=src, file_format=file_format)
  File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/tasks/storage.py", line 652, in crt_vdisk
    vol_grp = vol_grp.update()
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/wrappers/entry_wrapper.py", line 1148, in update
    timeout=timeout))
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/adapter.py", line 854, in update_by_path
    timeout=timeout, auditmemento=auditmemento, sensitive=sensitive)
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/adapter.py", line 636, in _request
    resp = func(method, path, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/pypowervm/adapter.py", line 432, in request
    raise self._get_httperror(resp)
pypowervm.exceptions.HttpError: HTTP error 400 for method POST on path /rest/api/uom/VirtualIOServer/4FF7C73D-CC07-4D7C-B9F6-44949D522220/VolumeGroup/ee8f03b6-8cba-3b55-abd6-7d835beba9ba: Bad Request -- REST0001 Failed to unmarshal input payload.

-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------

so I modify the library and print the url path & the post data, but I can not figure out what's wrong:

The url path:
/rest/api/uom/VirtualIOServer/4FF7C73D-CC07-4D7C-B9F6-44949D522220/VolumeGroup/ee8f03b6-8cba-3b55-abd6-7d835beba9ba

The post data:
<VolumeGroup:VolumeGroup xmlns:VolumeGroup="http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/" xmlns="http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" xmlns:ns3="http://www.w3.org/1999/xhtml" schemaVersion="V1_1_0">
    <Metadata>
        <Atom>
            <AtomID>ee8f03b6-8cba-3b55-abd6-7d835beba9ba</AtomID>
            <AtomCreated>1494311098943</AtomCreated>
        </Atom>
    </Metadata>
    <AvailableSize kb="ROR" kxe="false">49.8125</AvailableSize>
    <FreeSpace kb="ROR" kxe="false">49.8125</FreeSpace>
    <GroupCapacity kb="CUR" kxe="false">99.875</GroupCapacity>
    <GroupName kb="CUR" kxe="false">powervmpool</GroupName>
    <GroupSerialID kb="ROR" kxe="false">00043b720000d9000000015be6d46b9e</GroupSerialID>
    <MaximumLogicalVolumes kb="ROR" kxe="false">1024</MaximumLogicalVolumes>
    <PhysicalVolumes kb="CUD" kxe="false" schemaVersion="V1_1_0">
        <Metadata>
            <Atom/>
        </Metadata>
        <PhysicalVolume schemaVersion="V1_1_0">
            <Metadata>
                <Atom/>
            </Metadata>
            <Description kb="CUD" kxe="false">MPIO DS5020 Disk</Description>
            <LocationCode kxe="false" kb="ROR">U789C.001.DQD4399-P1-C3-T1-W20150080E518CE86-L0</LocationCode>
            <PersistentReserveKeyValue kb="ROR" kxe="false">none</PersistentReserveKeyValue>
            <ReservePolicy kxe="false" kb="CUD">SinglePath</ReservePolicy>
            <ReservePolicyAlgorithm kb="CUD" kxe="false">Failover</ReservePolicyAlgorithm>
            <UniqueDeviceID kb="ROR" kxe="false">01M0lCTTE4MTQgICAgICBGQVN0VDYwMDgwRTUwMDAxOENFODYwMDAwMTlGNDU3RDFFQjA5</UniqueDeviceID>
            <AvailableForUsage kb="CUD" kxe="false">false</AvailableForUsage>
            <VolumeCapacity kb="CUR" kxe="false">102400</VolumeCapacity>
            <VolumeName kb="CUR" kxe="false">hdisk1</VolumeName>
            <VolumeState kb="ROR" kxe="false">active</VolumeState>
            <VolumeUniqueID kb="ROR" kxe="false">3E21360080E500018CE86000019F457D1EB090F1814 FAStT03IBMfcp</VolumeUniqueID>
            <IsFibreChannelBacked kb="ROR" kxe="false">false</IsFibreChannelBacked>
        </PhysicalVolume>
    </PhysicalVolumes>
    <UniqueDeviceID kb="ROR" kxe="false">0400043b720000d9000000015be6d46b9e</UniqueDeviceID>
    <VirtualDisks kxe="false" kb="CUD" schemaVersion="V1_1_0">
        <Metadata>
            <Atom/>
        </Metadata>
        <VirtualDisk schemaVersion="V1_1_0">
            <Metadata>
                <Atom/>
            </Metadata>
            <DiskCapacity kb="CUR" kxe="false">10</DiskCapacity>
            <DiskLabel kb="CUR" kxe="false">None</DiskLabel>
            <DiskName kb="CUR" kxe="false">datavg_lv</DiskName>
            <VolumeGroup kb="ROR" kxe="false" href="https://10.202.111.75:12443/rest/api/uom/VirtualIOServer/4FF7C73D-CC07-4D7C-B9F6-44949D522220/VolumeGroup/ee8f03b6-8cba-3b55-abd6-7d835beba9ba" rel="related"/>
            <UniqueDeviceID kb="ROR" kxe="false">0300043b720000d9000000015be6d46b9e.1</UniqueDeviceID>
        </VirtualDisk>
        <VirtualDisk schemaVersion="V1_1_0">
            <Metadata>
                <Atom/>
            </Metadata>
            <DiskCapacity kb="CUR" kxe="false">20</DiskCapacity>
            <DiskLabel kb="CUR" kxe="false">None</DiskLabel>
            <DiskName kb="CUR" kxe="false">vioc1_rootvg</DiskName>
            <VolumeGroup kb="ROR" kxe="false" href="https://10.202.111.75:12443/rest/api/uom/VirtualIOServer/4FF7C73D-CC07-4D7C-B9F6-44949D522220/VolumeGroup/ee8f03b6-8cba-3b55-abd6-7d835beba9ba" rel="related"/>
            <UniqueDeviceID kb="ROR" kxe="false">0300043b720000d9000000015be6d46b9e.2</UniqueDeviceID>
        </VirtualDisk>
    <VolumeGroup:VirtualDisk schemaVersion="V1_0"><VolumeGroup:Metadata><VolumeGroup:Atom/></VolumeGroup:Metadata><VolumeGroup:DiskCapacity>20.000000</VolumeGroup:DiskCapacity><VolumeGroup:DiskLabel>None</VolumeGroup:DiskLabel><VolumeGroup:DiskName>test_vol</VolumeGroup:DiskName><VolumeGroup:BaseImage>0300043b720000d9000000015be6d46b9e.2</VolumeGroup:BaseImage></VolumeGroup:VirtualDisk></VirtualDisks>
</VolumeGroup:VolumeGroup>

=================================================================================================

My HMC's version is 8.1.0 with MH01421 MH01436 MH01441, and I have check the HMC's fix central but found nothing to fix this problem. The HMC document is also not enough information to find out what's wrong.

Revision history for this message
Drew Thorstensen (thorst) wrote :

Hi!

Pypowervm is meant to really be used with a PowerVM novalink environment. Some things work with the HMC, but there are issues around some items like what you reported. Can you retry this on a NovaLink based environment?

Changed in pypowervm:
status: New → Invalid
Revision history for this message
HuBingjun (damon-hu) wrote :

Thanks for your reply.
It is said that PowerVM NovaLink can be installed only on POWER8 processor-based servers. So I can not install the PowerVM NovaLink on the POWER6 server. Do I have to give up the way of using pypowervm?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.