Bug 2223465

Summary: Registering host to Satellite using non-admin user fails in first attempt and successful after that using same command.
Product: Red Hat Satellite Reporter: Akshay Kapse <akapse>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: high    
Version: 6.14.0CC: ahumbe, lstejska, nalfassi, rlavi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Akshay Kapse 2023-07-18 02:00:37 UTC
Description of problem:
- Registration using non-admin user fails to register host with below error:
~~~
Host was not found by the subscription UUID: '', this can happen if the host is registered already, but not to this instance
~~~
- But, it is again successful if I rerun same command but assigns Default Location in place of any other defined location.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a non-admin user and assign all roles.
2. Generate a registration curl command and register host.

Actual results:
- Host fails to register in first attempt.

Expected results:
- Should be able to register.

Comment 2 Leos Stejskal 2023-07-18 11:29:48 UTC
Hi,
I see that you have "ignore subman errors" set to true. Why?

> Unit d48923ce-5f36-4615-a317-6397952142d5 has been deleted (HTTP error code 410: Gone)

The message is saying that the system is already registered in the Satellite.
Please remove all the hosts from Satellite and try to register (new fresh) system again.

Comment 4 Leos Stejskal 2023-08-01 06:00:01 UTC
Hi,
what roles and permissions does the user have? I tried it with the "Register hosts" role and it works fine

Comment 12 Leos Stejskal 2023-08-02 09:04:00 UTC
> This do not show same error with same set of commands.

Yes that is expected, there were some changes and fixes in the registration process between 6.12 and 6.14.