Bug 740902

Summary: aeolus-image: catch errors more broadly
Product: [Retired] CloudForms Cloud Engine Reporter: wes hayutin <whayutin>
Component: rubygem-aeolus-imageAssignee: Martyn Taylor <mtaylor>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, dajohnso, jlaska, morazi, ssachdev
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: rubygem-aeolus-cli-0.1.0-4.el6.noarch Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-22 17:27:46 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 wes hayutin 2011-09-23 17:49:03 UTC
Description of problem:

aeolus-image can error out due to all sorts of reasons.  In this particular cases it errored out because warehouse was down.  Can we try to catch these errors in a broad way and return a human readable error to the console.

[root@unused ~]# aeolus-image import --provider ec2-us-east-1 --target ec2 --id ami-5e837b37

/usr/lib/ruby/gems/1.8/gems/aeolus-image-0.1.0/lib/aeolus_image/command/import_command.rb:45:in `import_image': undefined method `[]' for #<Qmf2::QmfAgentException:0x7fd2d05389f0> (NoMethodError)
	from /usr/lib/ruby/gems/1.8/gems/aeolus-image-0.1.0/lib/aeolus_image/command/config_parser.rb:227:in `import'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-image-0.1.0/lib/aeolus_image/command/config_parser.rb:38:in `send'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-image-0.1.0/lib/aeolus_image/command/config_parser.rb:38:in `process'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-image-0.1.0/bin/aeolus-image:20
	from /usr/bin/aeolus-image:19:in `load'
	from /usr/bin/aeolus-image:19
2011-09-23 13:39:29 warning Connection [46910 localhost:5672] closed
[root@unused ~]# 

[root@unused ~]# rpm -qa | grep aeolus
[root@unused ~]#

Comment 1 Jason Guiditta 2011-09-23 19:31:59 UTC
This is another one that I think should be put on hold until the current refactor Martyn is working on is done.  He is currently revamping interaction between every component aeolus-image talks to, so any enhancements here would be better added once that is done, imo

Comment 2 wes hayutin 2011-09-23 19:55:53 UTC
ok.. Martyn just throw this back on_qa when your new code is in the git repo or aeolus-testing.


Comment 3 wes hayutin 2011-09-28 16:38:23 UTC
making sure all the bugs are at the right version for future queries

Comment 5 Martyn Taylor 2011-11-11 16:57:34 UTC
Fixed in these commits


commit 42b14c059249fc3b54a98f4e8a113093da086026
Author: Martyn Taylor <mtaylor@redhat.com>
Date:   Thu Nov 10 17:40:44 2011 +0000

    Utilize Conductor API Error Messaging


commit 84178995537267b14782c9ab8de19e23cea25a66
Author: Richard Su <rwsu@redhat.com>
Date:   Thu Nov 10 13:54:55 2011 -0800

    BZ 749349 - enhance conductor api validation - v2
    Before starting build, validate target values exist.
    Validate account name, image id, build id, and target image id used in push.
    Convert messages to Aeolus::Conductor::API exceptions.

Comment 6 Aziza Karol 2011-11-21 06:58:23 UTC
An error message is thrown in imagefactory when we tried to build when warehouse is down.
[root@dell-pem710-01 ~]# tail -f /var/log/imagefactory.log 
2011-11-21 00:52:09,793 ERROR imgfac.rest.imagefactory pid(8261) Message: "Problem encountered trying to reach image warehouse. Please check that iwhd is running and reachable.

Target value validation:
[root@dell-pem710-01 templates]#  aeolus-cli build --target ec --template fedora15.tpl 
ERROR:  TargetNotFound => Could not find target ec

Targetimage validation
[root@dell-pem710-01 templates]# aeolus-cli push --account aziza_e --targetimage  d7af01e-0146-4f75-a758-388695282b1
ERROR:  TargetImageNotFound => Could not find TargetImage 2d7af01e-0146-4f75-a758-388695282b1

Build validation
[root@dell-pem710-01 templates]# aeolus-cli push --account aziza_eu --build  2d7af01e-0146-4f75-a758-388695282b16
ERROR:  BuildNotFound => Could not find Build 2d7af01e-0146-4f75-a758-388695282b16

Image validation
[root@dell-pem710-01 templates]# aeolus-cli push --account aziza_eu --image  2d7af01e-0146-4f75-a758-388695282b16

ERROR:  ImageNotFound => Could not find Image 2d7af01e-0146-4f75-a758-388695282b16

Account name validation
[root@dell-pem710-01 templates]# aeolus-cli push --account aziza_e --targetimage  2d7af01e-0146-4f75-a758-388695282b16
ERROR:  ProviderAccountNotFound => Could not find provider account for name aziza_e

[root@dell-pem710-01 ~]# rpm -qa | grep aeolus

Comment 7 James Laska 2011-11-22 17:26:39 UTC
Thanks for the test feedback Aziza.  Since the release includes the fixes mentioned in comment#5, I'm moving this bug to VERIFIED and CLOSED CURRENTRELEASE.  Please update if I have misunderstood your feedback.

Comment 8 wes hayutin 2011-11-28 01:22:05 UTC
removing bugs from tracker as part of 0.6 release