Bug 1001327

Summary: After SAM 1.3 upgrade from sam 1.2.1, one of user roles got corrupted
Product: [Retired] Subscription Asset Manager Reporter: sthirugn <sthirugn>
Component: katelloAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, hhovsepy, tomckay
Target Milestone: rcFlags: sthirugn: automate_bug? (hhovsepy)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-01 11:21:59 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:
Bug Depends On:    
Bug Blocks: 833466    

Description sthirugn@redhat.com 2013-08-26 22:08:02 UTC
Description of problem:
After SAM 1.3 upgrade from sam 1.2.1, one of user roles got corrupted

Version-Release number of selected component (if applicable):
* candlepin-0.8.21-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.21-1.el6sam.noarch
* candlepin-tomcat6-0.8.21-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-8.el6sat.noarch
* katello-cli-common-1.4.3-8.el6sat.noarch
* katello-common-1.4.3-9.el6sam_splice.noarch
* katello-configure-1.4.4-3.el6sat.noarch
* katello-glue-candlepin-1.4.3-9.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-9.el6sam_splice.noarch
* katello-headpin-1.4.3-9.el6sam_splice.noarch
* katello-headpin-all-1.4.3-9.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install SAM 1.2.1 from RHN.  Created three roles.
2. Upgrade to SAM 1.3
-> Create a SAM 1.3 repo
-> #yum upgrade
-> #katello-upgrade
4. After the upgrade, navigate to sam ui.  Click on the first role.

Actual results:
Clicking on the first role errored (screenshot attached).  The second and third roles launched without any errors (katello debug attached)

Expected results:
Clicking of roles should not error out.

Additional info:

Comment 3 sthirugn@redhat.com 2013-08-26 22:14:54 UTC
FWIW - this role which was failing was configured in sam 1.2.1 with the following permission:

Global permissions - Environments -> Modify systems in environment, Read enviroment contents


The other two roles which were not erroring out were related to the following permissions:
org1 -> Activation Keys -> Administer Activation keys
Global permissions - gobupermission - Roles -> 	Delete Roles, Read Roles

Comment 4 Tom McKay 2013-09-11 11:59:33 UTC
  Commit: 8427bab6ca2c275f1b60793a200c3822fe061661
      https://github.com/Katello/katello/commit/8427bab6ca2c275f1b60793a200c3822fe061661
  Author: Tom McKay <thomasmckay>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

Comment 6 Tom McKay 2013-09-12 19:11:04 UTC
Found more issues in upgrade.

Comment 7 Bryan Kearney 2013-09-17 13:55:48 UTC
Delivered with Bug 1001609 - Org delete sporadically fails
https://bugzilla.redhat.com/show_bug.cgi?id=1001609
  Commit: a457c64ab8490fb00cb2a371ebe0d662d2e117cd
      https://github.com/Katello/katello/commit/a457c64ab8490fb00cb2a371ebe0d662d2e117cd
  Author: Tom McKay <thomasmckay>
  Date:   2013-09-13 (Fri, 13 Sep 2013)

Comment 8 Bryan Kearney 2013-09-18 16:07:14 UTC
moving to ON_QA, these are in Snap7.

Comment 9 sthirugn@redhat.com 2013-09-20 02:36:28 UTC
Verified.  Now the roles which is linked to environment permissions are removed automatically after the upgrade.  Also this is going to be documented for the customers in Bug 1007488

Version Tested:
* candlepin-0.8.26-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.26-1.el6sam.noarch
* candlepin-tomcat6-0.8.26-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-11.el6sat.noarch
* katello-cli-common-1.4.3-11.el6sat.noarch
* katello-common-1.4.3-14.el6sam_splice.noarch
* katello-configure-1.4.4-4.el6sat.noarch
* katello-glue-candlepin-1.4.3-14.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-14.el6sam_splice.noarch
* katello-headpin-1.4.3-14.el6sam_splice.noarch
* katello-headpin-all-1.4.3-14.el6sam_splice.noarch
* Katello-Katello-Installation-RegisterRHNClassic-1.1-4.noarch
* Katello-Katello-Sanity-ImportKeys-1.2-1.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.34-1.el6sam.noarch
* thumbslug-selinux-0.0.34-1.el6sam.noarch

Comment 10 sthirugn@redhat.com 2013-09-20 02:37:35 UTC
Correction: 
Verified.  Now the permissions (not roles) which are related to environments are removed automatically after the upgrade.  Also this is going to be documented for the customers in Bug 1007488

Comment 12 errata-xmlrpc 2013-10-01 11:21:59 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-2013-1390.html