Bug 2252768

Summary: Host owner not set correctly during registration
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED MIGRATED QA Contact: amolpati
Severity: medium Docs Contact:
Priority: high    
Version: 6.15.0CC: ahumbe, aperotti, gformisa, lstejska, nalfassi, rlavi, saydas, shwsingh, wclark, zhunting, zuansorg
Target Milestone: streamKeywords: MigratedToJIRA, PrioBumpGSS, UserExperience
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: 2024-06-06 16:37:31 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:
Attachments:
Description Flags
Hotfix RPM for Satellite 6.13.7 none

Description Lukáš Hellebrandt 2023-12-04 15:32:08 UTC
Description of problem:
When a host is registered, its Owner is not set to the admin that generated the registration command. It stays set to a hidden API user, Owner is displayed as Anonymous Admin.

Version-Release number of selected component (if applicable):
Reproduced in Sat Stream (6.15) and 6.14.0

How reproducible:
Deterministic

Steps to Reproduce:
1. On a Satellite, have a manifest and RHEL + Client repos synced and an AK
2. In WebUI, got to Hosts -> Register
3. Set insecure, select the AK
4. Generate
5. On the host, run the generated command
6. In Hosts -> All hosts, see the Owner column

Actual results:
The host is registered and everything works well but the Owner is set to Anonymous Admin:
# hammer host info --name <FQDN> | grep -i owner
    Owner:      Anonymous Admin
    Owner Id:   1
    Owner Type: User

Expected results:
I think the user who actually ran the registration process should be set as owner.

Comment 1 nalfassi 2023-12-28 15:25:29 UTC
Created redmine issue https://projects.theforeman.org/issues/37014 from this bug

Comment 2 Bryan Kearney 2024-01-16 16:02:42 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/37014 has been resolved.

Comment 3 amolpati 2024-02-26 18:39:32 UTC
Verified.

Tested on: Satellite 6.15 Snap 49.0

Steps followed:

1) Sync repository and create ac_key
2) In Register host generate "Registration command"
3) Run "Registration command" on host 
4) # hammer host info --name <FQDN> | grep -i owner
    Owner:      Admin User
    Owner Id:   1
    Owner Type: User

Additional info:

Navigate Hosts -> All hosts
check owner name which is exactly matching with the above.
expected changes has been done.

Comment 5 wclark 2024-04-08 20:46:44 UTC
Created attachment 2025869 [details]
Hotfix RPM for Satellite 6.13.7

A hotfix RPM is available for this BZ for Satellite 6.13.7

INSTALL INSTRUCTIONS:

1. Create a complete backup or snapshot of Satellite 6.13.7 server

2. Download the hotfix RPM from this attachment

3. # dnf install ./rubygem-katello-4.7.0.36-2.HOTFIXRHBZ2252768.el8sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 7 Eric Helms 2024-06-06 16:37:31 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.