[Maria-developers] Windows buildslaves: suggestion for remedy of 'exception' failures.
Hi! Both mine and Bo's buildslave are prone to error conditions like this: http://askmonty.org/buildbot/builders/win32-rel-nmake/builds/19/steps/bzr/lo... Here is a suggestion on how to eliminate those. Buildslave setup ---------------- Buildslave owner needs to download pstools and handle utilites: http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx they need to unpack the zips, then put handle.exe, pskill.exe, pdh.dll somwhere on the path, and then run both exe files manually. The first manual run is needed to accept the EULA. Buildbot script --------------- I've come up with this script that uses the above utilities to kill all stray processes: #!/usr/bin/perl my $cmd="handle.exe maria-slave |" ; open(IN, $cmd) || die("Failed to pipe from handle.exe"); my @pids = (); print "$cmd\n"; while(<IN>) { print $_; if (/ pid: ([0-9]+) /) { push @pids, $1; } } close(IN); print "\n\n"; my %hash = map { $_ => 1} @pids; my @uniq_pids = keys %hash; foreach (@uniq_pids) { $cmd= "pskill.exe $_\n"; print $cmd; system($cmd); } EOF The question is, where do we put the script? Have buildslave owners put it on the slaves manually (bad, complicates the setup)? Download through buildbot? We can't put it into the lp:maria repository because the failure occurs before the bzr branch command, i.e. at a point where there might be not yet a repository. On the other hand, if there is not yet a repository, then the exception condition won't occur. Any comments? BR Sergey -- Sergey Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog
Sergey Petrunya <psergey@askmonty.org> writes:
Hi!
Both mine and Bo's buildslave are prone to error conditions like this: http://askmonty.org/buildbot/builders/win32-rel-nmake/builds/19/steps/bzr/lo...
Here is a suggestion on how to eliminate those.
Buildslave setup ---------------- Buildslave owner needs to download pstools and handle utilites:
http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx
they need to unpack the zips, then put handle.exe, pskill.exe, pdh.dll somwhere on the path, and then run both exe files manually. The first manual run is needed to accept the EULA.
Buildbot script ---------------
I've come up with this script that uses the above utilities to kill all stray processes:
#!/usr/bin/perl my $cmd="handle.exe maria-slave |" ;
(I guess maria-slave should be $ARGV[0] or something ...)
open(IN, $cmd) || die("Failed to pipe from handle.exe"); my @pids = (); print "$cmd\n"; while(<IN>) { print $_; if (/ pid: ([0-9]+) /) { push @pids, $1; } } close(IN); print "\n\n"; my %hash = map { $_ => 1} @pids; my @uniq_pids = keys %hash; foreach (@uniq_pids) { $cmd= "pskill.exe $_\n"; print $cmd; system($cmd); }
EOF
The question is, where do we put the script? Have buildslave owners put it on the slaves manually (bad, complicates the setup)? Download through buildbot?
Downloading through buildbot should work well actually, it has easy-to-use support for that.
Any comments?
Let's try it. - Kristian.
Hi! 8 окт. 2009, в 09:44, Kristian Nielsen написал(а): [skip]
#!/usr/bin/perl my $cmd="handle.exe maria-slave |" ;
(I guess maria-slave should be $ARGV[0] or something ...)
AFAIK in perl $ARGV[0] is real very first argument (there is no program name in the array).
participants (3)
-
Kristian Nielsen
-
Oleksandr Byelkin
-
Sergey Petrunya