Bug 1134100

Summary: When publishing/promoting CV, while capsule exists, content gets synced twice to capsule
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: Foreman ProxyAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.3CC: jsherril, mmccune
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/7273
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:13:11 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:

Description Corey Welton 2014-08-26 20:25:59 UTC
Description of problem:
When a user has capsule(s) attached to an instance, and attempts to publish/promote content, said content is synced twice to capsule -- once during the initial publish process and then again afterwards.

Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140823.0

How reproducible:


Steps to Reproduce:
1.  Attach a capsule to your sat
2.  Create a content view and attempt to publish/promote it.
3.  Note dynflow tasks and/or possibly just talk w/ a knowledgeable developer who understands what the heck is going on (jsherrill!)

Actual results:
Apparently, this is the situation.

* Previously, as part of a publish, new content was immediately pushed out to capsules as part of that publish
* There was discussion to break this into two tasks - do initial pub/promote to library and spawn a second task to sync.
* I am not sure whether a real decision was made on the behavior in the bullet above, but whatever the case, we're apparently still doing a sync during the initial publish -- followed by a second sync immediately after.

Expected results:

Apparently there was a lot of discussion between dev on how to handle the sync, whether to keep it as one big monolithic function (promote/publish/capsule sync) or break it out (promote/pub THEN content sync).  As an end user I think the second behavior is more palatable because otherwise user is sitting there on a publish that takes ages and user has no idea why.  Regardless, we shouldn't be syncing twice, independent of workflow decision.


Additional info:

Comment 1 Justin Sherrill 2014-08-26 20:28:36 UTC
To clarify it was split into two tasks and then accidentally added back as part of the publish/promote process as well.  So the node metadata generate and sync are now done twice during a publish or promote.  Once as part of publish/promote and a 2nd time as a separate task that gets started at the very end of the publish/promote task.

Comment 3 Corey Welton 2014-08-26 20:37:15 UTC
As an aside, if a user has like 10, 20 capsules, following the monolithic model, the publish could possibly take a Very Long Time as each capsule gets synced.

Comment 5 Justin Sherrill 2014-08-26 21:45:06 UTC
Created redmine issue http://projects.theforeman.org/issues/7273 from this bug

Comment 7 Bryan Kearney 2014-09-15 13:45:49 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7273 has been closed
-------------
Justin Sherrill
Applied in changeset commit:katello|b50dc0e4e85bd0f46d65775c35f0050c4a62c988.

Comment 10 Corey Welton 2015-03-23 23:45:18 UTC
This appears fixed in recent capsule sync efforts.

VERIFIED

Satellite-6.1.0-RHEL-7-20150320.1

Comment 11 Bryan Kearney 2015-08-11 13:22:35 UTC
This bug is slated to be released with Satellite 6.1.

Comment 12 errata-xmlrpc 2015-08-12 05:13:11 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, 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-2015:1592