> On 03 Feb 2016, at 22:51, Pierre Casenove <[email protected]> wrote:
>
> Hello,
> I have a spacewalk 2.4 server running on RHEL 6 Server, with PGSQL 8.4 local
> database.
> I have several repository syncs scheduled during the night.
> 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.
> For exemple:
> Centos 6 Base scheduled at 8pm
> Centos 7 Base scheduled at 8.30pm
> If centos 6 base hasn't been ended before 8.30pm, centos 7 Base is simply
> skipped.
>
> I'm pretty sure that before 2.4 upgrade, the second schedule was launched as
> soon as the first one ended.
>
> Am I totally wrong? If so, how can I configure spacewalk to be sure that each
> reposync are lunched each night?
Hi,
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.
This perl script will list all repositories with a defined repo URL, and then
run reposync:
########## SCRIPT START ############
#!/usr/bin/perl -w
use strict;
use warnings;
my $cmd = "/usr/bin/spacewalk-repo-sync";
my $options = "-t yum -c";
# Get my repos
my $repo_list = `$cmd -l |grep -v "No repo" |grep "^[a-z]"`;
my @repos = split(/\n/, $repo_list);
foreach my $repo (@repos) {
my @repo_info = split(/\|/, $repo);
my $channel = $repo_info[0];
chomp $channel;
$channel =~ s/ //g;
system("$cmd $options $channel");
}
########## SCRIPT END ############
And of course the cron job definition:
/etc/cron.d/reposync
MAILTO=<[email protected]>
0 4 * * * root /<path-to-script>/reposync.pl
with regards,
Morten A. Middelthon
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list