Bug 788831

Summary: Push fails for ec2 with error "M2Crypto.RSA.RSAError: no start line".
Product: [Retired] CloudForms Cloud Engine Reporter: Aziza Karol <akarol>
Component: imagefactoryAssignee: Ian McLeod <imcleod>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kočí <mkoci>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, brad, dajohnso, deltacloud-maint, dgao, ssachdev, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-30 17:12:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Aziza Karol 2012-02-09 05:26:03 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Build image for ec2
2.Push  image of ec2-us-east-1
# aeolus-image push --account  aziza_east  --image 8af91d64-61d6-4b19-86b9-d7b2c48af37b
Image                                    Provider Image                           Provider          Account        Status     
------------------------------------     ------------------------------------     -------------     ----------     ------     
8af91d64-61d6-4b19-86b9-d7b2c48af37b     c6d9c195-718a-4b78-8c8d-bee682f2a0f2     ec2-us-east-1     aziza_east     New        



imagefactory.log:
2012-02-09 00:11:00,200 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder thread(c6d9c195) Message: Exception caught in ImageFactory
2012-02-09 00:11:00,201 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder thread(c6d9c195) Message: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line 458, in push_image
    credentials)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line 688, in push_image_snapshot_ec2
    stdout, stderr, retcode = self.guest.guest_execute_command(guestaddr, command)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line 72, in guest_execute_command
    return super(FedoraRemoteGuest, self).guest_execute_command(guestaddr, command, timeout, tunnels)
  File "/usr/lib/python2.6/site-packages/oz/RedHat.py", line 476, in guest_execute_command
    command, timeout, tunnels)
  File "/usr/lib/python2.6/site-packages/oz/ozutil.py", line 355, in ssh_execute_command
    return subprocess_check_output(cmd)
  File "/usr/lib/python2.6/site-packages/oz/ozutil.py", line 323, in subprocess_check_output
    raise SubprocessException("'%s' failed(%d): %s" % (cmd, retcode, stderr), retcode)
SubprocessException: 'ssh -i /tmp/tmpeEkB0M -F /dev/null -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no root.amazonaws.com euca-bundle-vol -c /tmp/tmpc7Ltss -k /tmp/tmpSm1i85 -u 9598-0080-3741 -e /mnt,/tmp,/root/.ssh --arch x86_64 -d /mnt/bundles --kernel aki-427d952b -p c6d9c195-718a-4b78-8c8d-bee682f2a0f2 -s 10240 --ec2cert /tmp/cert-ec2.pem --fstab /etc/fstab -v /' failed(1): Warning: Permanently added 'ec2-107-20-128-228.compute-1.amazonaws.com,107.20.128.228' (RSA) to the list of known hosts.^M
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00322891 s, 325 MB/s
mke2fs 1.41.14 (22-Dec-2010)
Traceback (most recent call last):
  File "/usr/bin/euca-bundle-vol", line 492, in <module>
    main()
  File "/usr/bin/euca-bundle-vol", line 467, in main
    ancestor_ami_ids,
  File "/usr/lib/python2.7/site-packages/euca2ools/__init__.py", line 1008, in generate_manifest
    user_priv_key = RSA.load_key(private_key_path)
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 351, in load_key
    return load_key_bio(bio, callback)
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 372, in load_key_bio
    rsa_error()
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 302, in rsa_error
    raise RSAError, m2.err_reason_error_string(m2.err_get_error())
M2Crypto.RSA.RSAError: no start line
2012-02-09 00:11:00,202 DEBUG imgfac.BuildJob.BuildJob thread(c6d9c195) Message: Builder (c6d9c195-718a-4b78-8c8d-bee682f2a0f2) changed status from PUSHING to FAILED
2012-02-0



Additional info:
#rpm -qa | egrep 'aeolus|imagefactory'
rubygem-imagefactory-console-0.4.0-1.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc4_2_gf16dfc5-1.el6.noarch
aeolus-configure-2.5.0-12.el6.noarch
aeolus-conductor-doc-0.8.0-24.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc4_2_gf16dfc5-1.el6.noarch
rubygem-aeolus-cli-0.3.0-8.el6.noarch
aeolus-conductor-0.8.0-24.el6.noarch
imagefactory-1.0.0rc4_2_gf16dfc5-1.el6.noarch
rubygem-aeolus-image-0.3.0-7.el6.noarch
aeolus-all-0.8.0-24.el6.noarch
aeolus-conductor-daemons-0.8.0-24.el6.noarch

Comment 1 wes hayutin 2012-02-14 22:31:02 UTC
I have not seen this error, but its a good one.
Not very reproducible

Comment 2 Ian McLeod 2012-02-20 18:57:50 UTC
This is almost always a result of malformed EC2 credentials, specifically, the X509 certificates.  Please ensure that you've got those entered into conductor correctly and that they are valid.

If you can reproduce under those conditions, please bump back to me.

Comment 3 wes hayutin 2012-02-23 17:30:23 UTC
http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job/nightly-cloudEngine-smokeTest-RHEL/245/console

verified 

[root@qeblade32 ~]# rpm -qa | grep imagefactory
imagefactory-jeosconf-ec2-rhel-1.0.0rc5-1.el6.noarch
rubygem-imagefactory-console-0.4.0-1.el6.noarch
imagefactory-1.0.0rc5-1.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc5-1.el6.noarch