[copr] master: number will link to those coprs, to which it refers (394ea81)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 394ea81c3738c600608cab61b4eb7bb36fc8fa42
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Oct 14 15:47:25 2013 +0200
number will link to those coprs, to which it refers
>---------------------------------------------------------------
coprs_frontend/coprs/templates/coprs/show.html | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/coprs_frontend/coprs/templates/coprs/show.html b/coprs_frontend/coprs/templates/coprs/show.html
index e766e48..0d85a68 100644
--- a/coprs_frontend/coprs/templates/coprs/show.html
+++ b/coprs_frontend/coprs/templates/coprs/show.html
@@ -9,7 +9,9 @@
<img src="{{ g.user.gravatar_url }}" alt="User Image">
</a>
<p>{{ g.user.name }}</p>
- <p class="coprs-count">{{ g.user.coprs_count }}</p>
+ <p class="coprs-count">
+ <a href="{{ url_for('coprs_ns.coprs_by_owner', username=g.user.name) }}" title="My Coprs">{{ g.user.coprs_count }}</a>
+ </p>
<p class="other-text">coprs</p>
</div>
{% endif %}
10 years, 6 months
[copr] master: run log and jobgrab as copr user (23aaa4d)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 23aaa4da3a2bf97887dfb1ca9cb4a864d07262c4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 10 03:14:10 2013 +0200
run log and jobgrab as copr user
move calling of __init__ into context, because there we spawn new process and they will
run under root, but we want them under copr user
>---------------------------------------------------------------
copr-be.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 29a0354..e5d66ef 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -266,7 +266,6 @@ def main(args):
opts = parse_args(args)
try:
- cbe = CoprBackend(opts.config_file, ext_opts=opts)
context = daemon.DaemonContext(
pidfile=lockfile.FileLock(opts.pidfile),
gid = grp.getgrnam('copr').gr_gid,
@@ -279,6 +278,7 @@ def main(args):
},
)
with context:
+ cbe = CoprBackend(opts.config_file, ext_opts=opts)
cbe.run()
except Exception, e:
print 'Killing/Dying'
10 years, 7 months
[copr] master: log event to log file (4f7d380)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 4f7d380c3be7fc63d5103982ee06ad69ff287c39
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Oct 9 23:36:35 2013 +0200
log event to log file
>---------------------------------------------------------------
backend/dispatcher.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 1508bd6..f565af2 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -109,6 +109,7 @@ class Worker(multiprocessing.Process):
""" Multi-purpose logging method.
Logs messages to two different destinations:
+ - To log file
- The internal "events" queue for communicating back to the
dispatcher.
- The fedmsg bus. Messages are posted asynchronously to a
@@ -124,6 +125,7 @@ class Worker(multiprocessing.Process):
else:
who = 'worker-%s' % (self.worker_num)
+ self.callback.log("event: who: %s, what: %s" % ( who, what))
self.events.put({'when':time.time(), 'who':who, 'what':what})
try:
content['who'] = who
10 years, 7 months
[copr] master: convert comment into docstring (8f45e01)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8f45e011a591d6fe6ec98d26707253d19c5ad5ad
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Oct 9 23:20:26 2013 +0200
convert comment into docstring
>---------------------------------------------------------------
backend/dispatcher.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 4817eeb..1508bd6 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -256,11 +256,12 @@ class Worker(multiprocessing.Process):
os.unlink(job.jobfile)
def run(self):
- # worker should startup and check if it can function
- # for each job it takes from the jobs queue
- # run opts.setup_playbook to create the instance
- # do the build (mockremote)
- # terminate the instance
+ """ Worker should startup and check if it can function
+ for each job it takes from the jobs queue
+ run opts.setup_playbook to create the instance
+ do the build (mockremote)
+ terminate the instance
+ """
while not self.kill_received:
try:
10 years, 7 months
[copr] master: Revert "use new style calling of parent method" (54d4278)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 54d4278e80863a0543cc85d622a7cf422bc089fe
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 8 14:30:42 2013 +0200
Revert "use new style calling of parent method"
This reverts commit 7ae811846e3c53bb2b14e1c8047aa94f6ad2e559.
>---------------------------------------------------------------
copr-be.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 3ed6e38..29a0354 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -32,7 +32,8 @@ class CoprJobGrab(multiprocessing.Process):
"""Fetch jobs from the Frontend - submit them to the jobs queue for workers"""
def __init__(self, opts, events, jobs):
- super(multiprocessing.Process, self).__init__(name="jobgrab")
+ # base class initialization
+ multiprocessing.Process.__init__(self, name="jobgrab")
self.opts = opts
self.events = events
@@ -83,7 +84,9 @@ class CoprJobGrab(multiprocessing.Process):
class CoprLog(multiprocessing.Process):
"""log mechanism where items from the events queue get recorded"""
def __init__(self, opts, events):
- super(multiprocessing.Process, self).__init__(name="logger")
+
+ # base class initialization
+ multiprocessing.Process.__init__(self, name="logger")
self.opts = opts
self.events = events
10 years, 7 months
[copr] master: use new style calling of parent method (7ae8118)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 7ae811846e3c53bb2b14e1c8047aa94f6ad2e559
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 8 14:13:22 2013 +0200
use new style calling of parent method
>---------------------------------------------------------------
copr-be.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 29a0354..3ed6e38 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -32,8 +32,7 @@ class CoprJobGrab(multiprocessing.Process):
"""Fetch jobs from the Frontend - submit them to the jobs queue for workers"""
def __init__(self, opts, events, jobs):
- # base class initialization
- multiprocessing.Process.__init__(self, name="jobgrab")
+ super(multiprocessing.Process, self).__init__(name="jobgrab")
self.opts = opts
self.events = events
@@ -84,9 +83,7 @@ class CoprJobGrab(multiprocessing.Process):
class CoprLog(multiprocessing.Process):
"""log mechanism where items from the events queue get recorded"""
def __init__(self, opts, events):
-
- # base class initialization
- multiprocessing.Process.__init__(self, name="logger")
+ super(multiprocessing.Process, self).__init__(name="logger")
self.opts = opts
self.events = events
10 years, 7 months
[copr] master: use unbufferred output for copr-be.py (ba8287e)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit ba8287e88a7804351d895d45035816b25189d4f7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 8 13:53:21 2013 +0200
use unbufferred output for copr-be.py
this will easy debuging, as with buffered output some messagaes will never reach log.
>---------------------------------------------------------------
copr-backend.service | 4 ++--
copr-be.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/copr-backend.service b/copr-backend.service
index e5da0b6..ec1163d 100644
--- a/copr-backend.service
+++ b/copr-backend.service
@@ -3,10 +3,10 @@ Description=Copr Backend service
After=syslog.target network.target auditd.service
[Service]
-Type=forking
+Type=simple
PIDFile=/var/run/copr-backend/copr-be.pid
#ExecStartPre=/home/copr/cloud/ec2rc.variable
-ExecStart=/usr/share/copr/copr-be.py -d
+ExecStart=/usr/share/copr/copr-be.py
ExecReload=/bin/kill -HUP $MAINPID
[Install]
diff --git a/copr-be.py b/copr-be.py
index 70749b8..29a0354 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python -ttu
from backend import errors
10 years, 7 months
[copr] master: hint how to set ec2 variables (439a14d)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 439a14dcb0905e5c39e1d9b8ffa27ac4aa74d86e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 8 13:41:51 2013 +0200
hint how to set ec2 variables
>---------------------------------------------------------------
copr-backend.service | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/copr-backend.service b/copr-backend.service
index 07a8ee2..e5da0b6 100644
--- a/copr-backend.service
+++ b/copr-backend.service
@@ -5,6 +5,7 @@ After=syslog.target network.target auditd.service
[Service]
Type=forking
PIDFile=/var/run/copr-backend/copr-be.pid
+#ExecStartPre=/home/copr/cloud/ec2rc.variable
ExecStart=/usr/share/copr/copr-be.py -d
ExecReload=/bin/kill -HUP $MAINPID
10 years, 7 months
[copr] master: document sleeptime (017ec37)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 017ec37f7b2143d9fd36f241ed421a1b923fcf35
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Oct 7 15:31:40 2013 +0200
document sleeptime
>---------------------------------------------------------------
copr-be.conf.example | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/copr-be.conf.example b/copr-be.conf.example
index 8068bdc..e92d14d 100644
--- a/copr-be.conf.example
+++ b/copr-be.conf.example
@@ -30,6 +30,8 @@ jobsdir=/var/lib/copr/jobs
# no default
destdir=/var/lib/copr/public_html/results
+# how long (in seconds) backend should wait before query frontends
+# for new tasks in queue
# default is 10
sleeptime=30
10 years, 7 months
[copr] master: document copr_url for copr-cli (7d8f625)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 7d8f6255e69483ec463ae2e3671b7418f0d899d4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Oct 7 11:07:44 2013 +0200
document copr_url for copr-cli
>---------------------------------------------------------------
man/copr-cli.1.asciidoc | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/man/copr-cli.1.asciidoc b/man/copr-cli.1.asciidoc
index c8b7579..afb004c 100644
--- a/man/copr-cli.1.asciidoc
+++ b/man/copr-cli.1.asciidoc
@@ -98,6 +98,16 @@ Open file \~/.config/copr and put there content:
Be aware that API token have some expiration. See Expiration date on /api page.
+COPR URL
+--------
+
+You can alternatively specify different URL of Copr service. Open file \~/.config/copr and put there:
+
+ [copr-cli]
+ copr_url = http://copr-fe.cloud.fedoraproject.org
+
+The value above is default. Define copr_url only if you use different instance.
+
AUTHORS
-------
Miroslav Suchý <msuchy(a)redhat.com>
10 years, 7 months