Bug#625555: buildbot-slave: disabling a slave in /etc/default/buildslave does not work

2011-05-26 Thread Andriy Senkovych
Hello,

Thank you for your patches and report. I changed the patch a bit to
remove duplicate logic and pushed them for both buildbot and
buildbot-slave packages to upstream [1].

> I would gladly provide a patch that switches the ENABLED value to 1,
> since 0 is a very weird integer value for TRUE)

There might be an issue with backward compatibility, so I asked
upstream to make a decision on this.

Thank you again for your help. I'll prepare the packages right after I
get answer from upstream.

 [1]: https://github.com/buildbot/buildbot/pull/135

-- 
WBR, Andriy Senkovych



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#625555: buildbot-slave: disabling a slave in /etc/default/buildslave does not work

2011-05-04 Thread Andreas Beckmann
tags 62 + patch
thanks

Looking a bit further into this made me recognize this:

* integer comparison is used on ${SLAVE_ENABLED[$i]}, but since the user
may enter any value in /etc/default/buildslave the assumption that this
is an integer is wrong and the comment "0-enabled, other-disabled"
explicitly asks for disabling a slave by using values like "yes",
"true", "1", "", ...

* a disabled entry is treated as a syntax error


My attached patch changes the following:
- use string comparison to detect disabled entries
- skip syntax check on disabled entries

I would gladly provide a patch that switches the ENABLED value to 1,
since 0 is a very weird integer value for TRUE)


Andreas
--- /etc/init.d/buildslave~dist 2011-05-01 21:32:46.0 +0200
+++ /etc/init.d/buildslave  2011-05-04 14:39:18.0 +0200
@@ -49,6 +49,8 @@
 
 errors=0
 for i in $( seq ${#SLAVE_ENABLED[@]} ); do
+[[ "${SLAVE_ENABLED[$i]}" != "0" ]] && continue
+
 if [[ ${SLAVE_ENABLED[$i]} -ne 0 ]]; then 
 log_failure_msg "buildslave #${i}: unknown run status"
 errors=$(($errors+1))
@@ -93,7 +95,7 @@
 function do_op () {
 errors=0
 for i in $( seq ${#SLAVE_ENABLED[@]} ); do
-[[ ${SLAVE_ENABLED[$i]} -ne 0 ]] && continue
+[[ "${SLAVE_ENABLED[$i]}" != "0" ]] && continue
 
 # Some rhels don't come with all the lsb goodies
 if iscallable log_daemon_msg; then


Bug#625555: buildbot-slave: disabling a slave in /etc/default/buildslave does not work

2011-05-04 Thread Andreas Beckmann
Package: buildbot-slave
Version: 0.8.3-1
Severity: normal

Hi,

1) having 0=enabled is very very weird

2) disabling a slave does not work:

# invoke-rc.d buildslave start
Starting buildslave "disabled".
Another twistd server is running, PID 31564

This could either be a previously started instance of your application
or a
different application entirely. To start a new one, either run it in
some other
directory, or use the --pidfile and --logfile parameters to avoid
clashes.

Starting buildslave "whopper-amd64" ... failed!
invoke-rc.d: initscript buildslave, action "start" failed.


Andreas


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (500, 
'stable-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages buildbot-slave depends on:
ii  adduser   3.112+nmu2 add and remove users and groups
ii  python2.6.6-14   interactive high-level object-orie
ii  python-twisted-core   10.1.0-3   Event-based framework for internet
ii  python-twisted-words  10.1.0-1   Chat and Instant Messaging
ii  python2.6 2.6.6-8+b1 An interactive high-level object-o

buildbot-slave recommends no packages.

Versions of packages buildbot-slave suggests:
pn  buildbot   (no description available)
ii  cvs 1:1.12.13-12 Concurrent Versions System
ii  subversion  1.6.12dfsg-5 Advanced version control system

-- Configuration Files:
/etc/default/buildslave changed:
SLAVE_RUNNER=/usr/bin/buildslave
SLAVE_ENABLED[1]=no
SLAVE_NAME[1]="disabled"
SLAVE_USER[1]="buildbot"
SLAVE_BASEDIR[1]="/var/lib/buildbot/whopper-amd64"
SLAVE_OPTIONS[1]=""
SLAVE_PREFIXCMD[1]="nice -n 14 schroot -q -r -c buildbot-amd64 --"
SLAVE_ENABLED[2]=0
SLAVE_NAME[2]="whopper-amd64"
SLAVE_USER[2]="buildbot"
SLAVE_BASEDIR[2]="/var/lib/buildbot/whopper-amd64"
SLAVE_OPTIONS[2]=""
SLAVE_PREFIXCMD[2]="nice -n 14 schroot -q -r -c buildbot-amd64 --"


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org