diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-05-25 17:55:51 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-05-25 17:55:51 +0000 |
| commit | b933f90faecaddf7281455f4824577b586e07f0c (patch) | |
| tree | 8a264788931ff14581cba69bc5fa2e5dce2f0aab /nova | |
| parent | de8a8e608ddc5e909c60933cc9cadc7cf71501ae (diff) | |
| download | nova-b933f90faecaddf7281455f4824577b586e07f0c.tar.gz nova-b933f90faecaddf7281455f4824577b586e07f0c.tar.xz nova-b933f90faecaddf7281455f4824577b586e07f0c.zip | |
updating admin_pass moved down to compute where the password is actually reset. only update if it succeeds.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/openstack/servers.py | 1 | ||||
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index 789c69977..5c10fc916 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -607,7 +607,6 @@ class ControllerV10(Controller): def _parse_update(self, context, server_id, inst_dict, update_dict): if 'adminPass' in inst_dict['server']: - update_dict['admin_pass'] = inst_dict['server']['adminPass'] self.compute_api.set_admin_password(context, server_id, inst_dict['server']['adminPass']) diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index c9396cffe..be6ef48ea 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -466,6 +466,9 @@ class VMOps(object): # Successful return code from password is '0' if resp_dict['returncode'] != '0': raise RuntimeError(resp_dict['message']) + db.instance_update(context.get_admin_context(), + instance['id'], + dict(admin_pass=new_pass)) return resp_dict['message'] def inject_file(self, instance, path, contents): |
