[debdiff] vm-builder dies with: AttributeError: 'VM' object has no attribute 'ec2'

Bug #403216 reported by Jamie Strandboge
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
VMBuilder
Fix Released
Undecided
Unassigned
vm-builder (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Running the following command traces back:

$ vmbuilder kvm ubuntu --suite=hardy --dest=/home/jamie/vms/kvm/test12-hardy-i386 --hostname=test12-hardy-i386 --mirror=http://debmirror.local/ubuntu --rootsize=512 --swapsize=32 --kernel-flavour=386 --components=main,restricted,universe,multiverse --libvirt=qemu:///system --arch=i386 --exec=/tmp/vm-new-setup-h9vU6N --ssh-key=/home/jamie/.ssh/id_rsa.pub --user=jamie --mem=64 --addpkg=lsb-release --security-mirror=http://debmirror.local/ubuntu --debug
2009-07-22 15:40:43,136 DEBUG : add_part - begin 0, length 512, end 511
2009-07-22 15:40:43,137 DEBUG : add_part - begin 512, length 32, end 543
2009-07-22 15:40:43,137 DEBUG : ip: dhcp
2009-07-22 15:40:43,138 DEBUG : Checking if --exec PATH exists: /tmp/vm-new-setup-h9vU6N
2009-07-22 15:40:43,163 DEBUG : ['locale-gen', 'en_US.UTF-8']
2009-07-22 15:40:43,766 DEBUG : Generating locales...
2009-07-22 15:40:43,767 DEBUG : en_US.UTF-8... up-to-date
2009-07-22 15:40:43,768 DEBUG : Generation complete.
2009-07-22 15:40:43,768 DEBUG : Oh, dear, an exception occurred
2009-07-22 15:40:43,768 INFO : Cleaning up
2009-07-22 15:40:43,769 DEBUG : ['rm', '/tmp/tmpxvy2uN']
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 29, in <module>
    VMBuilder.run()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/__init__.py", line 65, in run
    frontend.run()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/cli/__init__.py", line 68, in run
    vm.create()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 476, in create
    self.preflight_check()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 426, in preflight_check
    self.call_hooks('preflight_check')
  File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 179, in call_hooks
    getattr(self.distro, func)()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 139, in preflight_check
    if self.vm.ec2:
AttributeError: 'VM' object has no attribute 'ec2'

ProblemType: Bug
Architecture: amd64
Date: Wed Jul 22 15:49:38 2009
DistroRelease: Ubuntu 9.10
Package: python-vm-builder 0.11-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.28-13.45-generic
SourcePackage: vm-builder
Uname: Linux 2.6.28-13-generic x86_64

Related branches

Revision history for this message
Jamie Strandboge (jdstrand) wrote :
tags: added: regression-potential
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Marking 'High' due to making the package totally unusable for me.

Changed in vm-builder (Ubuntu):
importance: Undecided → High
Dominic Evans (oldmanuk)
Changed in vm-builder (Ubuntu):
status: New → Confirmed
Revision history for this message
Dominic Evans (oldmanuk) wrote :

attaching simple patch to check for the ec2 attr allows the vm-builder to continue (although it breaks later on creating the partitions due to problems with parted)

$ patch -p0 < check-ec2-attr.patch

summary: - vm-builder dies with: AttributeError: 'VM' object has no attribute 'ec2'
+ [patch] vm-builder dies with: AttributeError: 'VM' object has no
+ attribute 'ec2'
Revision history for this message
Dominic Evans (oldmanuk) wrote : Re: [patch] vm-builder dies with: AttributeError: 'VM' object has no attribute 'ec2'

debdiff

Revision history for this message
Dominic Evans (oldmanuk) wrote :
summary: - [patch] vm-builder dies with: AttributeError: 'VM' object has no
+ [debdiff] vm-builder dies with: AttributeError: 'VM' object has no
attribute 'ec2'
Revision history for this message
Dominic Evans (oldmanuk) wrote :

updated to also include fix for bug 399428 (parted linux-swap --> linux-swap(new)) and another fix for the replacement of vol_id with blkid in karmic (for mapping UUID to dev names)

hope it is ok to include these in the same new upload

Revision history for this message
Dominic Evans (oldmanuk) wrote :
Revision history for this message
Dominic Evans (oldmanuk) wrote :

hold off actually as that blkid fix is invalid, will upload fixed version shortly

Revision history for this message
Dominic Evans (oldmanuk) wrote :

fixed to correctly use 'blkid -s UUID -o value /dev/name' as replacement for 'vol_id --uuid /dev/name'

Revision history for this message
Dominic Evans (oldmanuk) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Hey, both the blkid and the ec2 attr bugs have been fixed differently in the bzr tip. Only the swap change is still relevant.

Could you perhaps request a merge of a branch based of bzr tip with the swap fix alone?

I don't have commit access myself so I can't sponsor anything here.

Changed in vmbuilder:
status: New → Fix Committed
Revision history for this message
Loïc Minier (lool) wrote :

Nevermind, the packaging isn't in Bzr. I'ved fixed control to reflect this and merged your changes as patches.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vm-builder - 0.11-0ubuntu2

---------------
vm-builder (0.11-0ubuntu2) karmic; urgency=low

  * Add simple-patchsys.
  * Drop Vcs-Bzr as the repo doesn't include packaging.
  * New patch, 60_blkid_support, allows blkid and not only vol_id as the
    latter is gone in karmic; from r316; LP: #395950.
  * New patch, 61_ec2-exception, allow creating VMs when the EC2 plugin isn't
    used; from r324; LP: #403216.
  * New patch, 62_parted-swap-syntax, fixed creation of swap partition with
    new parted syntax; thanks Dominic Evans; from the debdiff in LP #403216.
  * Add ${misc:Depends} to Depends.

 -- Loic Minier <email address hidden> Thu, 30 Jul 2009 19:54:46 +0200

Changed in vm-builder (Ubuntu):
status: Confirmed → Fix Released
Soren Hansen (soren)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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