Description of problem:
nova root-password fails and does not return error
[root@camel-nova ~]# nova root-password 47007d89-6d71-4cbf-98cb-add14145fda2
New password:
Again:
[root@camel-nova ~]# echo $?
0
compute.log:
2012-07-10 15:51:47 DEBUG nova.rpc.amqp [-] received {u'_context_roles': [u'admin'], u'_context_request_id': u'req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d', u'_context_read_deleted
': u'no', u'args': {u'instance_uuid': u'47007d89-6d71-4cbf-98cb-add14145fda2', u'new_pass': '<SANITIZED>'}, u'_context_auth_token': '<SANITIZED>', u'_context_is_admin': True, u'
_context_project_id': u'3f1e394b238d4f26b742e9685a9a1a57', u'_context_timestamp': u'2012-07-10T12:51:47.350078', u'_context_user_id': u'29af43364ced4611bf6e093a04d4c144', u'meth
od': u'set_admin_password', u'_context_remote_address': u'1.1.1.2'} from (pid=16497) _safe_log /usr/lib/python2.6/site-packages/nova/rpc/common.py:160
2012-07-10 15:51:47 DEBUG nova.rpc.amqp [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] unpacked context: {'user_id'
: u'29af43364ced4611bf6e093a04d4c144', 'roles': [u'admin'], 'timestamp': '2012-07-10T12:51:47.350078', 'auth_token': '<SANITIZED>', 'remote_address': u'10.35.97.20', 'is_admin':
True, 'request_id': u'req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d', 'project_id': u'3f1e394b238d4f26b742e9685a9a1a57', 'read_deleted': u'no'} from (pid=16497) _safe_log /usr/lib/p
ython2.6/site-packages/nova/rpc/common.py:160
2012-07-10 15:51:47 INFO nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] check_instance_lock: d
ecorating: |<function set_admin_password at 0x20f38c0>|
2012-07-10 15:51:47 INFO nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] check_instance_lock: a
rguments: |<nova.compute.manager.ComputeManager object at 0x1f67190>| |<nova.rpc.amqp.RpcContext object at 0x40c9910>| |47007d89-6d71-4cbf-98cb-add14145fda2|
2012-07-10 15:51:47 DEBUG nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] instance 47007d89-6d7
1-4cbf-98cb-add14145fda2: getting locked state from (pid=16497) get_lock /usr/lib/python2.6/site-packages/nova/compute/manager.py:1609
2012-07-10 15:51:47 INFO nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] check_instance_lock: l
ocked: |False|
2012-07-10 15:51:47 INFO nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] check_instance_lock: a
dmin: |True|
2012-07-10 15:51:47 INFO nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] check_instance_lock: e
xecuting: |<function set_admin_password at 0x20f38c0>|
2012-07-10 15:51:47 DEBUG nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] [instance: 47007d89-6
d71-4cbf-98cb-add14145fda2] Checking state from (pid=16497) _get_power_state /usr/lib/python2.6/site-packages/nova/compute/manager.py:272
2012-07-10 15:51:48 WARNING nova.compute.manager [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] set_admin_password
is not implemented by this driver.
api.log:
2012-07-10 15:51:47 INFO nova.api.openstack.wsgi [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] POST http://camel-nova:8774/v1.1/3f1e394b238d4f26b742e9685a9a1a57/servers/47007d89-6d71-4cbf-98cb-add14145fda2/action
2012-07-10 15:51:47 DEBUG nova.rpc.amqp [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] Making asynchronous cast on compute.camel-vdsa.. from (pid=5531) cast /usr/lib/python2.6/site-packages/nova/rpc/amqp.py:351
2012-07-10 15:51:47 INFO nova.api.openstack.wsgi [req-a9d3ee4a-5b67-4eef-aa07-3a2fd704239d 29af43364ced4611bf6e093a04d4c144 3f1e394b238d4f26b742e9685a9a1a57] http://camel-novacom:8774/v1.1/3f1e394b238d4f26b742e9685a9a1a57/servers/47007d89-6d71-4cbf-98cb-add14145fda2/action returned with HTTP 202
consider changing the message exchange pattern from cast to call
This is due to nova.compute. api.set_ admin_password( ) making a oneway RPC cast to effect the attempted password change on the compute node, but then returning a 202 Accepted status immediately.
As such, it's a symptom of a wider problem that impacts on many asynchronous nova APIs, in that there is no concept of a task identifier that can be later queried for progress or a definite outcome.
This has been discussed previously on the upstream ML:
https:/ /lists. launchpad. net/openstack/ msg13774. html
but is obviously out-of-scope for a fix on stable/essex.
However, it would not be considered an RPC backward-compat breaking change to alter the message exchange pattern from oneway to request-response for this individual message type. So that approach would be possible to get into stable/essex.