Add ARGS to nodepool service configuration

Expose more configuration options to the user.

Change-Id: I7c112b23fecde9479a8b38b8996759072f375be9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-09-10 19:35:21 -04:00
parent aa5a476b6b
commit e895743f78
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
8 changed files with 23 additions and 12 deletions

View File

@ -6,4 +6,7 @@
# if you are using a virtualenv.
PREFIX=/usr/local
# Options to pass to nodepoold.
ARGS="-l /etc/nodepool/logging.conf"
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -6,4 +6,7 @@
# value if you are using a virtualenv.
PREFIX=/usr/local
# Options to pass to nodepool-builder.
ARGS="-l /etc/nodepool/logging.conf"
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -43,11 +43,10 @@ do_start()
# 2 if daemon could not be started
mkdir -p /var/run/$NAME
chown $USER /var/run/$NAME
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER \
--exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER \
--exec $DAEMON -- $ARGS || return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.

View File

@ -43,11 +43,11 @@ do_start()
# 2 if daemon could not be started
mkdir -p /var/run/$NAME
chown $USER /var/run/$NAME
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
chown $USER /var/run/$NAME
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER \
--exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER \
--exec $DAEMON -- $ARGS || return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.

View File

@ -6,4 +6,7 @@
# if you are using a virtualenv.
PREFIX=/usr
# Options to pass to nodepoold.
ARGS="-l /etc/nodepool/logging.conf"
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -6,4 +6,7 @@
# value if you are using a virtualenv.
PREFIX=/usr
# Options to pass to nodepool-builder.
ARGS="-l /etc/nodepool/logging.conf"
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -7,7 +7,7 @@ Type=simple
User=nodepool
Group=nodepool
EnvironmentFile=-/etc/sysconfig/nodepool-builder
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepool-builder -d -l /etc/nodepool/logging.conf"
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepool-builder -d ${ARGS}"
[Install]
WantedBy=multi-user.target

View File

@ -7,7 +7,7 @@ Type=simple
User=nodepool
Group=nodepool
EnvironmentFile=-/etc/sysconfig/nodepool
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepoold --no-builder -d -l /etc/nodepool/logging.conf"
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepoold -d --no-builder ${ARGS}"
[Install]
WantedBy=multi-user.target