Bug 847798
| Summary: | prevent editting provider name | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] CloudForms Cloud Engine | Reporter: | Dave Johnson <dajohnso> | ||||||
| Component: | aeolus-conductor | Assignee: | Jozef Zigmund <jzigmund> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Rehana <aeolus-qa-list> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 1.0.0 | CC: | akarol, asettle, athomas, aweiteka, cpelland, deltacloud-maint, dmacpher, jzigmund, morazi, mtaylor, redakkan, slinaber, ssachdev, sseago, sshveta, tzumainn | ||||||
| Target Milestone: | beta5 | Keywords: | Triaged | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: |
Due to name mismatches with Imagefactory configuration files, changing names for private cloud providers in Cloud Engine resulted in an internal server error when pushing images. This patch disables editing of the provider name, which provides a successful match with configuration files for private cloud providers.
|
Story Points: | --- | ||||||
| Clone Of: | 804926 | ||||||||
| : | 865833 (view as bug list) | Environment: | |||||||
| Last Closed: | 2012-12-04 15:16:05 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | 804926 | ||||||||
| Bug Blocks: | 865833 | ||||||||
| Attachments: |
|
||||||||
|
Description
Dave Johnson
2012-08-13 15:27:01 UTC
This bug isn't caused by Conductor. It's a bug in imagefactory. It's not clear from log above. In fact whole error is starting with WARNING like here: 2012-08-14 22:30:57,199 WARNING imgfac.BuildDispatcher.BuildDispatcher thread(worker 6) Message: No matching provider found for rhevm, using "condorcloud" by default. 2012-08-14 22:30:57,200 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 6) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "efcd1996-1ac1-4f87-9d69-dfe1f45efa99" && $target == "condorcloud") after then it continues: 2012-08-14 22:30:57,202 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 6) Message: Image Warehouse returned status (404) with message: 2012-08-14 22:30:57,202 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 6) Message: Getting metadata (['template']) from http://localhost:9090/target_images/None 2012-08-14 22:30:57,205 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 6) Message: Image Warehouse returned status (404) with message: 2012-08-14 22:30:57,205 DEBUG imgfac.ImageWarehouse.ImageWarehouse thread(worker 6) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images) 2012-08-14 22:30:57,205 ERROR imgfac.rest.imagefactory thread(worker 6) Message: 'template' must be a UUID, URL, XML string or XML document path... Traceback (most recent call last): and so on... The credentials to the RHEVM provider are comming from /etc/imagefactory/rhevm.json where are defined "rhevm-default", that has been created with aeolus-configure. I'd like to notice that also for ec2 provider must provider name starts with "ec2-", for "rackspace" only this string. Jozef's comments above are valid. However, the intention is to disable changing provider names in Conductor as a temporary solution, to avoid people triggering the bug. Work on the "proper" solution will be tracked in #804926 We have 2 ways how to do 'short-term' fix. 1) Disable to update of provider name We will add before_update callback to prevent updating the provider name. Pros: - easy fix Cons: - for upstream, it can be anoying to find out that provider name must be different (after setting up all things (provider accounts, hardware profiles, realms, permissions) for pushing image). The user would must to remove provider and create it again with all things that he set up before. 2) Validation before creating or updating the provider name We will add before_save callback, where we can check if the provider has right name and user could push image to it. If callback fails, then conductor will show flash message that provider name cannot be updated, because of incompatible name. Pros: - we will avoid the cons of 1) solution Cons: - a bit longer fix as in 1) solution .. actually we will implement the same way how imagefactory validates provider name I'll vote for 2nd solution.. what do you think about? Another vote for the second solution. The problem isn't _editing_ of the provider name, the problem is _setting_ the name to something that doesn't match what imagefactory expects. A user could just as well hit the problem on creation, setting the wrong name - and if we did the first solution, our "fix" would not let the user update the name to the correct value. Bugfix was post to the mailing list https://lists.fedorahosted.org/pipermail/aeolus-devel/2012-September/012475.html ACK'd and pushed to master:
commit e518009e9be2e5176a0344a33885f177dec0b393
Author: Jozef Zigmund <jzigmund>
Date: Thu Sep 6 11:07:35 2012 -0400
BZ 847798 - fix provider names in tests
Signed-off-by: Tzu-Mainn Chen <tzumainn>
commit 299f4f3748825f829e2f45c27f5bcd3d24587459
Author: Jozef Zigmund <jzigmund>
Date: Thu Sep 6 11:07:33 2012 -0400
This is short-term fix. It prevents setting of provider name,
that causes failing image push in imagefactory.
https://bugzilla.redhat.com/show_bug.cgi?id=847798
Signed-off-by: Tzu-Mainn Chen <tzumainn>
in build aeolus-conductor-0.13.3-1.el6cf Retested, Observed that user is still allowed to edit the cloud provider's name and push all operation shows the same error . moving in to assigned rpm -qa | grep aeolus aeolus-conductor-doc-0.13.14-1.el6cf.noarch rubygem-aeolus-image-0.3.0-12.el6.noarch aeolus-all-0.13.14-1.el6cf.noarch aeolus-conductor-0.13.14-1.el6cf.noarch rubygem-aeolus-cli-0.7.2-1.el6cf.noarch aeolus-configure-2.8.7-1.el6cf.noarch aeolus-conductor-daemons-0.13.14-1.el6cf.noarch Per Dave I'd like to get this retested and see if those only applies to specific providers. Created attachment 625261 [details]
Edit Provider name not allowed if not in config file
I am not able to edit and change the provider name to something
which imagefactory doesnt expects.
rpm -qa|grep aeolus
aeolus-conductor-0.13.18-1.el6cf.noarch
aeolus-conductor-daemons-0.13.18-1.el6cf.noarch
aeolus-configure-2.8.9-1.el6cf.noarch
aeolus-all-0.13.18-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
aeolus-conductor-doc-0.13.18-1.el6cf.noarch
rubygem-aeolus-cli-0.7.4-1.el6cf.noarch
Created attachment 625262 [details]
edit provider
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 |