[copr] skvidal-backend: 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. (6159878)
by Seth Vidal
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)
11 years, 3 months
[copr] skvidal-backend: typo (7f1ac35)
by Seth Vidal
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit 7f1ac35229cb5589c6df41a0641526a0d303fe06
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Tue Dec 4 16:05:24 2012 -0500
typo
>---------------------------------------------------------------
backend/dispatcher.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 411f95c..225b75d 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -217,7 +217,7 @@ class Worker(multiprocessing.Process):
self.callback.log('mockremote %s %s %s %s %s' % (ip, job.timeout, job.destdir, chroot, str(job.repos)))
try:
- chrootlogfile = chroot_destdir + '/' + mockremote.log
+ 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,
11 years, 3 months
[copr] skvidal-backend: - output what mockremote is seeing to the chroot log for the pkg - move around where we need to add check against pkgs (0f2031c)
by Seth Vidal
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:
11 years, 3 months
[copr] skvidal-backend: output whatever mockremote sees a little more obviously (a70a73c)
by Seth Vidal
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit a70a73c958cd1a9831146c91106b486bfa0e2b08
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Tue Dec 4 15:23:11 2012 -0500
output whatever mockremote sees a little more obviously
>---------------------------------------------------------------
backend/mockremote.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index a5d39d5..a2a5f13 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -486,10 +486,10 @@ class MockRemote(object):
os.makedirs(self.destdir + '/' + self.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)
+ if b_err:
+ r_log.write('\nstderr\n')
+ r_log.write(b_err)
r_log.close()
# FIXME
11 years, 3 months
[copr] skvidal-backend: typo . instead of _ (2884bdb)
by Seth Vidal
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit 2884bdbe71787f99faa1948f1b4a6dfea268b819
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Sat Dec 1 00:34:59 2012 -0500
typo . instead of _
>---------------------------------------------------------------
backend/mockremote.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index 373f237..a5d39d5 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -488,9 +488,9 @@ class MockRemote(object):
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()
+ r_log.write('stderr\n')
+ r_log.write(b_err)
+ r_log.close()
# FIXME
# need a plugin hook or some mechanism to check random
11 years, 4 months
[copr] skvidal-backend: make sure out results dir is there (a58fc08)
by Seth Vidal
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit a58fc088a29122be6b6d342f4fa9edb1bba591ba
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Sat Dec 1 00:30:49 2012 -0500
make sure out results dir is there
>---------------------------------------------------------------
backend/mockremote.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index d7d0eed..373f237 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -482,6 +482,8 @@ class MockRemote(object):
self.callback.end_download(pkg)
# write out whatever came from the builder call into the destdir/chroot
+ if not os.path.exists(self.destdir + '/' + self.chroot):
+ os.makedirs(self.destdir + '/' + self.chroot)
r_log = open(self.destdir + '/' + self.chroot + '/mockchain.log', 'a')
r_log.write('%s\n' % pkg)
r_log.write('stdout\n')
11 years, 4 months
[copr] skvidal-backend: need a bit more logging detail to see what's breaking and why (d29ca18)
by skvidal@fedorahosted.org
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
11 years, 4 months