Bug 1738125

Summary: Hammer CLI external user group create causes 500 error
Product: Red Hat Satellite Reporter: etsmith <etsmith>
Component: LDAPAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Sanket Jagtap <sjagtap>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4.2CC: apatel, kgaikwad, mbacovsk, mshira, ofedoren, rabajaj
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: UnusedFlags: etsmith: needinfo-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-19 21:33: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:

Description etsmith@redhat.com 2019-08-06 13:07:30 UTC
Description of problem:

When creating an external user group using the hammer cli, an internal server error is seen when providing the location and organization. 

When NOT providing the location or organization parameters, an error is shown stating that the name is not found in the auth source. 


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

How reproducible:
100%

Steps to Reproduce:
1. Create LDAP Auth Source
2. Create internal ADMIN group
3. Attempt to create external -> internal group mapping 

Actual results:

When providing both --location and --organization:

[root@sat6-master-01 ~]# hammer user-group external create --auth-source 'satellite-admins-ldap' --name 'satellite-admins-ldap' --user-group 'satellite-admins-ldap' --location SBX --organization DHS
Could not create external user group:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.



when providing neither --location or --organization:

root@sat6-master-01 ~]# hammer user-group external create --auth-source 'satellite-admins-ldap' --name 'satellite-admins-ldap' --user-group 'satellite-admins-ldap'
Could not create external user group:
  Name is not found in the authentication source



When providing either --location or --organization

Could not create external user group:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.


Expected results:

External group is created. 

Additional info:


[root@sat6-master-01 ~]# hammer user-group list
---|-----------------------|------
ID | NAME                  | ADMIN
---|-----------------------|------
8  | satellite-admins-ldap | yes  
---|-----------------------|------
[root@sat6-master-01 ~]# hammer auth-source ldap list
---|-----------------------|---------------------------------|------|-------
ID | NAME                  | SERVER                          | PORT | LDAPS?
---|-----------------------|---------------------------------|------|-------
12 | satellite-admins-ldap | idm-01.client.domain | 389  | no    
---|-----------------------|---------------------------------|------|-------
[root@sat6-master-01 ~]# hammer location list
---|-------|-------|------------
ID | TITLE | NAME  | DESCRIPTION
---|-------|-------|------------
4  | DEV   | DEV   |            
3  | ECICD | ECICD |            
7  | PRD   | PRD   |            
2  | SBX   | SBX   |            
6  | STG   | STG   |            
5  | TST   | TST   |            
---|-------|-------|------------
[root@sat6-master-01 ~]# hammer organization list
---|-------|------|-------------|-------|------------
ID | TITLE | NAME | DESCRIPTION | LABEL | DESCRIPTION
---|-------|------|-------------|-------|------------
1  | DHS   | DHS  |             | DHS   |            
---|-------|------|-------------|-------|------------

Comment 4 Shira Maximov 2020-11-12 09:56:11 UTC
Hi Ethan, is this issue still persists in satellite 6.7?

Comment 5 Mike McCune 2020-12-09 22:17:30 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in approximately a month. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 6 Mike McCune 2021-01-19 21:25:47 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact your Red Hat Account Team. Thank you.