nova volume-update is throwing an ERROR

Bug #1270156 reported by Harika Vakadi
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
Unassigned

Bug Description

I am Trying to use nova volume-update, but it is throwing an error as below

nova volume-update 46e36131-8654-4cb3-a8ed-b39b2660aa2f 14db127c-5c66-42cf-b309-b90c1e4b5fe9 7414d297-c6c7-4357-a4a0-918066c4f6b7
ERROR: 'NoneType' object has no attribute '_info'

Below are the steps followed

Created as a VM
    nova boot --image 74b7b094-78e4-4070-8b43-9f902ac80268 --flavor 1 newH

Attached a Volume to the created VM
    nova volume-attach 46e36131-8654-4cb3-a8ed-b39b2660aa2f 14db127c-5c66-42cf-b309-b90c1e4b5fe9 /dev/vdc

Created a new volume
    cinder create 1 --display_name debug

Now I am trying to update the volume attachment with new volume
    nova volume-update 46e36131-8654-4cb3-a8ed-b39b2660aa2f 14db127c-5c66-42cf-b309-b90c1e4b5fe9 7414d297-c6c7-4357-a4a0-918066c4f6b7

After the executing the above command

The volume which is in-use, is reaching to detaching state.

Here is the detailed log

$ nova --debug volume-update 46e36131-8654-4cb3-a8ed-b39b2660aa2f 14db127c-5c66-42cf-b309-b90c1e4b5fe9 7414d297-c6c7-4357-a4a0-918066c4f6b7

REQ: curl -i 'http://127.0.0.1:5000/v2.0/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "demo", "passwordCredentials": {"username": "demo", "password": "hpcsqa50"}}}'

RESP: [200] CaseInsensitiveDict({'date': 'Fri, 17 Jan 2014 14:01:46 GMT', 'vary': 'X-Auth-Token', 'content-length': '8150', 'content-type': 'application/json'})
RESP BODY: {"access": {"token": {"issued_at": "2014-01-17T14:01:46.820717", "expires": "2014-01-17T15:01:46Z", "id": "<Omitted>", "tenant": {"description": null, "enabled": true, "id": "8e55f8ef4ec140e9b46d30cffeee58ef", "name": "demo"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef", "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef", "id": "148770095d1348dcb490f2e5ea48f309", "publicURL": "http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://127.0.0.1:9696/", "region": "RegionOne", "internalURL": "http://127.0.0.1:9696/", "id": "0acb74a7a3e34908b77c44554ee1da9a", "publicURL": "http://127.0.0.1:9696/"}], "endpoints_links": [], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "http://127.0.0.1:8776/v2/8e55f8ef4ec140e9b46d30cffeee58ef", "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v2/8e55f8ef4ec140e9b46d30cffeee58ef", "id": "01c65657389741a3b578dfe0406f83a6", "publicURL": "http://127.0.0.1:8776/v2/8e55f8ef4ec140e9b46d30cffeee58ef"}], "endpoints_links": [], "type": "volumev2", "name": "cinderv2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:8774/v3", "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v3", "id": "439285b942de43c089f2a1142b22ccb3", "publicURL": "http://127.0.0.1:8774/v3"}], "endpoints_links": [], "type": "computev3", "name": "novav3"}, {"endpoints": [{"adminURL": "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", "id": "29ad31892cad448ba1b6340000c0f39c", "publicURL": "http://127.0.0.1:3333"}], "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", "id": "ae642c61cf56464f9c9a291d331cc339", "publicURL": "http://127.0.0.1:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://127.0.0.1:8776/v1/8e55f8ef4ec140e9b46d30cffeee58ef", "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/8e55f8ef4ec140e9b46d30cffeee58ef", "id": "8ae289c6c85c454db246d9251f9b703e", "publicURL": "http://127.0.0.1:8776/v1/8e55f8ef4ec140e9b46d30cffeee58ef"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "080f9d9fe8b947769bc846dce11face4", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": "039d23d8492c4a0697721bc9168b43b9", "publicURL": "http://127.0.0.1:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "demo", "roles_links": [], "id": "88bdb9688a3c450098b1e469281c9c06", "roles": [{"name": "anotherrole"}, {"name": "Member"}], "name": "demo"}, "metadata": {"is_admin": 0, "roles": ["868faaed28be4515842abe9ef453951f", "c75c2305c8a9429695412706a4c4cf5c"]}}}

REQ: curl -i 'http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef/servers/46e36131-8654-4cb3-a8ed-b39b2660aa2f' -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: <Omitted>"

RESP: [200] CaseInsensitiveDict({'date': 'Fri, 17 Jan 2014 14:01:47 GMT', 'content-length': '1564', 'content-type': 'application/json', 'x-compute-request-id': 'req-e6e0561e-102f-473c-a8fd-18dbc6fe081e'})
RESP BODY: {"server": {"status": "ACTIVE", "updated": "2014-01-17T13:44:40Z", "hostId": "3ebce938b488258e423962660eb7c9d4786b01cec4a0dfee6bf6493b", "addresses": {"private": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:e6:da:e6", "version": 4, "addr": "10.0.0.4", "OS-EXT-IPS:type": "fixed"}]}, "links": [{"href": "http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef/servers/46e36131-8654-4cb3-a8ed-b39b2660aa2f", "rel": "self"}, {"href": "http://127.0.0.1:8774/8e55f8ef4ec140e9b46d30cffeee58ef/servers/46e36131-8654-4cb3-a8ed-b39b2660aa2f", "rel": "bookmark"}], "key_name": null, "image": {"id": "74b7b094-78e4-4070-8b43-9f902ac80268", "links": [{"href": "http://127.0.0.1:8774/8e55f8ef4ec140e9b46d30cffeee58ef/images/74b7b094-78e4-4070-8b43-9f902ac80268", "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-SRV-USG:launched_at": "2014-01-17T13:44:40.000000", "flavor": {"id": "1", "links": [{"href": "http://127.0.0.1:8774/8e55f8ef4ec140e9b46d30cffeee58ef/flavors/1", "rel": "bookmark"}]}, "id": "46e36131-8654-4cb3-a8ed-b39b2660aa2f", "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, "OS-EXT-AZ:availability_zone": "nova", "user_id": "88bdb9688a3c450098b1e469281c9c06", "name": "newH", "created": "2014-01-17T13:44:33Z", "tenant_id": "8e55f8ef4ec140e9b46d30cffeee58ef", "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": [{"id": "14db127c-5c66-42cf-b309-b90c1e4b5fe9"}], "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}}

REQ: curl -i 'http://127.0.0.1:8774/v2/8e55f8ef4ec140e9b46d30cffeee58ef/servers/46e36131-8654-4cb3-a8ed-b39b2660aa2f/os-volume_attachments/14db127c-5c66-42cf-b309-b90c1e4b5fe9' -X PUT -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <Omitted>" -d '{"volumeAttachment": {"volumeId": "7414d297-c6c7-4357-a4a0-918066c4f6b7"}}'

RESP: [202] CaseInsensitiveDict({'date': 'Fri, 17 Jan 2014 14:01:48 GMT', 'content-length': '0', 'content-type': 'text/html; charset=UTF-8', 'x-compute-request-id': 'req-3a36bc8c-1b69-44d9-9f0a-575a35e4df1b'})
RESP BODY:

DEBUG (shell:731) 'NoneType' object has no attribute '_info'
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 728, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 664, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 1750, in do_volume_update
    _print_volume(volume)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 1597, in _print_volume
    utils.print_dict(volume._info)
AttributeError: 'NoneType' object has no attribute '_info'
ERROR: 'NoneType' object has no attribute '_info'

-Harika

Revision history for this message
Matt Riedemann (mriedem) wrote :

Which version of python-novaclient are you using?

Revision history for this message
Matt Riedemann (mriedem) wrote :

Seems that the volume isn't found.

tags: added: novaclient volumes
Revision history for this message
Matt Riedemann (mriedem) wrote :

Does the nova api log show anything when this fails? Or cinder-api log?

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

I also happen to stumble on this error.

this is the trace appearing in n-cpu on devstack:
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] Traceback (most recent call last):
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] File "/opt/stack/nova/nova/compute/manager.py", line 3975, in swap_volume
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] self.driver.swap_volume(old_cinfo, new_cinfo, instance, mountpoint)
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1277, in swap_volume
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] self._swap_volume(virt_dom, disk_dev, conf.source_path)
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1242, in _swap_volume
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] domain.blockRebase(disk_path, new_path, 0,
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 172, in __getattr__
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] f = getattr(self._obj,attr_name)
2014-02-11 16:41:09.557 TRACE nova.compute.manager [instance: 3f761b9f-5c78-4026-9f2e-0334f2d81241] AttributeError: virDomain instance has no attribute 'blockRebase'

and soon after it a trase from oslo.messaging:
"Forbidden: Policy doesn't allow volume_extension:volume_admin_actions:migrate_volume_completion to be performed. (HTTP 403) (Request-ID: req-8e56a9a5-41b8-4a81-97df-9457ed39d693)\n"

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

I also got this one and found the same trace in log file-

[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00mTraceback (most recent call last):
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m File "/opt/stack/nova/nova/compute/manager.py", line 4011, in _swap_volume
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m self.driver.swap_volume(old_cinfo, new_cinfo, instance, mountpoint)
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1280, in swap_volume
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m self._swap_volume(virt_dom, disk_dev, conf.source_path)
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1245, in _swap_volume
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m domain.blockRebase(disk_path, new_path, 0,
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 172, in __getattr__
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00m f = getattr(self._obj,attr_name)
^[[01;31m2014-03-04 09:37:19.511 TRACE nova.compute.manager ^[[01;35m[instance: 55aa1083-cb39-402c-a7a9-1916b367528a] ^[[00mAttributeError: virDomain instance has no attribute 'blockRebase'

Revision history for this message
Vladik Romanovsky (vladik-romanovsky) wrote :

Which version of libvirt are you using?

blockRebase has been introduced in 0.9.10:
http://www.redhat.com/archives/libvir-list/2012-February/msg00813.html

Also, which version of openstack is that?

Revision history for this message
Nikola Đipanov (ndipanov) wrote :

Seems like we need more information from the reporters. If this indeed is an issue we should fix it soon as it renders an important feature unusable it seems.

Changed in nova:
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Harika Vakadi (harika-vakadi) wrote :

Hi Vladik Romanovsky ,

I am using 0.9.8 version of libvirt. thank you for your update. I will check by upgrading the version to 0.9.10.

Thanks,
Harika

chengsheng (chengsheng)
Changed in nova:
assignee: nobody → chengsheng (chengsheng)
assignee: chengsheng (chengsheng) → nobody
Revision history for this message
Ray Chen (chenrano2002) wrote :

this is a nova client bug, and fixed here https://bugs.launchpad.net/python-novaclient/+bug/1321205

Revision history for this message
Ray Chen (chenrano2002) wrote :

fixed in python-novaclient 2.18.0

Changed in nova:
status: Incomplete → Fix Released
Thierry Carrez (ttx)
affects: nova → python-novaclient
Revision history for this message
BigdataCloud (shanweihua) wrote :

The second parameter should be <attachment ID>, but you use a <volume : 14db127c-5c66-42cf-b309-b90c1e4b5fe9>.

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.