diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2011-02-16 16:06:47 -0500 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2011-02-16 16:06:47 -0500 |
| commit | a5af59dd68f8177eebc3745b81dfd60e7043bd5a (patch) | |
| tree | bc4082346b883562df49fdf8908f0b798dd2c430 /bin | |
| parent | cbe4ee9f3a6bf207d475ca230032ced9325c3b7a (diff) | |
| parent | 1016379757919e2bfbea6255edbca86048796c4e (diff) | |
| download | nova-a5af59dd68f8177eebc3745b81dfd60e7043bd5a.tar.gz nova-a5af59dd68f8177eebc3745b81dfd60e7043bd5a.tar.xz nova-a5af59dd68f8177eebc3745b81dfd60e7043bd5a.zip | |
Merged to trunk
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." |
