Bug 784879 - conductor page not listing image names and had N/A for all entries
Summary: conductor page not listing image names and had N/A for all entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: alpha
Assignee: Matt Wagner
QA Contact: wes hayutin
URL: https://qeblade31.rhq.lab.eng.bos.red...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-26 14:53 UTC by wes hayutin
Modified: 2014-08-17 22:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 22:23:50 UTC
Embargoed:


Attachments (Terms of Use)
ss (144.61 KB, image/png)
2012-01-26 14:53 UTC, wes hayutin
no flags Details
import_with_name (172.94 KB, image/png)
2012-02-07 22:16 UTC, dgao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0583 0 normal SHIPPED_LIVE new packages: aeolus-conductor 2012-05-15 22:31:59 UTC

Description wes hayutin 2012-01-26 14:53:37 UTC
Created attachment 557679 [details]
ss

Description of problem:

see screenshots..

Recreate:
1. using webui to upload image templates using URL and upload
2. auto create deployable
3. nav to conductor/images

notice the issues in the screenshots.. blank names and N/A

Comment 1 wes hayutin 2012-01-26 14:55:02 UTC
one note on this bug.. is not provider accounts were configured

Comment 2 Jan Provaznik 2012-01-27 16:06:53 UTC
Reason why entries are empty is that both image body and template body in warehouse are missing.

Why this happened can be found in iwhd.log:
log of the template creation:

Jan 26 09:14:30 iwhd[13399]: 127.0.0.1.42932 "PUT /templates" -
Jan 26 09:14:30 iwhd[13399]: 127.0.0.1.42932 401 0
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43058 "GET /" -
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43058 200 554
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43059 "PUT /templates/0619126a-482a-11e1-8f39-5cf3fc217780" 907
iwhd: failed to open file: templates/0619126a-482a-11e1-8f39-5cf3fc217780: No such file or directory
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43059 500 0
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43060 "PUT /templates/0619126a-482a-11e1-8f39-5cf3fc217780/object_type" 8
Jan 26 09:28:32 iwhd[13399]: no size, mongo may be dead
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43060 201 8
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43061 "PUT /templates/0619126a-482a-11e1-8f39-5cf3fc217780/uuid" 36
Jan 26 09:28:32 iwhd[13399]: no size, mongo may be dead
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43061 201 36
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43062 "POST /templates/0619126a-482a-11e1-8f39-5cf3fc217780" 8
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43062 200 447
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43063 "GET /templates/0619126a-482a-11e1-8f39-5cf3fc217780/object_type" -
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43063 200 8
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43064 "GET /templates/0619126a-482a-11e1-8f39-5cf3fc217780/uuid" -
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43064 200 36
Jan 26 09:28:32 iwhd[13399]: 127.0.0.1.43065 "GET /templates/0619126a-482a-11e1-8f39-5cf3fc217780" -
Jan 26 09:28:32 iwhd[13399]: templates/0619126a-482a-11e1-8f39-5cf3fc217780 not found at primary


From above it seems that bucket '/template' wasn't created because the create request was unauthorized (401). Then following request on saving template's body fails with message "No such file or directory" (probably because 'template' directory wasn't created in prev. step). Rest of requests (saving template's attributes) pass - attrs are saved in mongodb.

There are two bugs:
1) bucket creation request is unauthorized - I don't know why, this requires more testing to find out if this happens more often.

2) if template body is not saved, conductor should abort object creation (not create attrs for the object) and report an error to the user - this happens if oauth is off because restlient raises an exception on status codes != 200. But oauth requests don't raise an exception for error status codes and aeolus-image-rubygem continues in attributes creation then. Note that oauth is enabled by default.

Comment 3 Jan Provaznik 2012-01-30 16:10:05 UTC
1) I'm not able to reporoduce 1) and can't find it in code

2) an exception should be raised even if a request si done through oauth lib. Also on some places in aeolus-image-rubygem RestClient::* Exceptions. So probably more general exception should be raised in do_Request and this exception should be catched instead of RestClient::*.

Comment 4 Jan Provaznik 2012-01-30 16:19:05 UTC
I wasn't able to reproduce this bug, from logs I identified 2 potential problems described above but for fixing of problem 1) I would need to be able to reproduce this. Wes, are you able to reproduce this?

Comment 5 Matt Wagner 2012-01-30 16:39:32 UTC
I'm going to fix up #2 here, since it (a) needs to be fixed, and (b) might shed some light on why #1 happens (but not reproduceably).

Comment 6 Matt Wagner 2012-01-30 16:54:45 UTC
Heh, in WarehouseModel:

            unless self.warehouse.buckets.include?(self.bucket.name)
              begin
                self.bucket = self.warehouse.create_bucket(self.bucket.name)
              rescue
                # there was an iwhd bug ago - it wasn't possible to find out
                # if a bucket exists or not, then code 500 was returned.
                # I'm not sure if it's already fixed or not so I'm wrapping it
                # with rescue block. If exception is raised we can assume
                # that bucket already exists.
              end

We eat any exceptions when creating a bucket, because we (blindly) assume it's an old iwhd bug. That's... probably not good.

Comment 7 Matt Wagner 2012-01-30 22:27:29 UTC
I haven't seen this exact issue previously, and couldn't reproduce it on a fresh install using RHEL 6.2.

However, based on Jan's comments and my subsequent investigation, I think what happened is that something went wrong when using OAuth -- the keys didn't match, perhaps, or something was just broken along the chain. We inappropriately swallowed the errors that would have informed you of this, so everything appeared to work until you went to list images and realized that nothing had actually worked.

I now have a patch on the list that will cause requests to raise exceptions if HTTP errors are encountered, which is what the other code expects to happen: http://lists.fedorahosted.org/pipermail/aeolus-devel/2012-January/008486.html

As for Jan's first problem, I couldn't see any instances of creating buckets without authentication. But with the above patch, we will now raise an exception (403 - Forbidden) if you attempt to create a bucket without authentication when OAuth is enabled, so it will expose any further bugs.

Tentatively marking as POST, because I suspect the described issue (which I could not reproduce) was some sort of fluke whose root cause was masked by our inappropriate swallowing of exceptions. Please re-open if this does not appear correct.

Comment 8 Steve Linabery 2012-01-31 22:05:55 UTC
920ad8a in rubygem-aeolus-image-0.3.0-7

Comment 9 dgao 2012-02-07 22:16:33 UTC
Created attachment 560074 [details]
import_with_name

Comment 10 errata-xmlrpc 2012-05-15 22:23:50 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-0583.html


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