Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1369234 - Deleting a Content View version takes a long time (to start)
Deleting a Content View version takes a long time (to start)
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high (vote)
: 6.2.5
: Unused
Assigned To: Brad Buckingham
Roman Plevka
: Performance, PrioBumpField, Triaged
Depends On:
Blocks: 1394420
  Show dependency treegraph
 
Reported: 2016-08-22 14:40 EDT by Brad Buckingham
Modified: 2017-01-31 04:37 EST (History)
9 users (show)

See Also:
Fixed In Version: tfm-rubygem-katello-3.0.0.86-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1394420 (view as bug list)
Environment:
Last Closed: 2016-12-12 12:13:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15531 None None None 2016-08-22 14:40 EDT
Red Hat Product Errata RHBA-2016:2940 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 17:08:21 EST

  None (edit)
Description Brad Buckingham 2016-08-22 14:40:33 EDT
If I attempt to delete a content view version, either from the CLI or GUI, it takes a long time to start, and typically times out in the CLI, and leads to the delete confirmation screen in the GUI to sit with an hourglass forever.

When this happens, the dynflow task shows as planning/pending, and there is a single 'ruby' process running, using 100% of one CPU core. If this is left, it eventually stops doing this, and the task starts and does eventually complete.

There was a suggestion that there was a problem with lack of entropy on the system - I installed and run haveged, and while initially it seemed like it could have helped, it seems that patience was what really helped - it just takes a *long* time to delete a content view version.
Comment 1 Brad Buckingham 2016-08-22 14:40:37 EDT
Created from redmine issue http://projects.theforeman.org/issues/15531
Comment 2 Brad Buckingham 2016-08-22 15:19:21 EDT
Upstream Katello PR: https://github.com/Katello/katello/pull/6263
Comment 6 Roman Plevka 2016-11-10 08:40:23 EST
is this supposed to be reproducible even on empty, non-promoted content-views?

i was unable to reproduce this on

# rpm -qa satellite
satellite-6.2.4-1.0.el7sat.noarch
# rpm -qa katello
katello-3.0.0-14.el7sat.noarch

`
# hammer content-view publish --id 3
# hammer content-view version list --content-view-id 3
---|------------|---------|-----------------------
ID | NAME       | VERSION | LIFECYCLE ENVIRONMENTS
---|------------|---------|-----------------------
5  | foo_cv 2.0 | 2.0     | Library               
---|------------|---------|-----------------------
# hammer content-view version delete --id 5 --content-view-id 3
Could not delete the content view:
  Cannot delete version while it is in environments: Library

# hammer content-view remove-from-environment --id 3 --lifecycle-environment-id 1
[..................] [100%]
# time hammer content-view version delete --id 5 --content-view-id 3
[..................................................................................................................................................] [100%]

real	0m4.265s
user	0m1.788s
sys	0m0.189s
`

Could you provide more specific steps to reproducte the issue if mine are not correct?
Comment 7 Mike McCune 2016-11-11 17:49:05 EST
In certain situations it can completely fail to ever get past the Planning phase and never delete.

We need to get this into 6.2.z
Comment 8 Brad Buckingham 2016-11-11 18:08:18 EST
Roman, to test, I'd recommend doing a 'Remove' via the UI of a content view version that contains a lot of data (e.g. packages, errata...etc).  The issue that was observed was that it took a very long time to 'plan' the removal task as that step would actually destroy a lot of the data that had been indexed as part of that version within Katello.
Comment 9 Roman Plevka 2016-12-07 07:39:21 EST
VERIFIED
# rpm -qa satellite
satellite-6.2.5-1.0.el7sat.noarch

synced a rhel7 server repo and published it inside a CV.

>13443 Packages
>1304 Errata ( 309 824 171 ) 


Removal of the CV version took about 5 seconds

run:
 5: Actions::Pulp::Repository::Destroy (success) [ 1.60s / 0.27s ]
11: Actions::Pulp::Repository::Destroy (success) [ 3.59s / 0.38s ]
17: Actions::Pulp::Repository::Destroy (success) [ 1.61s / 0.29s ]
finalize:
 8: Actions::Katello::Repository::Destroy (success) [ 0.01s / 0.01s ]
14: Actions::Katello::Repository::Destroy (success) [ 0.01s / 0.01s ]
18: Actions::Katello::ContentViewPuppetEnvironment::Destroy (success) [ 0.03s / 0.03s ]
19: Actions::Katello::ContentViewVersion::Destroy (success) [ 0.07s / 0.07s ]
20: Actions::Katello::ContentView::Remove (success) [ 0.01s / 0.01s ]
Comment 10 errata-xmlrpc 2016-12-12 12:13:21 EST
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/RHBA-2016:2940

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