yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #21452
[Bug 1246189] Re: nova boot with a block-device-mapping void of a device_path fails
** Changed in: nova
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1246189
Title:
nova boot with a block-device-mapping void of a device_path fails
Status in OpenStack Compute (Nova):
Invalid
Bug description:
From
https://github.com/openstack/nova/commit/3b1f7c55c10eec9d438a7d147aba1124b5ff9452:
"This patch removes the check in the API that prevented having block
devices without 'device_name' and makes the compute manager capable of
guessing those names."
The patch doesn't seem to work on 'nova boot' however.
REQ: curl -i http://IP:8774/v2/549d075f78c045e984bb03e62f6ba91c/os-
volumes_boot -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent:
python-novaclient" -H "Content-Type: application/json" -H "Accept:
application/json" -H "X-Auth-Token: REDACTED" -d '{"server": {"name":
"chuckle", "imageRef": "61ecd9fb-58c3-42ea-9dde-65d33b7f4fce",
"block_device_mapping": [{"volume_size": "5", "volume_id":
"b7a47460-94a7-4bf6-8b83-99a50a223f35", "delete_on_termination":
"1"}], "flavorRef": "9", "max_count": 1, "min_count": 1,
"personality": [{"path": "/etc/guest_info", "contents":
"W0RFRkFVTFRdCmd1ZXN0X2lkPTVjYWY4MzEyLTg5MjAtNGUwYi04NDRkLTVjM2I3NDYxOTA1ZApz\nZXJ2aWNlX3R5cGU9bXlzcWwKdGVuYW50X2lkPTU0OWQwNzVmNzhjMDQ1ZTk4NGJiMDNlNjJmNmJh\nOTFjCg==\n"}]}}'
Results in (on n-api):
2013-10-29 22:53:09.620 DEBUG nova.api.openstack.wsgi [req-eaa95da5-78c8-4bf3-b5b4-7c382420b82c admin admin] Action: 'create', body: {"server": {"name": "chuckle", "imageRef": "61ecd9fb-58c3-42ea-9dde-65d33b7f4fce", "block_device_mapping": [{"volume_size": "5", "volume_id": "b7a47460-94a7-4bf6-8b83-99a50a223f35", "delete_on_termination": "1"}], "flavorRef": "9", "max_count": 1, "min_count": 1, "personality": [{"path": "/etc/guest_info", "contents": "W0RFRkFVTFRdCmd1ZXN0X2lkPTVjYWY4MzEyLTg5MjAtNGUwYi04NDRkLTVjM2I3NDYxOTA1ZApz\nZXJ2aWNlX3R5cGU9bXlzcWwKdGVuYW50X2lkPTU0OWQwNzVmNzhjMDQ1ZTk4NGJiMDNlNjJmNmJh\nOTFjCg==\n"}]}} from (pid=25304) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:940
2013-10-29 22:53:09.620 DEBUG nova.api.openstack.wsgi [req-eaa95da5-78c8-4bf3-b5b4-7c382420b82c admin admin] Calling method <bound method Controller.create of <nova.api.openstack.compute.servers.Controller object at 0x318ccd0>> from (pid=25304) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:941
2013-10-29 22:53:09.622 INFO nova.api.openstack.wsgi [req-eaa95da5-78c8-4bf3-b5b4-7c382420b82c admin admin] HTTP exception thrown: Block Device Mapping is Invalid: Device name empty or too long.
2013-10-29 22:53:09.623 DEBUG nova.api.openstack.wsgi [req-eaa95da5-78c8-4bf3-b5b4-7c382420b82c admin admin] Returning 400 to user: Block Device Mapping is Invalid: Device name empty or too long. from (pid=25304) __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1203
The check being performed is located at
https://github.com/openstack/nova/blob/f10b93b2930a0e82eb994c9d7429213f134cd955/nova/api/openstack/compute/servers.py#L833
If the check is amended to resemble
https://github.com/openstack/nova/blob/308bba10f621513c2f99b0b6bc83ff5320970f78/nova/block_device.py#L117-L118,
it seems to work.
I'd submit a patch-set, but the test at
https://github.com/openstack/nova/blob/f10b93b2930a0e82eb994c9d7429213f134cd955/nova/tests/api/openstack/compute/test_servers.py#L2432-L2444
seems to indicate this validation is/was quite purposeful, causing me
some trepidation.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1246189/+subscriptions