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 1914263 - [RFE]Option to auto-unregister system from Insights if the system's RHSM profile no longer exists on satellite 6.
Summary: [RFE]Option to auto-unregister system from Insights if the system's RHSM prof...
Keywords:
Status: CLOSED DUPLICATE of bug 1735722
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Insights
Version: 6.8.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: addubey
URL:
Whiteboard:
: 1678748 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-08 13:34 UTC by Amar Huchchanavar
Modified: 2023-01-24 15:42 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-24 15:42:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TFMRHCLOUD-159 0 None None None 2021-11-10 13:11:14 UTC
Red Hat Knowledge Base (Solution) 6827151 0 None None None 2022-06-15 10:43:46 UTC

Internal Links: 1735722

Description Amar Huchchanavar 2021-01-08 13:34:36 UTC
1. Proposed title of this feature request
If a machine is getting decommissioned and being unregistered from satellite then it should also be removed from insights as well.  

3. What is the nature and description of the request?
Insights profile should be removed/unregistered automatically from Satellite if:

- system is unregistered from RHSM.
- system is removed from the satellite server.
- system is deleted using API call.


4. Why does the customer need this? (List the business requirements here)

Currently, we are using below API query to unregister a client machine through automated server decommissioning process to get the machine unregistered from satellite.  However, this still keeps the entry of the machine in Redhat Insights for which we need a separate API query so that Redhat Insights data is in consistent with satellite inventory.

curl -k -u clientadmin -X PUT -H "Content-Type: application/json" https://satellite-server-url/api/hosts/bulk/destroy -d '{"organization_id":"1", "included": {"search": "name=hostname"}}'


5. How would the customer like to achieve this? (List the functional requirements here)

By having an option on the satellite server to auto delete the Insights profile.

Equivalent to below option:
Administer -> Settings -> Content
~~~~
Delete Host upon unregister 	No 	When unregistering a host via subscription-manager, also delete the host record. Managed resources linked to host such as virtual machines and DNS records may also be deleted.
~~~

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No

11. Would the customer be able to assist in testing this functionality if implemented?
Yes

Comment 12 Shimon Shtein 2022-06-15 10:43:47 UTC
*** Bug 1678748 has been marked as a duplicate of this bug. ***

Comment 13 Shimon Shtein 2022-06-16 08:41:12 UTC
Hello!
Let's start with a fact that system that is not reported for 14 days will be removed automatically from the inventory.

I can see a lot of edge cases if we enable a way to remove hosts from Satellite. Since inventory is updated not only by Satellite, but by other reporters like insights-client, there is a chance that the removal of the host will delete also information that was not added by it, basically causing data loss. Another issue I can think of, is the fact that removing a Satellite record does not necessary removes the actual host, meaning that even after the removal, the host could report itself to the cloud causing confusion. And finally the reporting process is asynchronous on the cloud side, and the order of the reports is not guaranteed. This means that the deletion message may be processed before all the reports are processed causing a "ghost" record to appear, which again is not desired.

The bottom line is that the solution to this problem is not straight forward and we are thinking about creating a way to do it without the drawbacks I have mentioned.

Thanks a lot for the patience!

Comment 17 Brad Buckingham 2023-01-04 22:48:23 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 24 Shimon Shtein 2023-01-24 15:42:55 UTC
Marking it as a duplicate of 1735722, since all the cases should lead to the same result:

Insights profile should be removed/unregistered automatically from Satellite if:
- system is unregistered from RHSM.
- system is removed from the satellite server.
- system is deleted using API call.

*** This bug has been marked as a duplicate of bug 1735722 ***


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