Bug 828308

Summary: Updating sync plan does not update associated product's (repo's) sync schedule
Product: Red Hat Satellite Reporter: Chris Pelland <cpelland>
Component: WebUIAssignee: Jason E. Rist <jrist>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: bkearney, cpelland, dmacpher, jrist, jsherril, mmccune, omaciel, pchalupa, sghai
Target Milestone: UnspecifiedKeywords: Triaged, ZStream
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Updates to existing sync plans would not carry over to the product or repository. This caused sync plans to retain their settings from creation. This fix re-associates the sync plan to the product upon update, which provides the product's correct sync plan.
Story Points: ---
Clone Of: 801580 Environment:
Last Closed: 2012-07-10 07:25:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 801580    
Bug Blocks:    

Comment 3 Sachin Ghai 2012-06-12 10:18:56 UTC
Thank you Mike for helping to resolve the issue mentioned in comment2.

Now I tried to re-create the issue. 

I created a sync plan with time 3:00PM and applied it on a product. when i checked from pulp-admin it was correctly reflected.

---

Id                 	ACME_Corporation-Zoo_Enterprise-Zoo_Enterprise_x86_64_16
Name               	Zoo Enterprise x86_64 16 
Repo URL           	https://localhost.localdomain/pulp/repos/ACME_Corporation/Library/content/zoo/16/x86_64/rpms/
Feed URL           	http://inecas.fedorapeople.org/fakerepos/cds_fast//content/zoo/16/x86_64/rpms
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:Yes   Cert:Yes
Consumer Certs     	CA:No   Cert:No
Architecture       	x86_64                   
Sync Schedule      	2012-06-12T15:00:00+05:30/P1D
Packages           	32                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	[u'product:42', u'env:1', u'org:1', u'content:42']
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	True                     
Checksum Type      	sha256                   


Id                 	ACME_Corporation-Zoo_Enterprise-Zoo_Enterprise_i386_16
Name               	Zoo Enterprise i386 16   
Repo URL           	https://localhost.localdomain/pulp/repos/ACME_Corporation/Library/content/zoo/16/i386/rpms/
Feed URL           	http://inecas.fedorapeople.org/fakerepos/cds_fast//content/zoo/16/i386/rpms
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:Yes   Cert:Yes
Consumer Certs     	CA:No   Cert:No
Architecture       	i386                     
Sync Schedule      	2012-06-12T15:00:00+05:30/P1D
Packages           	32                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	[u'product:42', u'env:1', u'org:1', u'content:42']
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	True                     
Checksum Type      	sha256                   

--

Later, when I updated the sync plan by changing the time from 3:00PM to 4:00PM. The same sync time is not updating under pulp. It is still showing 3:00PM instead of 4:00PM

Sync schedule is updating only when I re-associate the updated plan with selected product. So what's expected here ?

Comment 4 Sachin Ghai 2012-06-14 06:12:45 UTC
Petr is looking in this issue, so moving this to on_dev. Thanks

Comment 5 Petr Chalupa 2012-06-14 09:46:56 UTC
fixed in aa5a22b68265dbc201db6d7d64e31aeaeb88c0e8

Comment 7 Dan Macpherson 2012-06-17 23:57:57 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Updates to existing sync plans would not carry over to the product or repository. This caused sync plans to retain their settings from creation. This fix re-associates the sync plan to the product upon update, which provides the product's correct sync plan.

Comment 8 Sachin Ghai 2012-06-18 09:41:02 UTC
Verified with following CFSE build:

katello-cli-common-0.1.111-1.el6_2.noarch
katello-0.1.317-1.el6_2.noarch
katello-cli-0.1.111-1.el6_2.noarch
pulp-1.0.4-1.el6.noarch


I created a sync plan with date 2012-06-18 and tim 12:00PM  and applied on product 'pulp'.

[root@dhcp201-164 yum.repos.d]# pulp-admin --username admin --password l3ME4K??? repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	ACME_Corporation-pulp-pulp_64
Name               	pulp_64                  
Repo URL           	https://localhost.localdomain/pulp/repos/ACME_Corporation/Library/custom/pulp/pulp_64/
Feed URL           	http://repos.fedorapeople.org/repos/pulp/pulp/v1/testing/6Server/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	2012-06-18T12:00:00+05:30/PT1H
Packages           	16                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	[u'product:1339999760211', u'env:1', u'org:1', u'content:1339999801449']
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha256            


Later I updated the sync plan from UI (1:00PM) and verified via pulp-admin. It was updated correctly.


[root@dhcp201-164 yum.repos.d]# pulp-admin --username admin --password l3ME4Kze9uhzOpiiF+JUy+q4 repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	ACME_Corporation-pulp-pulp_64
Name               	pulp_64                  
Repo URL           	https://localhost.localdomain/pulp/repos/ACME_Corporation/Library/custom/pulp/pulp_64/
Feed URL           	http://repos.fedorapeople.org/repos/pulp/pulp/v1/testing/6Server/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	2012-06-18T13:00:00+05:30/PT1H
Packages           	16                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	[u'product:1339999760211', u'env:1', u'org:1', u'content:1339999801449']
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha256

Comment 9 Sachin Ghai 2012-06-18 09:43:07 UTC
verified from katello cli too.

katello> sync_plan list --org ACME_Corporation
--------------------------------------------------------------------------------
                                 Sync Plan List

 Id   Name             Description   Start Date            Interval  
--------------------------------------------------------------------------------
 1    test_sync_plan                 2012/06/18 13:00:00   hourly    


I updated the sync time from 13:00PM to 14:00PM

katello> sync_plan update --name test_sync_plan --org ACME_Corporation --interval hourly --date 2012-06-18 --time 14:00:00
Successfully updated sync plan [ test_sync_plan ]
katello> sync_plan list --org ACME_Corporation
--------------------------------------------------------------------------------
                                 Sync Plan List

 Id   Name             Description   Start Date            Interval  
--------------------------------------------------------------------------------
 1    test_sync_plan                 2012/06/18 14:00:00   hourly

Comment 11 errata-xmlrpc 2012-07-10 07:25:18 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.

http://rhn.redhat.com/errata/RHBA-2012-1062.html

Comment 12 Mike McCune 2013-08-16 18:12:06 UTC
getting rid of 6.0.0 version since that doesn't exist