Bug 742230 - Can not change repo sync schedule once repo is created.
Summary: Can not change repo sync schedule once repo is created.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: James Slagle
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks: tracker-rhui-2.0.1
TreeView+ depends on / blocked
 
Reported: 2011-09-29 13:10 UTC by James Slagle
Modified: 2017-03-01 22:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:06:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description James Slagle 2011-09-29 13:10:14 UTC
Once a repo is created using rhui-manager, it is not possible to change it's
sync schedule from the default of 6 hours.  The documentation isn't entirely
clear if this should be possible.  It says "By default, a synchronization will
occur every six hours, but this schedule can be adjusted."

It doesn't say how to adjust it or that it can only be adjusted *before* you
create the repo in rhui-manager.

Comment 1 James Slagle 2011-10-10 21:22:28 UTC
committed fix for this in the pulp rhui branch:

commit a6c5c95cfac3912a0443df4005770f2a3bd04fa7
Author: James Slagle <jslagle>
Date:   Mon Oct 10 17:17:24 2011 -0400

    742230 Add startup code to adjust the repo and cds sync schedule in rhui if 


The values from /etc/rhui/rhui-tools.conf will now take effect after a httpd restart.

Comment 2 wes hayutin 2011-10-17 20:01:51 UTC
set tracker bug. 746803

Comment 4 Sachin Ghai 2011-10-20 12:45:16 UTC
Verified with new RHUI ISO:

RHEL-6.1-RHUI-2.0.1-20111017.0-Server-x86_64-DVD1.iso

I Created few repos and  synced them successfully at default frequency of '6' hours.  here is the o/p:

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 17:14:49
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
10-20-2011 21:35             10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
10-20-2011 21:35             10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
10-20-2011 21:35             10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
10-20-2011 21:35             10-20-2011 15:42             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
10-20-2011 21:35             10-20-2011 15:37             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
10-20-2011 21:35             10-20-2011 15:37             Success    


                                          Connected: dhcp193-14.pnq.redhat.com
------------------------------------------------------------------------------


Then sync the CDS at same frequency ( 6 hours):

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= CDS Synchronization Status =-

Last Refreshed: 17:15:16
(updated every 5 seconds, ctrl+c to exit)


cds179 ...................................................... [  UP  ]


Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
cds179
10-20-2011 21:44             10-20-2011 16:53             Success    


                                          Connected: dhcp193-14.pnq.redhat.com
------------------------------------------------------------------------------

Comment 5 Sachin Ghai 2011-10-20 12:46:49 UTC
Now I changed the sync frequency as below from '6' hours to 1 hour and restarted the httpd service.

[root@dhcp193-14 noarch]# cat /etc/rhui/rhui-tools.conf | grep frequency
repo_sync_frequency: 1
cds_sync_frequency: 1
[root@dhcp193-14 noarch]# 



Once I restarted the httpd service on rhua, after few minutes the CDS and repos sync status for "next sync" changed to 'Unknown'


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 18:16:02
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
Unknown                      10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
Unknown                      10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
Unknown                      10-20-2011 15:36             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
Unknown                      10-20-2011 15:42             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
Unknown                      10-20-2011 15:37             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
Unknown                      10-20-2011 15:37             Success    


                                          Connected: dhcp193-14.pnq.redhat.com
------------------------------------------------------------------------------




             -= Red Hat Update Infrastructure Management Tool =-


-= CDS Synchronization Status =-

Last Refreshed: 18:16:22
(updated every 5 seconds, ctrl+c to exit)


cds179 ...................................................... [  UP  ]


Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
cds179
Unknown                      10-20-2011 16:53             Success    


                                          Connected: dhcp193-14.pnq.redhat.com
------------------------------------------------------------------------------

Comment 6 Sachin Ghai 2011-10-20 13:06:36 UTC
Please note that if I change the repo sync frequency before adding repos then rhui-manager shows correct time under 'Next sync"


--
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
10-20-2011 19:28             10-20-2011 18:29             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
10-20-2011 19:28             10-20-2011 18:29             Success    

---


These repos are created after changing the sync frequency.

Comment 7 James Slagle 2011-10-20 14:17:34 UTC
I'm still looking into this, but I can't reproduce it.  On my RHUA, the Next Sync time stays at what it was before making the configuration change and restarting pulp-server.

pulp-admin repo list shows that the schedule has indeed been updated.

Is it possible me to ssh to your RHUA to check this out?

Comment 8 James Slagle 2011-10-20 14:23:30 UTC
Looks like the state will show Unknown when there is no next sync scheduled.  Just updating the schedule shouldn't cause this to occur, so I'm not sure what's going on.  

If I can't ssh to the box, can you send me pulp.log, error_log, and ssl_error_log?

As a workaround, you can just use rhui-manager to schedule an immediate sync for each repo.  That should clear it up, and get the syncs back on the new schedule.

Comment 9 Sachin Ghai 2011-10-21 02:16:41 UTC
Yes, I again verified this issue and found that state changed to 'Unknown' after configuring the sync because system time was not correctly set.

I set the time correctly and created new repos and then changed the configuration. Here are the verification results:

Repo created:
==============

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 23:27:50
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
In Progress                  Never                        Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
In Progress                  Never                        Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
In Progress                  Never                        Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
In Progress                  Never                        Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
Awaiting Execution           Never                        Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
Awaiting Execution           Never                        Success    


                                  Connected: dhcp201-133.englab.pnq.redhat.com
------------------------------------------------------------------------------




sync finished and Next sync time updated after 6 hours:
========================================================

-= Repository Synchronization Status =-

Last Refreshed: 23:38:17
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
10-21-2011 05:26             10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
10-21-2011 05:26             10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
10-21-2011 05:26             10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
10-21-2011 05:26             10-20-2011 23:32             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
10-21-2011 05:26             10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
10-21-2011 05:26             10-20-2011 23:28             Success    


                                  Connected: dhcp201-133.englab.pnq.redhat.com
------------------------------------------------------------------------------


Then I changed the sync frequency to '1'hour: Please note that next sync starts at 5:26 after 6 hours..


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 05:26:50
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
In Progress                  10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
Awaiting Execution           10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
In Progress                  10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
In Progress                  10-20-2011 23:32             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
Awaiting Execution           10-20-2011 23:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
In Progress                  10-20-2011 23:28             Success    


                                  Connected: dhcp201-133.englab.pnq.redhat.com
------------------------------------------------------------------------------


once this sync is finished, the frequency of interval to set by '1' hour:


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 05:34:08
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 2.0 (RPMs) (6.0-i386)
10-21-2011 06:26             10-21-2011 05:27             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.0-x86_64)
10-21-2011 06:26             10-21-2011 05:28             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-i386)
10-21-2011 06:26             10-21-2011 05:27             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6.1-x86_64)
10-21-2011 06:26             10-21-2011 05:27             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
10-21-2011 06:26             10-21-2011 05:27             Success    

Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
10-21-2011 06:26             10-21-2011 05:27             Success    


                                  Connected: dhcp201-133.englab.pnq.redhat.com
-----------------------------------------------------------------------------

Comment 10 James Slagle 2011-10-21 14:31:21 UTC
Resolved bugzilla 747880

Comment 11 James Slagle 2011-10-21 14:31:42 UTC
Resolve by bug #747880

Comment 15 errata-xmlrpc 2017-03-01 22:06:33 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/RHBA-2017:0367


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