Revision e64e7ade snf-cyclades-app/synnefo/logic/management/commands/reconcile.py
b/snf-cyclades-app/synnefo/logic/management/commands/reconcile.py | ||
---|---|---|
200 | 200 |
"Issuing OP_INSTANCE_REMOVE for %d Ganeti instances:" % \ |
201 | 201 |
len(orphans) |
202 | 202 |
for id in orphans: |
203 |
vm = VirtualMachine.objects.get(pk=id) |
|
204 |
vm.client.DeleteInstance(utils.id_to_instance_name(id)) |
|
203 |
try: |
|
204 |
vm = VirtualMachine.objects.get(pk=id) |
|
205 |
vm.client.DeleteInstance(utils.id_to_instance_name(id)) |
|
206 |
except VirtualMachine.DoesNotExist: |
|
207 |
print >> sys.stderr, "No entry for VM %d in DB !!" |
|
205 | 208 |
print >> sys.stderr, " ...done" |
206 | 209 |
|
207 | 210 |
if options['fix_unsynced'] and len(unsynced) > 0: |
Also available in: Unified diff