Bug 783366

Summary: aeolus-image status --providerimage displays push status as completed even if not pushed.
Product: [Retired] CloudForms Cloud Engine Reporter: Aziza Karol <akarol>
Component: rubygem-aeolus-cliAssignee: Martyn Taylor <mtaylor>
Status: CLOSED ERRATA QA Contact: Martyn Taylor <mtaylor>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: morazi, slinaber
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-05-15 19:54:30 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-01-20 06:33:41 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.Build a mock image and verify the push status without pushing the image.

# aeolus-image build --target mock --template RHEL61.tpl 
Invalid gemspec in [/usr/lib/ruby/gems/1.8/specifications/capybara-1.1.1.gemspec]: invalid date format in specification: "2011-09-04 00:00:00.000000000Z"
Target Image                             Target     Status        Image                                    Build                                    
------------------------------------     ------     ---------     ------------------------------------     ------------------------------------     
8b171a50-4169-48fc-8fac-69c62f286e1b     mock       COMPLETED     6c2705eb-6817-4fa5-98fa-4ac83bf0808a     d9334787-3d59-4b81-af29-d9e79419e270     


# aeolus-image status --providerimage 8b171a50-4169-48fc-8fac-69c62f286e1b
Invalid gemspec in [/usr/lib/ruby/gems/1.8/specifications/capybara-1.1.1.gemspec]: invalid date format in specification: "2011-09-04 00:00:00.000000000Z"
Push Status: COMPLETED


If we give provider image as targetimage,the push status is displayed as completed.Infact i Have not pushed the image at all.



Expected results:
validation message "Image is not pushed or yet to be pushed" should be displayed.


Additional info:
rpm -qa | grep aeolus
rubygem-aeolus-image-0.3.0-3.el6.noarch
rubygem-aeolus-cli-0.3.0-4.el6.noarch
aeolus-conductor-doc-0.8.0-8.el6.noarch
aeolus-configure-2.5.0-5.el6.noarch
aeolus-conductor-daemons-0.8.0-8.el6.noarch
aeolus-all-0.8.0-8.el6.noarch
aeolus-conductor-0.8.0-8.el6.noarch
aeolus-conductor-devel-0.8.0-8.el6.noarch

Comment 1 wes hayutin 2012-01-20 10:40:15 UTC
Nice bug.. Can you duplicate w/ one of the other providers or is this only mock?

Comment 2 Aziza Karol 2012-01-20 10:54:26 UTC
It happens with ec2 ,vsphere also.

EC2:
aeolus-image build --target ec2 --template fedora15.tpl 
Target Image                             Target     Status       Image                                    Build                                    
------------------------------------     ------     --------     ------------------------------------     ------------------------------------     
f676baed-b09e-428d-bd1a-ab22401be4bc     ec2        BUILDING     fb4ece7b-11e4-4d51-9fc2-e910b28efdb6     6edaf9d4-0c59-47cf-9fb0-32198054b7a6     


# aeolus-image status --providerimage f676baed-b09e-428d-bd1a-ab22401be4bc
Push Status: COMPLETED



Vsphere:
# aeolus-image build --target vsphere --template fedora15.tpl 
Target Image                             Target      Status       Image                                    Build                                    
------------------------------------     -------     --------     ------------------------------------     ------------------------------------     
adb6af8f-3d93-4c69-a908-08706467f240     vsphere     BUILDING     2c22bd3a-feb5-48f7-8db2-e0762baf32b7     b31648a5-9e3f-46b1-8f51-4b5f7dc11a75     

# aeolus-image status --providerimage adb6af8f-3d93-4c69-a908-08706467f240
Push Status: COMPLETED

Comment 3 Martyn Taylor 2012-01-26 16:51:47 UTC
This was caused due to us using Builders in factory to determine status.

Builders represents the Build and Push jobs.  The status command was not checking whether it was either build or push job.

Hence entering a targetimage ID into provider image status may result in COMPLETED when in fact it does not exist, and vica versa.

[aeoolus-image-rubygem]

commit 005cdfe004ae6e3e6ec5b2f49449a4eefa03a90f
Author: Martyn Taylor <mtaylor>
Date:   Tue Jan 24 16:43:55 2012 +0000

    BZ#783366 Check Operation on Status Call

Comment 4 Steve Linabery 2012-01-27 06:37:38 UTC
005cdfe in rubygem-aeolus-image-0.3.0-5

Comment 5 Aziza Karol 2012-01-31 05:15:02 UTC
Validation done.


# aeolus-image build --target ec2 --template fedora15.tpl 
Image                                    Build                                    Target Image                             Target     Status       
------------------------------------     ------------------------------------     ------------------------------------     ------     --------     
945a5233-df00-431e-893a-d6ecfddc9606     4f7ac59d-c433-47ba-b61f-d9721403407f     af857675-a3ce-4464-9ac4-7e16ac282605     ec2        BUILDING     


# aeolus-image status --providerimage  945a5233-df00-431e-893a-d6ecfddc9606

ERROR:  ProviderImageStatusNotFound => Could not find status for ProviderImage 945a5233-df00-431e-893a-d6ecfddc9606


# rpm  -qa | grep aeolus
aeolus-conductor-0.8.0-16.el6.noarch
rubygem-aeolus-cli-0.3.0-7.el6.noarch
aeolus-conductor-daemons-0.8.0-16.el6.noarch
aeolus-conductor-doc-0.8.0-16.el6.noarch
aeolus-all-0.8.0-16.el6.noarch
aeolus-configure-2.5.0-11.el6.noarch
rubygem-aeolus-image-0.3.0-6.el6.noarch

Comment 6 errata-xmlrpc 2012-05-15 19:54:30 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-0591.html