Bug 795659 - Error needs to be handled in the UI
Summary: Error needs to be handled in the UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta3
Assignee: Tomas Hrcka
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-21 08:04 UTC by Rehana
Modified: 2012-05-15 22:37 UTC (History)
8 users (show)

Fixed In Version: v0.8.0-34
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 22:37:26 UTC
Embargoed:


Attachments (Terms of Use)
Add Account (204.74 KB, image/png)
2012-02-21 08:04 UTC, Rehana
no flags Details
Rails Log file (22.35 KB, text/plain)
2012-02-21 08:07 UTC, Rehana
no flags Details
error while adding account (202.42 KB, image/png)
2012-02-23 07:23 UTC, Rehana
no flags Details
Rails log (16.91 KB, application/octet-stream)
2012-03-01 09:11 UTC, Rehana
no flags Details
SS (199.81 KB, image/png)
2012-03-07 08:10 UTC, Rehana
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 Rehana 2012-02-21 08:04:32 UTC
Created attachment 564599 [details]
Add Account

Description of problem:


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


How reproducible:

Steps to Reproduce:
1.Create a user with only "Zone Administrator" role
2.Login
3.Go to clouds
4.Select any cloud
5.go to accounts
6.Click on "Add 
  
Actual results:
Error on UI:

PGError: ERROR: column reference "id" is ambiguous LINE 6: privileges_roles.action='use')) AND (id not in (0)) LI... ^ : SELECT DISTINCT "provider_accounts".id FROM "provider_accounts" LEFT OUTER JOIN "permissions" ON "permissions"."permission_object_id" = "provider_accounts"."id" AND "permissions"."permission_object_type" = 'ProviderAccount' LEFT OUTER JOIN "roles" ON "roles"."id" = "permissions"."role_id" LEFT OUTER JOIN "privileges" ON "privileges"."role_id" = "roles"."id" LEFT OUTER JOIN "providers" ON "providers"."id" = "provider_accounts"."provider_id" LEFT OUTER JOIN "permissions" "permissions_providers" ON "permissions_providers"."permission_object_id" = "providers"."id" AND "permissions_providers"."permission_object_type" = 'Provider' LEFT OUTER JOIN "roles" "roles_permissions" ON "roles_permissions"."id" = "permissions_providers"."role_id" LEFT OUTER JOIN "privileges" "privileges_roles" ON "privileges_roles"."role_id" = "roles_permissions"."id" WHERE ((permissions.user_id=3 and privileges.target_type='ProviderAccount' and privileges.action='use') or (permissions_providers.user_id=3 and privileges_roles.target_type='ProviderAccount' and privileges_roles.action='use')) AND (id not in (0)) LIMIT 1

Expected results:

This happened because the user doesn't have provider account
created. but the error message should be changed / the "add account" button should not be given for the zone administrator as they don't have provider account.

Additional info:

Screen shot attached :Add account.png

Comment 1 Rehana 2012-02-21 08:07:09 UTC
Created attachment 564600 [details]
Rails Log file

Attached Rails.log file

Aeolus:

rpm -qa | grep aeolus
aeolus-conductor-0.8.0-28.el6.noarch
aeolus-conductor-daemons-0.8.0-28.el6.noarch
aeolus-conductor-doc-0.8.0-28.el6.noarch
rubygem-aeolus-image-0.3.0-7.el6.noarch
aeolus-all-0.8.0-28.el6.noarch
rubygem-aeolus-cli-0.3.0-8.el6.noarch
aeolus-configure-2.5.0-14.el6.noarch

Comment 2 Tomas Hrcka 2012-02-22 14:36:27 UTC
fixed in master branch e4654f3e560452202063ca92913e72818d79ab7c

Comment 3 Rehana 2012-02-23 07:22:58 UTC
The bug still exists in the latest build also

[root@ibm-ls21-04 test]# rpm -qa | grep aeolus
aeolus-conductor-daemons-0.8.0-35.el6.noarch
aeolus-conductor-0.8.0-35.el6.noarch
aeolus-configure-2.5.0-15.el6.noarch
aeolus-conductor-doc-0.8.0-35.el6.noarch
rubygem-aeolus-cli-0.3.0-10.el6.noarch
aeolus-all-0.8.0-35.el6.noarch
rubygem-aeolus-image-0.3.0-9.el6.noarch


Attached the screen shot (error while adding account.png)

Comment 4 Rehana 2012-02-23 07:23:36 UTC
Created attachment 565207 [details]
error while adding account

Comment 5 Tomas Hrcka 2012-02-28 14:57:01 UTC
Can you please retest on latest build?

Comment 6 Rehana 2012-03-01 09:10:25 UTC
Yes, i have retested on the latest build, but still i could see the same exception.(same steps followed as per 'Description')

[root@hp-z200-06 ~]# rpm -qa  | grep aeolus
aeolus-conductor-0.8.0-39.el6.noarch
rubygem-aeolus-cli-0.3.0-12.el6.noarch
aeolus-all-0.8.0-39.el6.noarch
aeolus-conductor-daemons-0.8.0-39.el6.noarch
rubygem-aeolus-image-0.3.0-10.el6.noarch
aeolus-conductor-doc-0.8.0-39.el6.noarch
aeolus-configure-2.5.0-16.el6.noarch


error:
PGError: ERROR: column reference "id" is ambiguous LINE 6: privileges_roles.action='use')) AND (id not in (1)) LI... ^ : SELECT DISTINCT "provider_accounts".id FROM "provider_accounts" LEFT OUTER JOIN "permissions" ON "permissions"."permission_object_id" = "provider_accounts"."id" AND "permissions"."permission_object_type" = 'ProviderAccount' LEFT OUTER JOIN "roles" ON "roles"."id" = "permissions"."role_id" LEFT OUTER JOIN "privileges" ON "privileges"."role_id" = "roles"."id" LEFT OUTER JOIN "providers" ON "providers"."id" = "provider_accounts"."provider_id" LEFT OUTER JOIN "permissions" "permissions_providers" ON "permissions_providers"."permission_object_id" = "providers"."id" AND "permissions_providers"."permission_object_type" = 'Provider' LEFT OUTER JOIN "roles" "roles_permissions" ON "roles_permissions"."id" = "permissions_providers"."role_id" LEFT OUTER JOIN "privileges" "privileges_roles" ON "privileges_roles"."role_id" = "roles_permissions"."id" WHERE ((permissions.user_id=2 and privileges.target_type='ProviderAccount' and privileges.action='use') or (permissions_providers.user_id=2 and privileges_roles.target_type='ProviderAccount' and privileges_roles.action='use')) AND (id not in (1)) LIMIT 1

log:

Rail log attached.

Comment 7 Rehana 2012-03-01 09:11:07 UTC
Created attachment 566784 [details]
Rails log

Comment 8 Scott Seago 2012-03-01 15:50:06 UTC
Actually I found and fixed this bug as part of my fix for 788148. The patch is on list at https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009296.html

Comment 9 Scott Seago 2012-03-02 18:51:04 UTC
So you'll want this commit from master to test this: 72f4dff042c6df8f6943ee17fecbaf35d92ebf7a

Really you want all 6 commits for the bug -- just make sure all 'master' commits with 'Bug 788148:' in the commit message are included.

Comment 11 Rehana 2012-03-07 08:09:47 UTC
Verified the bug on

[root@intel-d3c69-01 nodes]# rpm -qa | grep aeolus
aeolus-conductor-doc-0.8.0-41.el6.noarch
aeolus-configure-2.5.0-18.el6.noarch
aeolus-conductor-daemons-0.8.0-41.el6.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.3.0-13.el6.noarch
aeolus-all-0.8.0-41.el6.noarch
aeolus-conductor-0.8.0-41.el6.noarch

Observed that now the user is not getting any error on the conductor(PFA)

Comment 12 Rehana 2012-03-07 08:10:34 UTC
Created attachment 568183 [details]
SS

Comment 13 errata-xmlrpc 2012-05-15 22:37:26 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.