Bug 1486861 - Better handle multiple package profile uploads for the same consumer over a short time
Summary: Better handle multiple package profile uploads for the same consumer over a s...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2017-08-30 16:04 UTC by Justin Sherrill
Modified: 2020-11-04 11:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Justin Sherrill 2017-08-30 16:04:26 UTC
Description of problem:

If you are running the puppet client doing lots of yum installs, the client could upload the package profile many many times.  At one customer site this was happening 42 times per provision.  


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

How reproducible:
Always

Steps to Reproduce:
1.  Run puppet on a freshly provisioned client with lots of ensure installed package commands
2.  See that many many package profile updates happen

Actual results:
One package profile happens per yum transaction

Expected results:
ideally we only import the package profile and generate applicability a handful of times


Additional info:

Comment 2 Bryan Kearney 2019-02-28 19:39:53 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 3 Peter Vreman 2019-03-02 12:44:15 UTC
Bryan,

The package profile uploads (and the appliablity generation under the hood) can be really a DoS for the task management system and delays create/publish new content.
My use case:

i am running my unittests on ~15 different OS-HW combinations. Each unittest run has a lot of package install/remove and triggers ~200 package profile uploads.
That is 3000 package profile tasks in started in ~2 hours.

If this package upload is there after yum call to have immediat feedback, then the queueing of 1000-2000 tasks will make that immediate available already a false wish.

What is the problem with any of these solutions?
- Can you not replace (or cancel the existing) a queued task for package-file-upload-for-host-A?
- On the client side upload package profile only every X (e.g. default 10) minutes if rpms were changed.


Peter

Comment 4 Bryan Kearney 2019-03-06 18:57:25 UTC
Peter:

Agree, I will keep this one open.

-- bk

Comment 5 Sagar Lutade 2019-08-22 12:43:17 UTC
In RHEL7.7 there is now in rhsm.conf the option ' package_profile_on_trans':

           Set to 1 if the dnf/yum subscription-manager plugin should report the system's current package profile to the subscription
           service on execution of dnf/yum transactions (for example on package install). This report helps the subscription service
           provide better errata notifications. If supported by the entitlement server, enabled repos, enabled modules, and packages
           present will be reported. The report_package_profile option needs to also be set to 1 for this option to have any effect.

Is this maybe (part of) the solution to reduce the amount of package profile uploads requests?

Comment 8 Justin Sherrill 2020-10-14 18:36:09 UTC
There should be some improvement with Satellite 6.10 (and pulp3).  Applicability generation is handled a bit better there and 10 package profile updates doesn't mean 10 applicability generations.  I'm not sure how much of a help this will be at this time though.  In the meantime you might try the suggestion here: https://bugzilla.redhat.com/show_bug.cgi?id=1486861#c5  but note that updates will only happen every 4 hours by default if you do.

Comment 9 Peter Vreman 2020-10-15 07:23:54 UTC
The referenced comment https://bugzilla.redhat.com/show_bug.cgi?id=1486861#c5 is not public visible

Comment 10 Justin Sherrill 2020-10-19 12:42:25 UTC
Sorry about that peter, it should now be public

Comment 11 Ashish Humbe 2020-10-29 12:20:13 UTC
Hi Peter,

Are you able to see the comment #5? If so did you get a chance to try suggestion?

Regards,
Ashish

Comment 12 Peter Vreman 2020-10-29 14:34:44 UTC
Ashish,

Sorry, the recommendation of 'package_profile_on_trans = 0' does not prevent creating a Task in Sat6.7


------
[crash/LI] hoiroot@li-lc-1012:~$ grep package_profile_on_trans /etc/rhsm/rhsm.conf
package_profile_on_trans = 0

[crash/LI] hoiroot@li-lc-1012:~$ sudo yum downgrade tcsh
Loaded plugins: changelog, enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
rhel-7-server-optional-rpms                                                                                            | 1.8 kB  00:00:00
rhel-7-server-rpms                                                                                                     | 2.0 kB  00:00:00
rhel-7-server-satellite-tools-6.7-rpms                                                                                 | 2.1 kB  00:00:00
rhel-sap-for-rhel-7-server-rpms                                                                                        | 2.0 kB  00:00:00
rhel-server-rhscl-7-rpms                                                                                               | 2.0 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package tcsh.x86_64 0:6.18.01-16.el7 will be a downgrade
---> Package tcsh.x86_64 0:6.18.01-17.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                    Arch                         Version                               Repository                                Size
==============================================================================================================================================
Downgrading:
 tcsh                       x86_64                       6.18.01-16.el7                        rhel-7-server-rpms                       339 k

Transaction Summary
==============================================================================================================================================
Downgrade  1 Package

Total download size: 339 k
Is this ok [y/d/N]: y
Downloading packages:
tcsh-6.18.01-16.el7.x86_64.rpm                                                                                         | 339 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tcsh-6.18.01-16.el7.x86_64                                                                                                 1/2
  Cleanup    : tcsh-6.18.01-17.el7.x86_64                                                                                                 2/2
Uploading Package Profile
Loaded plugins: langpacks, product-id, subscription-manager
  Verifying  : tcsh-6.18.01-16.el7.x86_64                                                                                                 1/2
  Verifying  : tcsh-6.18.01-17.el7.x86_64                                                                                                 2/2
rhel-7-server-rpms/x86_64/productid                                                                                    | 2.1 kB  00:00:00
rhel-sap-for-rhel-7-server-rpms/x86_64/productid                                                                       | 2.2 kB  00:00:00
rhel-server-rhscl-7-rpms/x86_64/productid                                                                              | 2.1 kB  00:00:00

Removed:
  tcsh.x86_64 0:6.18.01-17.el7

Installed:
  tcsh.x86_64 0:6.18.01-16.el7

Complete!
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
[crash/LI] hoiroot@li-lc-1012:~$ 
------

After the above commands i still see a task in Sat6
--------
2020-10-29T14:23:57 [I|app|6f843b88] Started PUT "/rhsm/consumers/5c549f3d-1f06-4881-bf74-522b405b9ce7/profiles" for 10.92.14.31 at 2020-10-29
 14:23:57 +0000
2020-10-29T14:23:57 [I|app|6f843b88] Processing by Katello::Api::Rhsm::CandlepinDynflowProxyController#upload_profiles as JSON
2020-10-29T14:23:57 [I|app|6f843b88]   Parameters: {"id"=>"5c549f3d-1f06-4881-bf74-522b405b9ce7"}
2020-10-29T14:23:57 [I|bac|6f843b88] Task {label: Actions::Katello::Host::UploadProfiles, id: 79b8fef0-a7e3-4496-97a7-634d41d7bd07, execution_
plan_id: 4ad4305c-fa4a-4798-9354-e7e8c33fbaf7} state changed: planning
2020-10-29T14:23:57 [I|bac|] Task {label: Actions::Katello::Host::UploadProfiles, id: 79b8fef0-a7e3-4496-97a7-634d41d7bd07, execution_plan_id:
 4ad4305c-fa4a-4798-9354-e7e8c33fbaf7} state changed: planned
---------


Peter

Comment 13 Ashish Humbe 2020-11-04 10:57:41 UTC
Hi Peter,

Thank you for the update,

Can you please confirm whether the client system has katello-host-tools package installed or not? 

Thanks,
Ashish

Comment 14 Peter Vreman 2020-11-04 11:26:37 UTC
Ashish,

The katello-host-tools has to be installed to trigger this issue, because that rpm provides the yum plugin that generate the query to Sat6.

I have the katello-host-tools of Sat6.7 installed:
------
[crash/LI] hoiroot@li-lc-1012:~$ rpm -q katello-host-tools
katello-host-tools-3.5.1-3.el7sat.noarch
[crash/LI] hoiroot@li-lc-1012:~$
------


Peter


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