optparser attribute missing in cli.py (warning-message-printing fail when --part is given a nonexistent file)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
New
|
Undecided
|
Unassigned | ||
vm-builder (Ubuntu) |
Fix Released
|
Medium
|
Daniel Holbert |
Bug Description
Running vmbuilder (python-vm-builder v0.12.3-0ubuntu1) in Lucid I get the following output resulting in an Attribute error
administrator@
2010-07-31 16:49:28,283 INFO : Calling hook: preflight_check
2010-07-31 16:49:28,286 INFO : Calling hook: set_defaults
2010-07-31 16:49:28,287 INFO : Calling hook: bootstrap
2010-07-31 16:54:13,482 INFO : Calling hook: configure_os
2010-07-31 16:54:34,376 INFO : update-
2010-07-31 16:54:34,461 INFO : update-
2010-07-31 16:54:34,547 INFO : update-
2010-07-31 16:54:35,324 INFO : Creating SSH2 RSA key; this may take some time ...
2010-07-31 16:54:36,286 INFO : Creating SSH2 DSA key; this may take some time ...
2010-07-31 16:54:36,403 INFO :
2010-07-31 16:54:36,403 INFO : Warning: Fake initctl called, doing nothing
2010-07-31 16:54:36,404 INFO :
2010-07-31 16:54:36,405 INFO : Warning: Fake initctl called, doing nothing
2010-07-31 16:54:37,808 INFO :
2010-07-31 16:54:37,808 INFO : Current default time zone: 'Etc/UTC'
2010-07-31 16:54:37,811 INFO : Local time is now: Sat Jul 31 15:54:37 UTC 2010.
2010-07-31 16:54:37,812 INFO : Universal Time is now: Sat Jul 31 15:54:37 UTC 2010.
2010-07-31 16:54:37,812 INFO :
2010-07-31 16:55:07,479 INFO :
2010-07-31 16:55:07,479 INFO : Current default time zone: 'Etc/UTC'
2010-07-31 16:55:07,482 INFO : Local time is now: Sat Jul 31 15:55:07 UTC 2010.
2010-07-31 16:55:07,482 INFO : Universal Time is now: Sat Jul 31 15:55:07 UTC 2010.
2010-07-31 16:55:07,482 INFO : Run 'dpkg-reconfigure tzdata' if you wish to change it.
2010-07-31 16:55:07,483 INFO :
2010-07-31 16:55:12,919 INFO : Calling hook: post_install
Traceback (most recent call last):
File "/usr/bin/
cli.main()
File "/usr/lib/
self.
File "/usr/lib/
hypervisor.
AttributeError: 'KVM' object has no attribute 'optparser'
Related branches
- Serge Hallyn: Approve
-
Diff: 43 lines (+6/-6)1 file modifiedVMBuilder/contrib/cli.py (+6/-6)
Changed in vm-builder (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in vm-builder (Ubuntu): | |
status: | New → Triaged |
I had this exact problem, and I just figured out what was going wrong.
It turned out to be that I'd passed a nonexistent file to "--part" in my vmbuilder command. (In the bug-reporter's case -- I'm not sure whether --part accepts relative paths or not, but if you're sure that vmbuilder.partition exists, you might try specifying the *full path* to that file.)
So as I understand it, this problem arises from user error in specifying the "--part" argument. HOWEVER -- there is still a bug here -- the vmbuilder script tries to be helpful with a warning message, but it ends up falling over and dying because it tries to print the message via a nonexistent attribute. So instead of a warning message, the user gets a cryptic exception backtrace.