[novaclient] root-password fails and does not return error

Bug #1022961 reported by David Naori
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Eoghan Glynn

Bug Description

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

Revision history for this message
Eoghan Glynn (eglynn) wrote :

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.

Changed in python-novaclient:
status: New → Confirmed
assignee: nobody → Eoghan Glynn (eglynn)
Eoghan Glynn (eglynn)
affects: python-novaclient → nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/10130

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/essex)

Fix proposed to branch: stable/essex
Review: https://review.openstack.org/10135

Revision history for this message
Mark McLoughlin (markmc) wrote :

Requires this tempest change: https://review.openstack.org/#/c/10216/

Revision history for this message
Eoghan Glynn (eglynn) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/10130
Committed: http://github.com/openstack/nova/commit/3ab808b23d17900cc859b75895ac1c7a8f2d7bb9
Submitter: Jenkins
Branch: master

commit 3ab808b23d17900cc859b75895ac1c7a8f2d7bb9
Author: Eoghan Glynn <email address hidden>
Date: Mon Jul 23 12:25:43 2012 +0000

    Setting root passwd no longer fails silently.

    Fixes LP 1022961

    Previously an attempt to set the root password would fail silently if
    for example the driver did not support this action.

    To avoid the user being misled that the password change had succeeded,
    we now report any failure by changing the MEP for set_admin_password
    RPC from cast to call.

    Change-Id: I1fd7b925e9226d30892f3a7cc4ddb938ff678a55

Changed in nova:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in nova:
importance: Undecided → Medium
milestone: none → folsom-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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.