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/virt | |
| 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/virt')
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 3 |
1 files changed, 3 insertions, 0 deletions
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): |
