Merge lp:~codehelp/lava-deployment-tool/worker-postgres into lp:~linaro-validation/lava-deployment-tool/trunk

Proposed by Neil Williams
Status: Merged
Approved by: Neil Williams
Approved revision: 256
Merged at revision: 256
Proposed branch: lp:~codehelp/lava-deployment-tool/worker-postgres
Merge into: lp:~linaro-validation/lava-deployment-tool/trunk
Diff against target: 55 lines (+16/-14)
1 file modified
lava-deployment-tool (+16/-14)
To merge this branch: bzr merge lp:~codehelp/lava-deployment-tool/worker-postgres
Reviewer Review Type Date Requested Status
Antonio Terceiro Approve
Review via email: mp+185075@code.launchpad.net

Description of the change

Fresh installs of a worker setup currently fail to connect to the master database. This patch ensures that a worker has sufficient postgres client support for the lava_scheduler_daemon to run correctly, including avoiding an unnecessary build of the uWSGI module on a worker without apache2.

To post a comment you must log in.
Revision history for this message
Antonio Terceiro (terceiro) wrote :

LGTM

 review approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava-deployment-tool'
2--- lava-deployment-tool 2013-09-11 14:03:47 +0000
3+++ lava-deployment-tool 2013-09-11 14:57:24 +0000
4@@ -59,7 +59,7 @@
5 oneiric|precise)
6 export LAVA_PYTHON=python2.7
7 export LAVA_SUPPORTED=1
8- LAVA_WORKER_LIST="whiptail python-virtualenv python-pip git build-essential $LAVA_PYTHON-dev libxml2-dev mercurial conmux linaro-image-tools unzip bzr sshfs"
9+ LAVA_WORKER_LIST="whiptail python-virtualenv python-pip git build-essential $LAVA_PYTHON-dev libxml2-dev mercurial conmux linaro-image-tools unzip bzr sshfs postgresql-client postgresql-common libpq-dev"
10 LAVA_SERVER_ADD="apache2 apache2-dev postgresql lava-coordinator python-sphinx python-versiontools"
11 ;;
12 quantal|raring)
13@@ -67,7 +67,7 @@
14 #see http://changelogs.ubuntu.com/changelogs/pool/main/a/apache2/apache2_2.2.22-6ubuntu2/changelog
15 export LAVA_PYTHON=python2.7
16 export LAVA_SUPPORTED=1
17- LAVA_WORKER_LIST="whiptail python-virtualenv python-pip git build-essential $LAVA_PYTHON-dev libxml2-dev mercurial conmux linaro-image-tools unzip bzr sshfs"
18+ LAVA_WORKER_LIST="whiptail python-virtualenv python-pip git build-essential $LAVA_PYTHON-dev libxml2-dev mercurial conmux linaro-image-tools unzip bzr sshfs postgresql-client postgresql-common libpq-dev"
19 LAVA_SERVER_ADD="apache2 apache2-threaded-dev postgresql lava-coordinator python-sphinx python-versiontools"
20 ;;
21 esac
22@@ -1601,19 +1601,21 @@
23 end script
24 LAVA_CONF
25
26- if [ \! -e /etc/apache2/mods-available/uwsgi.load ]; then
27- echo "Building uWSGI apache module..."
28- _tmpdir="$(mktemp -d)"
29+ if [ "$LAVA_INSTALL_STEPS" != "$LAVA_WORKER_STEPS" ] ; then
30+ if [ \! -e /etc/apache2/mods-available/uwsgi.load ]; then
31+ echo "Building uWSGI apache module..."
32+ _tmpdir="$(mktemp -d)"
33
34- trap "rm -rf \"${_tmpdir}\"" EXIT
35- set -x
36- pushd $_tmpdir
37- tar -xzf $LAVA_DOWNLOAD_CACHE/dist/uwsgi-$LAVA_UWSGI.tar.gz --strip-components=1
38- cd apache2
39- apxs2 -c mod_uwsgi.c
40- sudo apxs2 -i -a mod_uwsgi.la
41- popd
42- set +x
43+ trap "rm -rf \"${_tmpdir}\"" EXIT
44+ set -x
45+ pushd $_tmpdir
46+ tar -xzf $LAVA_DOWNLOAD_CACHE/dist/uwsgi-$LAVA_UWSGI.tar.gz --strip-components=1
47+ cd apache2
48+ apxs2 -c mod_uwsgi.c
49+ sudo apxs2 -i -a mod_uwsgi.la
50+ popd
51+ set +x
52+ fi
53 fi
54
55 # Store setup version

Subscribers

People subscribed via source and target branches