<div dir="ltr">Thanks for your answer. This way, each reposync is launched just after the previous one, which can lead to overall shorter sync time.<div><br></div><div>Thanks.<br><div><br></div><div>Pierre</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-04 9:23 GMT+01:00 Morten Middelthon <span dir="ltr"><<a href="mailto:mm@lastfriday.com" target="_blank">mm@lastfriday.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> On 03 Feb 2016, at 22:51, Pierre Casenove <<a href="mailto:pcasenove@gmail.com">pcasenove@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
> I have a spacewalk 2.4 server running on RHEL 6 Server, with PGSQL 8.4 local database.<br>
> I have several repository syncs scheduled during the night.<br>
> I've noticed that since the 2.4 upgrade, if a first schedule is still running when a second is supposed to be launch, this second repository sync is simply skipped and never launched, even when schedule 1 is completed.<br>
> For exemple:<br>
> Centos 6 Base scheduled at 8pm<br>
> Centos 7 Base scheduled at 8.30pm<br>
> If centos 6 base hasn't been ended before 8.30pm, centos 7 Base is simply skipped.<br>
><br>
> I'm pretty sure that before 2.4 upgrade, the second schedule was launched as soon as the first one ended.<br>
><br>
> Am I totally wrong? If so, how can I configure spacewalk to be sure that each reposync are lunched each night?<br>
<br>
</span>Hi,<br>
<br>
I experienced something similar to this on one of my spacewalk setups, so I stopped using the schedule via the web GUI and created my own cron-script. You still define the repo url and everything via the web gui, but not the schedule. I feel I have more control this way.<br>
<br>
This perl script will list all repositories with a defined repo URL, and then run reposync:<br>
<br>
########## SCRIPT START ############<br>
#!/usr/bin/perl -w<br>
<br>
use strict;<br>
use warnings;<br>
<br>
my $cmd = "/usr/bin/spacewalk-repo-sync";<br>
my $options = "-t yum -c";<br>
<br>
# Get my repos<br>
my $repo_list = `$cmd -l |grep -v "No repo" |grep "^[a-z]"`;<br>
my @repos = split(/\n/, $repo_list);<br>
<br>
foreach my $repo (@repos) {<br>
        my @repo_info = split(/\|/, $repo);<br>
        my $channel = $repo_info[0];<br>
        chomp $channel;<br>
        $channel =~ s/ //g;<br>
        system("$cmd $options $channel");<br>
}<br>
<br>
########## SCRIPT END ############<br>
<br>
And of course the cron job definition:<br>
<br>
/etc/cron.d/reposync<br>
<br>
MAILTO=<your-email-address@domain.example><br>
0 4 * * * root /<path-to-script>/<a href="http://reposync.pl" rel="noreferrer" target="_blank">reposync.pl</a><br>
<br>
with regards,<br>
<br>
Morten A. Middelthon<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div><br></div>