vmbuilder script fails on deploy/cleanup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
New
|
Undecided
|
Unassigned | ||
vm-builder (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Binary package hint: python-vm-builder
Originally attached to bug #562189
I believe this is a bug. There are two checks
for pre-existing VMs, and they differ:
/usr/lib/
line 54: if hostname in self.all_domains() and not
self.context.
line 80: if hostname in self.all_domains() and not self.vm.overwrite:
Changing line 80 to match line 54 prevents this error. I believe this is an ok fix. Consider splitting this into a function, rather than copying and pasting code, if these are supposed to be identical lines.
Line 80 throws an error when run:
Traceback (most recent call last):
File "/usr/bin/
cli.main()
File "/usr/lib/
in main
hypervisor.
File "/usr/lib/
finalise
self.
File "/usr/lib/
call_hooks
call_
File "/usr/lib/
call_hooks
getattr(plugin, func, log_no_
File
"/usr/lib/
80, in deploy
if hostname in self.all_domains() and not self.vm.overwrite:
AttributeError: 'Libvirt' object has no attribute 'vm'
Related branches
- Serge Hallyn: Approve
-
Diff: 12 lines (+1/-1)1 file modifiedVMBuilder/plugins/libvirt/__init__.py (+1/-1)
Simply looking reading the bug description and looking at code, the solution seems sane. It appears like the change to Libvirt:deploy should have been made at the same time the change to 'preflight_check' was [1].
-- bazaar. launchpad. net/~vmbuilder- dev/vmbuilder/ 0.12/revision/ 451
[1] http://