yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #27499
[Bug 1414450] Re: nova reset-state <server> does not work using server name.
** Project changed: nova => python-novaclient
--
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/1414450
Title:
nova reset-state <server> does not work using server name.
Status in Python client library for Nova:
New
Bug description:
According to the help description, either the name or ID of the server
can be used in "nova reset-state <server>".
Using the server name actually fails.
localadmin@qa4:~/devstack$ nova help reset-state
usage: nova reset-state [--active] <server> [<server> ...]
Reset the state of a server.
Positional arguments:
<server> Name or ID of server(s). <<<<<<<
Optional arguments:
--active Request the server be reset to "active" state instead of "error"
state (the default).
localadmin@qa4:~/devstack$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| fd2d1590-9993-43cc-b92d-48a4fdbc8d1c | vm-1 | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+
localadmin@qa4:~/devstack$
localadmin@qa4:~/devstack$
localadmin@qa4:~/devstack$ nova --debug --os-tenant-name admin --os-username admin reset-state vm-1
REQ: curl -i 'http://172.29.172.161:5000/v2.0/tokens' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "{SHA1}5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8"}}}'
INFO (connectionpool:258) Starting new HTTP connection (1): 172.29.172.161
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool:415) "POST /v2.0/tokens HTTP/1.1" 200 4288
RESP: [200] CaseInsensitiveDict({'date': 'Sun, 25 Jan 2015 01:40:52 GMT', 'vary': 'X-Auth-Token', 'content-length': '4288', 'content-type': 'application/json', 'server': 'Apache/2.4.7 (Ubuntu)'})
RESP BODY: {"access": {"token": {"issued_at": "2015-01-25T01:40:52.884988", "expires": "2015-01-25T02:40:52Z", "id": "{SHA1}b791da8356ec9fba2b86f8dbac9717bb35397cf3", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "fd72b5ea8d5942ea8927238a9da9f90f"}, "audit_ids": ["fbeMQKJ1RRy1ACHDg9oFiw"]}, "serviceCatalog": [{"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8774/v2.1/fd72b5ea8d5942ea8927238a9da9f90f", "region": "RegionOne", "publicURL": "http://172.29.172.161:8774/v2.1/fd72b5ea8d5942ea8927238a9da9f90f", "internalURL": "http://172.29.172.161:8774/v2.1/fd72b5ea8d5942ea8927238a9da9f90f", "id": "0e005e1d2cf6444190e777b2c9fb6f14"}], "type": "computev21", "name": "novav21"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8774/v2/fd72b5ea8d5942ea8927238a9da9f90f", "region": "RegionOne", "publicURL": "http://172.29.172.161:8774/v2/fd72b5ea8d5942ea8927238a9da9f90f", "internalURL": "http://172.29.172.161:8774/v2/fd72b5ea8d5942ea8927238a9da9f90f", "id": "59afb4d03d5d4956956e4a46b4a37862"}], "type": "compute", "name": "nova"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:9696/", "region": "RegionOne", "publicURL": "http://172.29.172.161:9696/", "internalURL": "http://172.29.172.161:9696/", "id": "394bbcb86ccb4145912c9d1b2fad0251"}], "type": "network", "name": "neutron"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8776/v2/fd72b5ea8d5942ea8927238a9da9f90f", "region": "RegionOne", "publicURL": "http://172.29.172.161:8776/v2/fd72b5ea8d5942ea8927238a9da9f90f", "internalURL": "http://172.29.172.161:8776/v2/fd72b5ea8d5942ea8927238a9da9f90f", "id": "6843182678a341f3b4514fa4f8d4d292"}], "type": "volumev2", "name": "cinderv2"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:3333", "region": "RegionOne", "publicURL": "http://172.29.172.161:3333", "internalURL": "http://172.29.172.161:3333", "id": "69fb582ce2fe45a8aa10daa6477d465d"}], "type": "s3", "name": "s3"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:9292", "region": "RegionOne", "publicURL": "http://172.29.172.161:9292", "internalURL": "http://172.29.172.161:9292", "id": "6b35833a55554c1f8b95b3d98006fa14"}], "type": "image", "name": "glance"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8000/v1", "region": "RegionOne", "publicURL": "http://172.29.172.161:8000/v1", "internalURL": "http://172.29.172.161:8000/v1", "id": "03c808dabc484ad08bf1a70116b04db7"}], "type": "cloudformation", "name": "heat-cfn"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8776/v1/fd72b5ea8d5942ea8927238a9da9f90f", "region": "RegionOne", "publicURL": "http://172.29.172.161:8776/v1/fd72b5ea8d5942ea8927238a9da9f90f", "internalURL": "http://172.29.172.161:8776/v1/fd72b5ea8d5942ea8927238a9da9f90f", "id": "222fe5fa58a44d1ca2e4efe9225883bb"}], "type": "volume", "name": "cinder"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8773/services/Admin", "region": "RegionOne", "publicURL": "http://172.29.172.161:8773/services/Cloud", "internalURL": "http://172.29.172.161:8773/services/Cloud", "id": "38a22577c71342899b55510b3f34c573"}], "type": "ec2", "name": "ec2"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:8004/v1/fd72b5ea8d5942ea8927238a9da9f90f", "region": "RegionOne", "publicURL": "http://172.29.172.161:8004/v1/fd72b5ea8d5942ea8927238a9da9f90f", "internalURL": "http://172.29.172.161:8004/v1/fd72b5ea8d5942ea8927238a9da9f90f", "id": "3b5822567e004f26a0dd171d10203d02"}], "type": "orchestration", "name": "heat"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.29.172.161:35357/v2.0", "region": "RegionOne", "publicURL": "http://172.29.172.161:5000/v2.0", "internalURL": "http://172.29.172.161:5000/v2.0", "id": "0c5c5fe4cb1a44128101550e9a7e3057"}], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "41ec0e1b76064e558671410d14917e8a", "roles": [{"name": "_member_"}, {"name": "admin"}, {"name": "heat_stack_owner"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "bd6661f9b68a4de1b34ca1ef0b925144", "accd4f1e417244f5ad19784a2e2e8156"]}}}
REQ: curl -i 'http://172.29.172.161:8774/v2/fd72b5ea8d5942ea8927238a9da9f90f/servers?name=vm-1' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: admin" -H "X-Auth-Token: {SHA1}b791da8356ec9fba2b86f8dbac9717bb35397cf3"
INFO (connectionpool:258) Starting new HTTP connection (1): 172.29.172.161
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool:415) "GET /v2/fd72b5ea8d5942ea8927238a9da9f90f/servers?name=vm-1 HTTP/1.1" 200 15
RESP: [200] CaseInsensitiveDict({'date': 'Sun, 25 Jan 2015 01:40:53 GMT', 'content-length': '15', 'content-type': 'application/json', 'x-compute-request-id': 'req-19653536-b081-46fd-b8a0-a1bd548e8a02'})
RESP BODY: {"servers": []}
REQ: curl -i 'http://172.29.172.161:8774/v2/fd72b5ea8d5942ea8927238a9da9f90f/servers?name=vm-1' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: admin" -H "X-Auth-Token: {SHA1}b791da8356ec9fba2b86f8dbac9717bb35397cf3"
INFO (connectionpool:258) Starting new HTTP connection (1): 172.29.172.161
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool:415) "GET /v2/fd72b5ea8d5942ea8927238a9da9f90f/servers?name=vm-1 HTTP/1.1" 200 15
RESP: [200] CaseInsensitiveDict({'date': 'Sun, 25 Jan 2015 01:40:53 GMT', 'content-length': '15', 'content-type': 'application/json', 'x-compute-request-id': 'req-8a93aebe-ead0-4863-8be7-ddf468c346ef'})
RESP BODY: {"servers": []}
Reset state for server vm-1 failed: No server with a name or ID of 'vm-1' exists. <<<<<ERROR
DEBUG (shell:803) Unable to reset the state for the specified server(s).
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 800, in main
OpenStackComputeShell().main(argv)
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 730, in main
args.func(self.cs, args)
File "/usr/local/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 3024, in do_reset_state
raise exceptions.CommandError(msg)
CommandError: Unable to reset the state for the specified server(s).
ERROR (CommandError): Unable to reset the state for the specified server(s).
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-novaclient/+bug/1414450/+subscriptions
References