diff options
| author | sateesh <sateesh.chodapuneedi@citrix.com> | 2011-02-17 19:50:55 +0530 |
|---|---|---|
| committer | sateesh <sateesh.chodapuneedi@citrix.com> | 2011-02-17 19:50:55 +0530 |
| commit | f92edfc207a1a593f56e079b3bccc5ca965132a0 (patch) | |
| tree | 910552fa1cfe247a42b456f561c7efbfbcf7062f /bin | |
| parent | 39ffe46a749ad8f4a390f8e4c36c871845af2fc0 (diff) | |
| parent | 7798a551e39cf39a26e966f7ef7ecea52b3f77c3 (diff) | |
Rebased at lp:nova 687
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 7835ca551..e4c0684c4 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -579,6 +579,13 @@ class VolumeCommands(object): ctxt = context.get_admin_context() volume = db.volume_get(ctxt, param2id(volume_id)) host = volume['host'] + + if not host: + print "Volume not yet assigned to host." + print "Deleting volume from database and skipping rpc." + db.volume_destroy(ctxt, param2id(volume_id)) + return + if volume['status'] == 'in-use': print "Volume is in-use." print "Detach volume from instance and then try again." |
