ec2-bundle-image gives error 'can't convert Fixnum into String' with ruby 1.9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ec2-ami-tools (Ubuntu) |
Medium
|
Unassigned |
Bug Description
$ ec2-bundle-image --cert cert.pem --privatekey pk.pem --user 123456789012 --image my.img --arch i386 --debug
Bundling image file...
ERROR: can't convert Fixnum into String
#<TypeError: can't convert Fixnum into String>
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
I found this when trying with real cert.pem and pk.pem and user, but the error occurs before those things are actually tested, so you can do:
mkdir foo; cd foo
img=my.img; cert=cert.pem; pk=pk.pem; user=123456789012
truncate --size 1M $img
mke2fs -F $img
touch $cert $pk
ec2-bundle-image --cert $cert --privatekey $pk --user $user --image $img --arch i386 --debug
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ec2-ami-tools 1.4.0.2-0ubuntu1
ProcVersionSign
Uname: Linux 3.5.0-19-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Mon Dec 10 11:07:25 2012
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-10-19 (418 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ec2-ami-tools
UpgradeStatus: Upgraded to quantal on 2011-11-07 (399 days ago)
Scott Moser (smoser) wrote : | #1 |
Scott Moser (smoser) wrote : | #2 |
Changed in ec2-ami-tools (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
summary: |
- ec2-bundle-image gives error 'can't convert Fixnum into String' + ec2-bundle-image gives error 'can't convert Fixnum into String' with + ruby 1.9 |
Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package ec2-ami-tools - 1.4.0.9-0ubuntu1
---------------
ec2-ami-tools (1.4.0.9-0ubuntu1) raring; urgency=low
* New upstream release 1.4.0.9 (2012-11-12)
* add knowledge of 'ap-southeast-2'
* add flag '--delegation-
credentials inside an ec2 instance.
* New upstream release 1.4.0.7 (2012-03-26)
* centralize the list of regions and locations ec2/amitools/
* add govcloud support, with
* public certificate to /ec2/amitools/
* knowledge of us-gov-west-1 region
* use pid in fifo name, which improves upstream for the same code
path that use-mktemp-
patch here still does a better job.
* debian/
rework to build upon existing functionality in upstream code.
upstream consolidated the lists to a single place.
* New upstream release 1.4.0.5 (2011-12-14)
* image bundle is now created with '--user 0' and '--group 0'.
This just avoids the local username getting into the tarball.
* ec2-bundle-vol: add --filter flag, with description
'Do not use the default filtered files list.'
* add knowledge of regions us-west-2 and sa-east-1
* debian/
update to work with ruby 1.9 (LP: #1088540)
* add debian/watch and update debian/rules to support uscan.
* debian/
fix some errors when running with ruby 1.9
-- Scott Moser <email address hidden> Mon, 10 Dec 2012 18:46:35 -0500
Changed in ec2-ami-tools (Ubuntu): | |
status: | Triaged → Fix Released |
Mike McClurg (mike-mcclurg) wrote : | #4 |
I'm having this problem on quantal as well, and had to install the raring version of ec2-ami-tools. Any chance for a backport to quantal?
This seems to be a change from ruby 1.8 to 1.9, that caused 'gen_ident' to be valid. .inject( "") {|ident, n| ident+(?A + Kernel. rand(26) ).chr}
basically, before it had:
##
# generate a unique identifier used for filenames
#
def gen_ident()
(0..19)
end
That needs updating to: 19).inject( "") {|ident, n| ident+(?A.ord + Kernel. rand(26) ).chr}
(0..