Bug 1011469

Summary: spacewalk-splice-checkin fails if there is change in Organization Name on the Satellite
Product: [Retired] Subscription Asset Manager Reporter: Paresh Mutha <pmutha>
Component: SpliceAssignee: Splice Developers <splice-devel>
Status: CLOSED WONTFIX QA Contact: mkovacik
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3CC: bkearney, cduryee
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 20:35:42 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: 971511    

Description Paresh Mutha 2013-09-24 11:06:33 UTC
Description of problem:
If the name of the Organization on Satellite is changed after the initial sync (spacewalk-splice-checkin) then it fails with error 'TypeError: 'NoneType' object is unsubscriptable',

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

How reproducible:
Always

Steps to Reproduce:
1. Configure Entitlement Reporting on SAM 1.3
2. Execute spacewalk-splice-checkin
3. After it has completed successfully, create a new satellite certificate with the change in owner and activate it on the Satellite
4. Once the satellite is activated, confirm the base/root org's name is changed according to the satellite certificate
5. Again execute spacewalk-splice-checkin

Actual results:
Fails with error :
-bash-4.1$ spacewalk-splice-checkin
Traceback (most recent call last):
  File "/usr/bin/spacewalk-splice-checkin", line 100, in <module>
    checkin.main(opts)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 225, in main
    spacewalk_sync(options)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 160, in spacewalk_sync
    kps.update_roles(sw_user_list)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 166, in update_roles
    self.katello_client.grant_org_admin(kt_user=kt_users[kt_username], kt_org_label=sw_user_org)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 236, in grant_org_admin
    self.userapi.assign_role(user_id=kt_user['id'], role_id=oa_role['id'])
TypeError: 'NoneType' object is unsubscriptable

Expected results:
It should successfully sync and update the Organization Name on SAM

Additional info:

Comment 2 Chris Duryee 2013-09-24 13:08:56 UTC
This was fixed as part of https://bugzilla.redhat.com/show_bug.cgi?id=972953, comment #1. I need to investigate more to see why it's not working in this case.

Comment 3 Bryan Kearney 2017-06-26 20:35:42 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!