Bug 765714 - image import successful with invalid entries.
Summary: image import successful with invalid entries.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Matt Wagner
QA Contact: wes hayutin
URL:
Whiteboard:
: 755052 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-09 07:56 UTC by Aziza Karol
Modified: 2014-08-17 22:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-30 17:15:45 UTC


Attachments (Terms of Use)
invalid image import (237.27 KB, image/png)
2011-12-09 07:57 UTC, Aziza Karol
no flags Details
rhev_import (209.17 KB, image/png)
2012-01-06 06:33 UTC, Shveta
no flags Details
vsphere_import (210.02 KB, image/png)
2012-01-06 06:34 UTC, Shveta
no flags Details
ec2_import (211.58 KB, image/png)
2012-01-06 06:35 UTC, Shveta
no flags Details

Description Aziza Karol 2011-12-09 07:56:58 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
Try importing image with  invalid Image id as  %^@)2.

UI displays image import successful.
see attached screenshot.


rails.log;
Started POST "/conductor/images/import" for 10.65.193.181 at Fri Dec 09 02:43:32 -0500 2011
  Processing by ImagesController#import as HTML
  Parameters: {"image_id"=>"%^&@)2", "commit"=>"Continue", "authenticity_token"=>"hnGc55KBFhZi0KC474OGsRqkchcKtj7rBe462ikHQRU=", "utf8"=>"✓", "provider"=>"7"}
  User Load (0.7ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
  Provider Load (0.5ms)  SELECT "providers".* FROM "providers" WHERE "providers"."id" = 7 LIMIT 1
  ProviderType Load (0.5ms)  SELECT "provider_types".* FROM "provider_types" WHERE "provider_types"."id" = 1 LIMIT 1
Redirected to https://hp-bl480c-01.rhts.eng.bos.redhat.com/conductor/images/0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9
Completed 302 Found in 974ms


Started GET "/conductor/images/0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9" for 10.65.193.181 at Fri Dec 09 02:43:33 -0500 2011
  Processing by ImagesController#show as HTML
  Parameters: {"id"=>"0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9"}


imagefactory.log;
2011-12-09 02:43:32,229 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images)
2011-12-09 02:43:32,232 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (500) with message: 
2011-12-09 02:43:32,232 INFO imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Creating a bucket returned status (500), .
2011-12-09 02:43:32,237 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'object_type': 'template', 'uuid': '8d452ff5-f93e-4e1c-848b-290544c61003'}) for http://localhost:9090/templates/8d452ff5-f93e-4e1c-848b-290544c61003
2011-12-09 02:43:32,327 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (500) with message: 
2011-12-09 02:43:32,328 INFO imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Creating a bucket returned status (500), .
2011-12-09 02:43:32,332 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'object_type': 'image', 'uuid': '0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9', 'template': '8d452ff5-f93e-4e1c-848b-290544c61003'}) for http://localhost:9090/images/0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9
2011-12-09 02:43:32,462 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (500) with message: 
2011-12-09 02:43:32,462 INFO imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Creating a bucket returned status (500), .
2011-12-09 02:43:32,467 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'timestamp': '1323416612.47', 'image': '0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9', 'object_type': 'build', 'uuid': '1f6ddbca-5b3b-42a2-ad52-9580faf8ece7'}) for http://localhost:9090/builds/1f6ddbca-5b3b-42a2-ad52-9580faf8ece7
2011-12-09 02:43:32,636 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "1f6ddbca-5b3b-42a2-ad52-9580faf8ece7" && $target == "mock")
2011-12-09 02:43:32,679 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (404) with message: 
2011-12-09 02:43:32,682 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (500) with message: 
2011-12-09 02:43:32,682 INFO imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Creating a bucket returned status (500), .
2011-12-09 02:43:32,687 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'build': '1f6ddbca-5b3b-42a2-ad52-9580faf8ece7', 'object_type': 'target_image', 'uuid': '7e29534c-2e42-4491-a6f2-692eb128c877', 'target': 'mock'}) for http://localhost:9090/target_images/7e29534c-2e42-4491-a6f2-692eb128c877
2011-12-09 02:43:32,857 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Querying (http://localhost:9090/provider_images/_query) with expression ($target_image == "7e29534c-2e42-4491-a6f2-692eb128c877" && $provider == "mock")
2011-12-09 02:43:32,899 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (404) with message: 
2011-12-09 02:43:32,902 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (500) with message: 
2011-12-09 02:43:32,902 INFO imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Creating a bucket returned status (500), .
2011-12-09 02:43:32,906 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'target_image': '7e29534c-2e42-4491-a6f2-692eb128c877', 'target_identifier': '%^&@)2', 'object_type': 'provider_image', 'uuid': 'fcbb02b2-38cc-443e-b220-422a49a1b1af', 'provider': 'mock'}) for http://localhost:9090/provider_images/fcbb02b2-38cc-443e-b220-422a49a1b1af
2011-12-09 02:43:33,118 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Getting metadata (['latest_build']) from http://localhost:9090/images/0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9
2011-12-09 02:43:33,121 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Image Warehouse returned status (404) with message: 
2011-12-09 02:43:33,122 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17810) Message: Setting metadata ({'latest_build': '1f6ddbca-5b3b-42a2-ad52-9580faf8ece7'}) for http://localhost:9090/images/0bb08e7b-c585-4db8-85a1-8f77d8a8e9f9
2011-12-09 02:43:34,182 DEBUG paste.httpserver.ThreadPool pid(17810) Message: Added task (0 tasks queued)



Expected results:
validation required.

Additional info:
[root@hp-bl480c-01 ~]# rpm -qa | grep aeolus
aeolus-conductor-0.7.0-4.el6.noarch
aeolus-configure-2.4.0-3.el6.noarch
aeolus-conductor-doc-0.7.0-4.el6.noarch
aeolus-all-0.7.0-4.el6.noarch
rubygem-aeolus-cli-0.2.0-3.el6.noarch
rubygem-aeolus-image-0.2.0-1.el6.noarch
aeolus-conductor-daemons-0.7.0-4.el6.noarch

Comment 1 Aziza Karol 2011-12-09 07:57:44 UTC
Created attachment 544383 [details]
invalid image import

Comment 3 Matt Wagner 2011-12-22 23:21:00 UTC
Pushed:

commit d98cb577e6206395d1a11785ce940806bac3ead6
Author: Matt Wagner <matt.wagner>
Date:   Fri Dec 16 15:48:30 2011 -0500

    Verify image exists before importing it from provider
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=765714

Comment 4 Aziza Karol 2011-12-26 07:09:34 UTC
Image import validation done.

Following message is displayed when import image with invalid image id.
"The requested image was not found on the provider". 

root@dell-pe2950-1 ~]# rpm -qa \ grep aeolus
[root@dell-pe2950-1 ~]# rpm -qa | grep aeolus
aeolus-conductor-daemons-0.8.0-0.20111222233342gitd98cb57.el6.noarch
rubygem-aeolus-image-0.3.0-0.20111222173411gitc13b654.el6.noarch
rubygem-aeolus-cli-0.3.0-0.20111222173356git3cd6277.el6.noarch
aeolus-all-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-configure-2.5.0-0.20111222173430git17b704a.el6.noarch
aeolus-conductor-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-conductor-doc-0.8.0-0.20111222233342gitd98cb57.el6.noarch

Comment 5 wes hayutin 2012-01-03 14:31:00 UTC
These bugs are verified, removing from ce-sprint

Comment 6 wes hayutin 2012-01-05 21:41:23 UTC
*** Bug 755052 has been marked as a duplicate of this bug. ***

Comment 7 wes hayutin 2012-01-05 21:42:10 UTC
This needs to be verified across ec2, rhevm, and vsphere..the text from the invalid imports needs to be pasted into the comments.

Comment 8 Shveta 2012-01-06 06:33:31 UTC
Created attachment 551091 [details]
rhev_import

Comment 9 Shveta 2012-01-06 06:34:20 UTC
Created attachment 551092 [details]
vsphere_import

Comment 10 Shveta 2012-01-06 06:35:00 UTC
Created attachment 551093 [details]
ec2_import

Comment 11 Shveta 2012-01-06 06:36:48 UTC
Tested for ec2, rhevm and vsphere
Following message is displayed when import image with invalid image id.
"The requested image was not found on the provider".

Screenshots attached .


Verified in 

rpm -qa|grep aeolus
aeolus-conductor-daemons-0.8.0-0.20111222233342gitd98cb57.el6.noarch
rubygem-aeolus-image-0.3.0-0.20111222173411gitc13b654.el6.noarch
rubygem-aeolus-cli-0.3.0-0.20111222173356git3cd6277.el6.noarch
aeolus-all-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-conductor-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-configure-2.5.0-0.20120104154940git196b80d.el6.noarch
aeolus-conductor-doc-0.8.0-0.20111222233342gitd98cb57.el6.noarch


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