Bug 1972759 - Stop scheduled inventory status updates if auto upload is not configured
Summary: Stop scheduled inventory status updates if auto upload is not configured
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.9.4
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-16 15:01 UTC by James Jeffers
Modified: 2021-07-29 13:03 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-foreman_rh_cloud-3.0.23
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1965239
Environment:
Last Closed: 2021-07-29 12:58:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_rh_cloud pull 574 0 None open Fix missing logger in inventory scheduled sync 2021-06-22 08:04:35 UTC
Red Hat Product Errata RHBA-2021:2948 0 None None None 2021-07-29 13:03:39 UTC

Description James Jeffers 2021-06-16 15:01:41 UTC
+++ This bug was initially created as a clone of Bug #1965239 +++

Currently inventory status will be executed no matter what.

Comment 2 Jameer Pathan 2021-06-18 08:26:53 UTC
Hello Shim,

I have disabled "Automatic inventory upload" setting on Configure > Inventory upload page, 
but I can still see "Inventory scheduled sync" task on Monitor > Recurring logics page as Active.
Is this expected?

Comment 3 Shimon Shtein 2021-06-20 07:41:47 UTC
Yes, it's expected. To check this feature, you should disable the scheduled sync and cause a re-plan of the task. If you have debug logging on, it will show you the message as you can see it here: https://github.com/theforeman/foreman_rh_cloud/blob/638a0915e6ae4f1d1501fc6fbc7eb173ed2f6892/lib/inventory_sync/async/inventory_scheduled_sync.rb#L8

The concept is that the scheduled task is always there, but it does not plan InventoryFullSync tasks unless the setting is true.

Comment 10 Jameer Pathan 2021-07-08 12:50:56 UTC
Verified

Verified with:
- Satellite 6.9.4 snap 1
- tfm-rubygem-foreman_rh_cloud-3.0.23-1.el7sat.noarch

Test steps:
- Register satellite host with insights.
- Sync inventory status
- Wait for "Inventory scheduled sync" task to execute. (Changed wait time to 1 minute for testing)
- After task is executed check whether the satellite shows successful inventory upload for the host.
- Disable "Automatic inventory upload" setting.
- unregister host from insights OR Delete host from cloud.
- Wait for "Inventory scheduled sync" task to execute.

Observation:
- When "Automatic inventory upload" setting is disabled then "Inventory scheduled sync" task 
doesn't sync the inventory status.

Comment 15 errata-xmlrpc 2021-07-29 12:58:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9.4 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2948

Comment 16 errata-xmlrpc 2021-07-29 13:02:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9.4 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2948


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