Bug 801193

Summary: Clicking on 'Test Connection' for an ec2 account gives 'undefined method `permissions' for nil:NilClass' error
Product: [Retired] CloudForms Cloud Engine Reporter: Ronelle Landy <rlandy>
Component: aeolus-conductorAssignee: Scott Seago <sseago>
Status: CLOSED ERRATA QA Contact: wes hayutin <whayutin>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, deltacloud-maint, redakkan, slinaber, ssachdev
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: v0.8.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-15 22:50:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
permissions error
none
end of rails.log none

Description Ronelle Landy 2012-03-07 21:54:43 UTC
Created attachment 568436 [details]
permissions error

Description of problem:

 - Ran aeolus-configure -p mock, ec2
 - Ran aeolus-configure -p rhevm
 - Ran aeolus-configure -p vsphere
 - Ran aeolus-restart-services
 - Started conductor - logged in as admin
 - Added account for rhevm and vsphere
 - Built and pushed images for vsphere and rhevm successfully
 - Added and account for ec2 - ec2-us-east-1
 - Built and image for ec2 
 - Tried to push the image ... failed (see error copied from .var/log/imagefactory.log)
 - Went to check ec2 account ... thinking there is an issue with creds
 - Clicked 'Cloud Resource Providers' -> 'ec2-us-east-1' -> 'ec2Account' -> 'Test Connection'

Conductor displayed:

Notices

    Test Connection Success: Valid Account Details

Errors
undefined method `permissions' for nil:NilClass

See attached screenshot.


***** Error from /var/log/imagefactory.log ******

 Permanently added 'ec2-50-19-76-213.compute-1.amazonaws.com,50.19.76.213' (RSA) to the list of known hosts.
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0031964 s, 328 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 994, in generate_manifest
    user_pub_key = X509.load_cert(cert_path).get_pubkey().get_rsa()
  File "/usr/lib64/python2.7/site-packages/M2Crypto/X509.py", line 611, in load_cert
    return load_cert_bio(bio)
  File "/usr/lib64/python2.7/site-packages/M2Crypto/X509.py", line 639, in load_cert_bio
    raise X509Error(Err.get_error())
M2Crypto.X509.X509Error: 140702711510816:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:696:Expecting: CERTIFICATE

*****************

RPMs tested:

rpm -qa |grep aeolus
aeolus-conductor-doc-0.8.0-41.el6.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.3.0-13.el6.noarch
aeolus-conductor-0.8.0-41.el6.noarch
aeolus-configure-2.5.0-18.el6.noarch
aeolus-conductor-daemons-0.8.0-41.el6.noarch
aeolus-all-0.8.0-41.el6.noarch


rpm -qa |grep image
imagefactory-1.0.0rc8-1.el6.noarch
genisoimage-1.1.9-11.el6.x86_64
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-imagefactory-console-0.4.0-1.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc8-1.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc8-1.el6.noarch

*********************************

The same certificates uploaded to ec2 Account in previous aeolus version did not give any errors:

rpm -qa |grep aeolus
rubygem-aeolus-image-0.3.0-10.el6.noarch
aeolus-configure-2.5.0-15.el6.noarch
aeolus-conductor-doc-0.8.0-38.el6.noarch
aeolus-conductor-daemons-0.8.0-38.el6.noarch
rubygem-aeolus-cli-0.3.0-11.el6.noarch
aeolus-all-0.8.0-38.el6.noarch
aeolus-conductor-0.8.0-38.el6.noarch

Comment 1 Scott Seago 2012-03-13 03:24:46 UTC
I'd like to see the stack trace from rails.log that corresponds to that permissions error.

I think I know what's going on, but the error I'm getting on my end is slightly different.

I'll submit a patch that fixes the error I'm seeing here, which I hope will fix the reported issue as well (it looks like a similar problem). Once I see that stacktrace I'll know for sure.

Comment 2 Scott Seago 2012-03-13 04:18:53 UTC
Patch posted here: https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009542.html

Comment 3 Ronelle Landy 2012-03-13 12:40:45 UTC
Created attachment 569661 [details]
end of rails.log

rails.log from the conductor instance where I saw the permissions error is large (over 19.6MB). I attached just the text from today - where I clicked on 'Test Connection' and saw the error again. If you need more of the log, you can pull it from: ibm-x3200m3-01.rhts.eng.bos.redhat.com (Beaker machine) or let me know and I'll attach the full log.

Comment 4 Scott Seago 2012-03-13 13:44:29 UTC
OK, from the log, it looks like you're hitting the same root cause that I hit, just at a different point in the view code, possibly due to unrelated differences in what's on the development tip and what's in the build you're testing with. The posted patch should resolve both issues just the same, so this should be resolved once the fix is ACKed and pushed.

Comment 5 Scott Seago 2012-03-15 23:07:20 UTC
Pushed to master at f9f53bcd0e96eef0875f4dd6e226d5aab267a11c

Comment 7 Rehana 2012-04-04 15:17:54 UTC
Able to build/push/ launch instance on ec2. and also the test connection was success-full.

verified on:

 rpm -qa | grep aeolus
rubygem-aeolus-image-0.3.0-12.el6.noarch
aeolus-conductor-0.8.7-1.el6.noarch
aeolus-conductor-doc-0.8.7-1.el6.noarch
aeolus-conductor-daemons-0.8.7-1.el6.noarch
aeolus-configure-2.5.2-1.el6.noarch
aeolus-all-0.8.7-1.el6.noarch
rubygem-aeolus-cli-0.3.1-1.el6.noarch

Comment 9 errata-xmlrpc 2012-05-15 22:50:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0583.html