Mailinglist Archive: opensuse-buildservice (209 mails)

< Previous Next >
[opensuse-buildservice] wrong event processing order in scheduler
  • From: UkJung Kim <ukjung.kim@xxxxxxxxx>
  • Date: Thu, 2 May 2013 16:25:26 +0900
  • Message-id: <CADYa4DG6Tq=k+hjN9Gu42bTwutsURzgGDTgh_hJFGSwtG3=8+A@mail.gmail.com>
Hello.

We have our own private OBS instance 2.3.6 and I configured several
OBS project for cross compiling.

The situation is like this.

Suppose, I have project 'A' which has package 'a' which generates
a.i586.rpm and cross-a.armv7l.rpm with baselibs configuration.
I have aggregate package 'b' in project 'B' which aggregate all the
packages built from project 'A' and have exportfilters in project
conf. something like "ExportFilter: \.armv7l\.rpm$ armv7l"

The problem happened if I wiped the built results of package 'b' while
the armv7l scheduler was busy since the i586 scheduler was idle.

the i586 scheduler processed wipe event and sent filtered import event
to armv7l scheduler that intended to clear imported packages form
'armv7l/:full' but the armv7l scheduler was too busy to process that
import event.
And the i586 scheduler processed aggregation of package 'b' and sent
filtered import event to armv7l again that intended to copy imported
packages to 'armv7l/:full'.
When armv7l scheduler would be idle, it got events and tried to
process then by its own order. The order was 'priority', 'name of
type', 'name of project' and 'name of job'.
Suppose the name of filtered import event of wipe was 'import-zzzz'
and the name of filtered import event of aggregation was
'import-aaaa', then the filtered import event of aggregation was
processed first and the filtered import event of wipe was processed
next and it deleted the imported packages in armv7l/:full and the
build could not continue.

I think the order of event processing should be timed order instead of
alphabetical order.

I applied following patch and it seemed work fine for me.

diff --git a/src/backend/bs_sched b/src/backend/bs_sched
@@ -4740,9 +4740,7 @@ while(1) {
# uploadbuild events must go last
my %evprio = ('exit' => -1, 'exitcomplete' => -1, 'restart' =>
-1, 'uploadbuild' => 1);
@events = sort {($evprio{$a->{'type'}} || 0) <=>
($evprio{$b->{'type'}} || 0) ||
- $a->{'type'} cmp $b->{'type'} ||
- ($a->{'project'} || '') cmp ($b->{'project'} || '') ||
- ($a->{'job'} || '') cmp ($b->{'job'} || '')
+ -M "$myeventdir/$b->{'evfilename'}" <=> -M
"$myeventdir/$a->{'evfilename'}"
} @events;
}
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages