Bug 1177904

Summary: After removing a product from a sync plan, repos from the product are still synced according to the plan
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.6CC: fdewaley, jmontleo, jsherril, mtaru, omaciel, shughes, sthirugn
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/9404
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:21: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:
Attachments:
Description Flags
verification screenshot none

Description Pavel Moravec 2014-12-31 08:12:12 UTC
Description of problem:
Removing a product from a sync plan (via WebUI) should stop synchronization of the product repositories per the sync plan. But the product is still updated/synced when the sync plan is scheduled.


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


How reproducible:
100%


Steps to Reproduce:
1. Enable and initially synchronize some Red Hat repositories (use e.g. MRG Messaging or MRG Grid ones that have small content for fast repro)
2. Create a (hourly) sync plan, add those repos there
3. Wait until the plan is scheduled and check in <sattelite>/products page "Sync Status" of the products.
4. Remove some products from the sync plan
5. Wait until the plan is scheduled next time and check again the same.


Actual results:
All products that were originally in the plan are updated (per "Sync Status" or per tasks). While the products removed from the plan has "Sync Plan" set to "None" (that's correct).


Expected results:
Just the products remaining in the plan should be updated.


Additional info:
I havent tried to remove a product from a sync plan via hammer - worth to check if the bug is WebUI related only, or not.

Comment 2 Pavel Moravec 2014-12-31 09:03:06 UTC
Well, this is embarrassing..

Potential workaround in deleting the sync plan does _not_ work. If I delete the plan, all products that had been in the plan (including those explicitly removed from the plan before the plan removal) are still being synchronized!

Comment 3 Pavel Moravec 2014-12-31 11:13:39 UTC
Not working workarounds:

removing whole sync plan
katello-service restart
rebooting the machine

Working workaround: remove the sync plan from the product via hammer:

hammer> product remove-sync-plan --id=97

(note that product info --id=97 showed no sync plan before this command..)


Hint for developers: what is different between CLI and WebUI command like above? Why hammer command succeeded (even if no sync plan was there)?

Comment 5 Justin Sherrill 2015-02-19 13:20:52 UTC
Connecting redmine issue http://projects.theforeman.org/issues/9404 from this bug

Comment 6 Bryan Kearney 2015-02-23 17:04:52 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9404 has been closed
-------------
Justin Sherrill
Applied in changeset commit:katello|cf738d8131269b93f5ff5b0e574d2055c18ae6ce.

Comment 10 sthirugn@redhat.com 2015-05-26 15:14:36 UTC
Verified in Sat 6.1 GA Snap 5.

Steps for verification:
1. Enabled and initially synchronized few Red Hat repositories - I used repos from 3 products:
* MRG Grid
* MRG Management
* MRG Realtime
2. Created a (hourly) sync plan, add all products from Step 1
3. Waited for the first sync to complete.  Verified that the products were successfully synced
4. Removed MRG Management, MRG Realtime from syncplan
5. Waited until the plan is scheduled next time and checked the same - This time MRG Management and MRG Realtime is not synced but MRG Grid is synced (Screenshot attached)

Comment 11 sthirugn@redhat.com 2015-05-26 15:14:59 UTC
Created attachment 1029990 [details]
verification screenshot

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

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