Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 818121

Summary: Build/Push button available for deleted imported images.
Product: [Retired] CloudForms Cloud Engine Reporter: Aziza Karol <akarol>
Component: aeolus-conductorAssignee: Angus Thomas <athomas>
Status: CLOSED ERRATA QA Contact: Rehana <aeolus-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: asettle, cpelland, dajohnso, dmacpher, hbrock, morazi, slinaber, whayutin
Target Milestone: beta6Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: aeolus-conductor-0.13.23-1.el6cf Doc Type: Bug Fix
Doc Text:
When deleting imported images using --targetimage or --building option, the build option was still available and 'Unable to Upload Provider Image' was displayed in UI. This fix deletes the provider image so the build option is no longer available to deleted imported images.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 15:07:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
push button
none
build option none

Description Aziza Karol 2012-05-02 09:42:53 UTC
Description of problem:

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


How reproducible:


Steps to Reproduce:
1.Import an ec2 image.
# aeolus-image import --account ec2-ap-southeast-1  --id ami-c8f3b49a   --environment default --description '<image><name>My Image</name></image>' 
Image                                    Build                                    Target Image                             Provider Image                           Status       
------------------------------------     ------------------------------------     ------------------------------------     ------------------------------------     --------     
a96c08d0-9e66-4ece-aef5-0fecb5581eb7     b6207945-3ba5-4727-97f2-0ff7a5a85de2     6088c879-39ec-48dc-8c0a-69f3cf300ef4     be040748-035f-41fa-b836-cefe9d576d3e     COMPLETE   

#aeolus-image  list -i
ID                                       Name            Environment     OS         OS Version     Arch       Description        
------------------------------------     -----------     -----------     ------     ----------     ------     --------------     
8ea1f4e8-9411-11e1-a986-0024e878a312     RHEL5-Basic     default         RHEL-5     U7             x86_64     RHEL57 x86_64      
a96c08d0-9e66-4ece-aef5-0fecb5581eb7     My Image        default                                                                 

  

2.Try deleting provider image using provider image  option.
#aeolus-image delete aeolus-image delete --providerimage be040748-035f-41fa-b836-cefe9d576d3e
Provider Image: be040748-035f-41fa-b836-cefe9d576d3e Deleted Successfully

N.B. The following provider content must be manually removed

Provider               ID               
------------------     ------------     
ec2-ap-southeast-1     ami-c8f3b49a     

  
3.Navigate to the image list in UI and click on the imported image name.
push button is available. click on push button.

Actual results:
Unable to Upload Provider Image is displayed in UI.see attached screenshot.

similary when you try deleting imported image using --targetimage or --build option, build option is available. see attached screenshot.


Expected results:
Build/Push button should not me made available for deleted imported image as Imported image can't be built or pushed.



imagefactory.log:
ssion ($build == "b6207945-3ba5-4727-97f2-0ff7a5a85de2" && $target == "ec2")
2012-05-02 01:41:50,240 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 7) Message: Getting metadata (['template']) from http://localhost:9090/target_images/6088c879-39ec-48dc-8c0a-69f3cf300ef4
2012-05-02 01:41:50,241 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 7) Message: Image Warehouse returned status (404) with message: 
2012-05-02 01:41:50,241 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 7) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images)
2012-05-02 01:41:50,241 ERROR imgfac.rest.imagefactory thread(worker 7) Message: 'template' must be a UUID, URL, XML string or XML document path...
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 191, in push_image
    job = BuildDispatcher().push_image_to_providers(image_id, build_id, (provider, ), credentials)[0]
  File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 83, in push_image_to_providers
    job = job_cls(template, target, image_id, build_id, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/imgfac/BuildJob.py", line 49, in __init__
    self.template = template if isinstance(template, Template) else Template(template)
  File "/usr/lib/python2.6/site-packages/imgfac/Template.py", line 79, in __init__
    raise ValueError("'template' must be a UUID, URL, XML string or XML document path...")
ValueError: 'template' must be a UUID, URL, XML string or XML document path...
2012-05-02 01:41:50,242 ERROR imgfac.rest.imagefactory thread(worker 7) Message: HTTP Response 500
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 212, in create_provider_image
    return push_image(image_id, build_id, target_image_id)
  File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 60, in decorated_function
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 202, in push_image
    raise HTTPResponse(status=500, output=e)
HTTPResponse: HTTP Response 500


Additional info:
rpm  -qa | grep aeolus
aeolus-configure-2.5.3-1.el6.noarch
aeolus-conductor-0.8.13-1.el6_2.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.3.1-1.el6.noarch
aeolus-all-0.8.13-1.el6_2.noarch
aeolus-conductor-doc-0.8.13-1.el6_2.noarch
aeolus-conductor-daemons-0.8.13-1.el6_2.noarch

Comment 1 Aziza Karol 2012-05-02 09:43:47 UTC
Created attachment 581552 [details]
push button

Comment 2 Aziza Karol 2012-05-02 09:44:26 UTC
Created attachment 581553 [details]
build option

Comment 3 Dave Johnson 2012-05-02 16:03:58 UTC
The key is to only delete the provider image which is everything in terms of a imported image.

Comment 6 Steve Linabery 2012-10-29 21:05:56 UTC
believed to be fixed in aeolus-conductor-0.13.23-1.el6cf

Comment 9 errata-xmlrpc 2012-12-04 15:07:19 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-1516.html