Bug 740902 - aeolus-image: catch errors more broadly
Summary: aeolus-image: catch errors more broadly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: rubygem-aeolus-image
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Martyn Taylor
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-23 17:49 UTC by wes hayutin
Modified: 2012-01-26 12:24 UTC (History)
5 users (show)

Fixed In Version: rubygem-aeolus-cli-0.1.0-4.el6.noarch
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-22 17:27:46 UTC
Embargoed:


Attachments (Terms of Use)

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
aeolus-conductor-doc-0.4.0-0.20110922165939git5b371be.fc15.noarch
aeolus-conductor-0.4.0-0.20110922165939git5b371be.fc15.noarch
aeolus-conductor-daemons-0.4.0-0.20110922165939git5b371be.fc15.noarch
aeolus-all-0.4.0-0.20110922165939git5b371be.fc15.noarch
aeolus-conductor-devel-0.4.0-0.20110922165939git5b371be.fc15.noarch
aeolus-configure-2.0.2-4.20110921102958gitcaa9608.fc15.noarch
rubygem-aeolus-image-0.1.0-3.20110922120732gita0b9a44.fc15.noarch
[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.

Thanks!

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

aeolus-cli:

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

    Utilize Conductor API Error Messaging

conductor:

commit 84178995537267b14782c9ab8de19e23cea25a66
Author: Richard Su <rwsu>
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
rubygem-rack-mount-0.7.1-3.aeolus.el6.noarch
aeolus-conductor-doc-0.7.0-0.20111118205914git4c5036a.el6.noarch
rubygem-aeolus-cli-0.1.0-4.el6.noarch
rubygem-arel-2.0.10-0.aeolus.el6.noarch
rubygem-aeolus-image-0.1.0-6.el6.noarch
aeolus-configure-2.4.0-0.20111118150133gitde3c009.el6.noarch
aeolus-all-0.7.0-0.20111118205914git4c5036a.el6.noarch
aeolus-conductor-0.7.0-0.20111118205914git4c5036a.el6.noarch
rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch
aeolus-conductor-daemons-0.7.0-0.20111118205914git4c5036a.el6.noarch

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


Note You need to log in before you can comment on or make changes to this bug.