NameError: global name 'VMBuilderException' is not defined, raised when calling vmbuild with an unknown suite

Bug #281801 reported by Johan Euphrosine
2
Affects Status Importance Assigned to Milestone
VMBuilder
Fix Released
Undecided
Nick Barcet
vm-builder (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

proppy@kun:~/Desktop/vmbuilder$ sudo ./vmbuilder kvm ubuntu --suite foo
Traceback (most recent call last):
  File "./vmbuilder", line 29, in <module>
    VMBuilder.run()
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/__init__.py", line 66, in run
    frontend.run()
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/plugins/cli/__init__.py", line 52, in run
    vm.create()
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/vm.py", line 418, in create
    self.preflight_check()
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/vm.py", line 384, in preflight_check
    self.call_hooks('preflight_check')
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/vm.py", line 162, in call_hooks
    getattr(self.distro, func)()
  File "/home/proppy/Desktop/vmbuilder/VMBuilder/plugins/ubuntu/distro.py", line 92, in preflight_check
    raise VMBuilderException('Invalid suite. Valid suites are: %s' % ' '.join(self.suites))
NameError: global name 'VMBuilderException' is not defined

The attached patch should reproduce and correct this issue.

Revision history for this message
Johan Euphrosine (proppy) wrote :
Revision history for this message
Nick Barcet (nijaba) wrote :

Thanks a lot for the report and the patch. Will integrate this ASAP.

Changed in vmbuilder:
assignee: nobody → nijaba
status: New → Confirmed
Nick Barcet (nijaba)
Changed in vmbuilder:
status: Confirmed → Fix Committed
Changed in vm-builder:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vm-builder - 0.9-0ubuntu3

---------------
vm-builder (0.9-0ubuntu3) intrepid; urgency=low

  [ Johan Euphrosine ]
  * Fix exception when suite provided does not exist (LP: #281801)
    and provide unit test for it.

  [ Chuck Short ]
  * Added parameters required for EC2 plugin.
  * Use ec2_name instead of hostname when submitting an AMI.
  * Update xen_kernel_path and xen_ramdisk_path for intrepid.
  * Default to amazon kernels/ramdisk pairs for now.
  * Split out ec2 module into its own package. (LP: #284762)

  [ Nicolas Barcet ]
  * Error out if domain is undefined (LP: #280125)
  * Fix --dest so that it is actually used now (LP: #280091)
  * Fix -c handling, values are now used (LP: #279159)
  * Create /var/run/network to fix bug LP: #276365
  * Handle fsimage type vms (Xen) in fstab and (hopefully) libvirt (LP: #282109)
  * Components where not parsed correctly (LP: #283263)
  * preflight_check() was called twice in a row in vm.py for no aparant
    reasons
  * Change default suite to intrepid
  * Intrepid needs groot=uuid, else update-grub tries to outsmart us later on
    and it won't boot as it cannot guess the uuid right.
  * Couple fixes when calling devletters, which is a function
  * Double parenthesis removed in devicemap.tmpl
  * Added function isDomain to fix bug LP: #284746
  * Documented unusual conf name value in help to fix bug LP: #284614
  * Fixed a bug in set_defaults occuring on reading untyped value from the
    configuration file
  * Match ec2 vocabulary by adding option name and clarifying help
    (LP: #284765, LP: #285170, LP: #285165)
  * Added a check for xen hypervisor when ec2 is selected (LP: #285191)
  * Added checks for presence of bucket, access key and secret key for ec2
    (LP: #284757)
  * Older suite need 128 bit inode for grub to recognize os. Thanks to Albert
    Damen for the pointer (LP: #285093)
  * The libvirt plugin now errors out if used with something else than KVM, as
    nothing else is supported yet.
  * Write out disk info in vmware's .vmx, converting it to use template while
    at it (LP: #286487)
  * Add 'config.version = "8"' to vmware.tmpl to fix LP: #286531

  [ Mathias Gug ]
  * Fix --templates option.

  [ Soren Hansen ]
  * Create /var/{run,lock} on the root filesystem, just like d-i.

 -- Soren Hansen <email address hidden> Fri, 24 Oct 2008 13:15:23 +0200

Changed in vm-builder:
status: Fix Committed → Fix Released
Nick Barcet (nijaba)
Changed in vmbuilder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.