Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit 6159878f050c4739d84f32a8558ab36c1230298f
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Tue Dec 4 16:23:10 2012 -0500
if any worker dies and we don't know why - raise an exception to kill us off b/c
until we know all of the reasons why I'd rather just stop.
>---------------------------------------------------------------
copr-be.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 0d20e20..2cc0fba 100644
--- a/copr-be.py
+++ b/copr-be.py
@@ -117,6 +117,9 @@ class CoprBackend(object):
# #insert a poison pill? Kill after something? I dunno.
# FIXME - if a worker bombs out - we need to check them
# and startup a new one if it happens
+ for w in self.workers:
+ if not w.is_alive():
+ raise errors.CoprBackendError, "Worker died unexpectedly"
time.sleep(self.opts.sleeptime)
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit 0f2031cdcce6c5ddccdf7d2b427453db35f7dc77
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Tue Dec 4 16:01:00 2012 -0500
- output what mockremote is seeing to the chroot log for the pkg
- move around where we need to add check against pkgs
>---------------------------------------------------------------
backend/dispatcher.py | 18 ++++++++++++++----
backend/mockremote.py | 4 ----
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 286cffd..411f95c 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -196,22 +196,32 @@ class Worker(multiprocessing.Process):
job.started_on = time.time()
for chroot in job.chroots:
+ chroot_destdir = job.destdir + '/' + chroot
# setup our target dir locally
- if not os.path.exists(job.destdir):
+ if not os.path.exists(chroot_destdir):
try:
- os.makedirs(job.destdir, mode=0755)
+ os.makedirs(chroot_destdir, mode=0755)
except (OSError, IOError), e:
- msg = "Could not make results dir for job: %s - %s" % (job.destdir, str(e))
+ msg = "Could not make results dir for job: %s - %s" % (chroot_destdir, str(e))
self.callback.log(msg)
status = 0
continue
+ # FIXME
+ # need a plugin hook or some mechanism to check random
+ # info about the pkgs
+ # this should use ansible to download the pkg on the remote system
+ # and run a series of checks on the package before we
+ # start the build - most importantly license checks.
+
+
self.callback.log('mockremote %s %s %s %s %s' % (ip, job.timeout, job.destdir, chroot, str(job.repos)))
try:
+ chrootlogfile = chroot_destdir + '/' + mockremote.log
mr = mockremote.MockRemote(builder=ip, timeout=job.timeout,
destdir=job.destdir, chroot=chroot, cont=True, recurse=True,
repos=job.repos,
- callback=mockremote.DefaultCallBack(quiet=True,logfn=self.logfile))
+ callback=mockremote.CLiLogCallBack(quiet=True,logfn=chrootlogfile))
mr.build_pkgs(job.pkgs)
except mockremote.MockRemoteError, e:
# record and break
diff --git a/backend/mockremote.py b/backend/mockremote.py
index a2a5f13..7698de9 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -492,10 +492,6 @@ class MockRemote(object):
r_log.write(b_err)
r_log.close()
- # FIXME
- # need a plugin hook or some mechanism to check random
- # info about the pkgs
-
# checking where to stick stuff
if not b_status:
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit d29ca180260fc7734eec05f31d0fe7ffbd855898
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Sat Dec 1 00:24:46 2012 -0500
need a bit more logging detail to see what's breaking and why
>---------------------------------------------------------------
backend/mockremote.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index 5bfb1f2..d7d0eed 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -481,6 +481,14 @@ class MockRemote(object):
self.callback.error(msg)
self.callback.end_download(pkg)
+ # write out whatever came from the builder call into the destdir/chroot
+ r_log = open(self.destdir + '/' + self.chroot + '/mockchain.log', 'a')
+ r_log.write('%s\n' % pkg)
+ r_log.write('stdout\n')
+ r_log.write(b_out)
+ r.log.write('stderr\n')
+ r.log.write(b_err)
+ r.log.close()
# FIXME
# need a plugin hook or some mechanism to check random