Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1921464 - [RFE] Global Registration: Multiple successful enrolment with same command on same non-RHEL host
Summary: [RFE] Global Registration: Multiple successful enrolment with same command on...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-28 02:51 UTC by Ashfaqur Rahaman
Modified: 2022-10-28 18:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-28 18:02:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31823 0 Normal New Global Registration: Multiple successful enrollment with same command on same host 2021-02-10 17:45:01 UTC

Description Ashfaqur Rahaman 2021-01-28 02:51:01 UTC
Description of problem:

After successful enrollment of a fedora host, if we try run the same command, it just run and gave output successfully enrolled host. Once a enrollment is successful, next enrollment with same command should give output "Already enrolled". 

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

How reproducible:


Steps to Reproduce:
1. Generate registration command 
2. Register a Fedora host with the command 
3. Once its success, check the host exist in Satellite host Page. it exists. 
4. Run the command multiple time on same host. It will still say enrollment successful. 

Actual results:
"Successfully enrolled host localhost with Foreman"

Expected results:
It should give message : "Host already enrolled", we can also add option of "--force" 

Additional info:

Comment 1 Ashfaqur Rahaman 2021-01-28 02:51:33 UTC
[
root@localhost ~]# curl -X GET --insecure "https://sat69.apac-mps.anzlab.bne.redhat.com:9090/register?location_id=2&operatingsystem_id=3&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTE4MDA3ODIsImp0aSI6ImU1ZWUxZWYzZThhYjM3YTJiY2U5MTYzNTZmZDBkZDdmNmFjZDZlNWQwOGU1YjI0MTlhZjFjNmY1MDFkMzAxMWQiLCJleHAiOjE2MTE4MTUxODJ9.ozZrm4jQa1jNolZ9T7Ph7vxBAuBza4Phb_qAki9NJIQ' | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10349  100 10349    0     0  17630      0 --:--:-- --:--:-- --:--:-- 17600
#
# Running registration
#
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10678  100 10549  100   129  11367    139 --:--:-- --:--:-- --:--:-- 11494
/usr/sbin/restorecon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    27  100    27    0     0    267      0 --:--:-- --:--:-- --:--:--   270
Successfully enrolled host localhost with Foreman.



[root@localhost ~]# curl -X GET --insecure "https://sat69.apac-mps.anzlab.bne.redhat.com:9090/register?location_id=2&operatingsystem_id=3&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTE4MDA3ODIsImp0aSI6ImU1ZWUxZWYzZThhYjM3YTJiY2U5MTYzNTZmZDBkZDdmNmFjZDZlNWQwOGU1YjI0MTlhZjFjNmY1MDFkMzAxMWQiLCJleHAiOjE2MTE4MTUxODJ9.ozZrm4jQa1jNolZ9T7Ph7vxBAuBza4Phb_qAki9NJIQ' | bash
\  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10349  100 10349    0     0  18680      0 --:--:-- --:--:-- --:--:-- 18714
#
# Running registration
#
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10678  100 10549  100   129  12139    148 --:--:-- --:--:-- --:--:-- 12273
/usr/sbin/restorecon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    27  100    27    0     0    278      0 --:--:-- --:--:-- --:--:--   278
Successfully enrolled host localhost with Foreman.
[root@localhost ~]#

Comment 2 Ashfaqur Rahaman 2021-01-28 02:59:01 UTC
If we change hostname , and try to enroll with same command, it creates 2nd host in Satellite :

-----
[root@localhost ~]# hostnamectl set-hostname fedorahost
[root@localhost ~]# hostname
fedorahost
[root@localhost ~]# curl -X GET --insecure "https://sat69.apac-mps.anzlab.bne.redhat.com:9090/register?location_id=2&operatingsystem_id=3&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTE4MDA3ODIsImp0aSI6ImU1ZWUxZWYzZThhYjM3YTJiY2U5MTYzNTZmZDBkZDdmNmFjZDZlNWQwOGU1YjI0MTlhZjFjNmY1MDFkMzAxMWQiLCJleHAiOjE2MTE4MTUxODJ9.ozZrm4jQa1jNolZ9T7Ph7vxBAuBza4Phb_qAki9NJIQ' | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10349  100 10349    0     0  14658      0 --:--:-- --:--:-- --:--:-- 14679
#
# Running registration
#
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10681  100 10551  100   130   8641    106  0:00:01  0:00:01 --:--:--  8747
/usr/sbin/restorecon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    27  100    27    0     0    270      0 --:--:-- --:--:-- --:--:--   267
Successfully enrolled host fedorahost with Foreman.
------

Now In satellite we can see both 

1. localhost
2. fedorahost

Comment 3 Leos Stejskal 2021-02-05 12:04:00 UTC
Hi,
for any OS except CentOS & RHEL this is expected behavior.
Right now there isn't much logic yet for registering these OSs,
we basically just call API to create host with minimal required data and then run commands from the host registration template.

Let's keep this BZ open, but without 6.10 flag, we already have defined scope for 6.10.

Comment 4 Leos Stejskal 2021-02-05 12:04:57 UTC
Created redmine issue https://projects.theforeman.org/issues/31823 from this bug

Comment 5 Brad Buckingham 2022-09-02 20:25:18 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 a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 6 Brad Buckingham 2022-09-02 20:30:13 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 a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 7 Brad Buckingham 2022-10-28 18:02:59 UTC
Thank you for your interest in Red Hat Satellite. 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 feel free to contact your Red Hat Account Team. Thank you.


Note You need to log in before you can comment on or make changes to this bug.