Bug 1425856
Summary: | pulp celery worker consumes huge memory during Content View publish , due to missing fields in copying errata | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> | ||||
Component: | Content Views | Assignee: | satellite6-bugs <satellite6-bugs> | ||||
Status: | CLOSED ERRATA | QA Contact: | Ales Dujicek <adujicek> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 6.2.8 | CC: | abalakht, adujicek, bbuckingham, egolov, fgarciad, jcallaha, jsherril, ktordeur, mverma | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-02-21 16:46:14 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
Pavel Moravec
2017-02-22 15:40:52 UTC
Perspective patch of 6.2.8: --- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/services/katello/pulp/erratum.rb 2017-03-14 17:03:36.959539640 -0400 +++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/services/katello/pulp/erratum.rb.new 2017-03-14 17:01:08.567562162 -0400 @@ -1,6 +1,7 @@ module Katello module Pulp class Erratum < PulpContentUnit + PULP_ERRATA_SELECT_FIELDS = %w(id) CONTENT_TYPE = "erratum" def self.unit_handler --- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/lib/actions/pulp/repository/copy_errata.rb 2017-03-14 17:03:37.474539547 -0400 +++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/lib/actions/pulp/repository/copy_errata.rb.new 2017-03-14 17:01:12.093562059 -0400 @@ -5,6 +5,10 @@ module Actions def content_extension pulp_extensions.errata end + + def criteria + super.merge(fields: ::Katello::Pulp::Erratum::PULP_ERRATA_SELECT_FIELDS) + end end end end --- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/lib/actions/pulp/repository/remove_errata.rb 2017-03-14 17:03:37.954539460 -0400 +++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/lib/actions/pulp/repository/remove_errata.rb.new 2017-03-14 17:01:16.422561931 -0400 @@ -5,6 +5,10 @@ module Actions def content_extension pulp_extensions.errata end + + def criteria + super.merge(fields: { :unit => ::Katello::Pulp::Erratum::PULP_ERRATA_SELECT_FIELDS}) + end end end end --- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/models/katello/glue/pulp/repo.rb 2017-03-14 17:03:38.455539369 -0400 +++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/models/katello/glue/pulp/repo.rb.new 2017-03-14 17:04:32.317529632 -0400 @@ -413,8 +413,11 @@ module Katello fail "Invalid content type #{content_type} sent. It needs to be one of #{content_classes.keys}"\ unless content_classes[content_type] criteria = {} - if content_type == Runcible::Extensions::Rpm.content_type + case content_type + when Runcible::Extensions::Rpm.content_type criteria[:fields] = Pulp::Rpm::PULP_SELECT_FIELDS + when Runcible::Extensions::Errata.content_type + criteria[:fields] = Pulp::Erratum::PULP_ERRATA_SELECT_FIELDS end if filter_clauses && !filter_clauses.empty? @@ -443,7 +446,9 @@ module Katello # Since the rpms will be copied above, during the copy of errata and package groups, # include the copy_children flag to request that pulp skip copying them again. - events << Katello.pulp_server.extensions.errata.copy(self.pulp_id, to_repo.pulp_id, :copy_children => false) + events << Katello.pulp_server.extensions.errata.copy(self.pulp_id, to_repo.pulp_id, + :fields => Pulp::Erratum::PULP_ERRATA_SELECT_FIELDS, + :copy_children => false) events << Katello.pulp_server.extensions.package_group.copy(self.pulp_id, to_repo.pulp_id, :copy_children => false) events << clone_file_metadata(to_repo) end @@ -457,8 +462,11 @@ module Katello def unassociate_by_filter(content_type, filter_clauses) criteria = {:type_ids => [content_type], :filters => {:unit => filter_clauses}} - if content_type == Katello.pulp_server.extensions.rpm.content_type + case content_type + when Katello.pulp_server.extensions.rpm.content_type criteria[:fields] = { :unit => Pulp::Rpm::PULP_SELECT_FIELDS} + when Katello.pulp_server.extensions.errata.content_type + criteria[:fields] = { :unit => Pulp::Erratum::PULP_ERRATA_SELECT_FIELDS} end Katello.pulp_server.extensions.repository.unassociate_units(self.pulp_id, criteria) end Put it to /tmp/bz1425856.patch, then run: cat /tmp/bz1425856.patch | patch -p1 "katello-service restart" to apply it. Anyway, this patch is so far unofficial.. POSTed to upstream via: http://projects.theforeman.org/projects/katello/repository/katello/revisions/c83af8691f238ac106b416b8574140d069342295 upstream bug closed, dunno why the change isnt propagated here. Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18916 has been resolved. Created attachment 1376301 [details]
free memory
free memory during verification
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, 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/RHSA-2018:0336 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, 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/RHSA-2018:0336 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, 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/RHSA-2018:0336
|