Merge lp:~codehelp/lava-deployment-tool/1224613 into lp:~linaro-validation/lava-deployment-tool/trunk
Proposed by
Neil Williams
Status: | Merged |
---|---|
Approved by: | Neil Williams |
Approved revision: | 259 |
Merged at revision: | 258 |
Proposed branch: | lp:~codehelp/lava-deployment-tool/1224613 |
Merge into: | lp:~linaro-validation/lava-deployment-tool/trunk |
Prerequisite: | lp:~codehelp/lava-deployment-tool/salt-docs |
Diff against target: |
76 lines (+28/-5) 1 file modified
lava-deployment-tool (+28/-5) |
To merge this branch: | bzr merge lp:~codehelp/lava-deployment-tool/1224613 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Antonio Terceiro | Approve | ||
Review via email: mp+185442@code.launchpad.net |
Description of the change
Adds idempotent support for creating the lava-coordinator configuration file on worker nodes only.
To post a comment you must log in.
> === modified file 'lava-deploymen t-tool' -tool 2013-09-13 09:05:47 +0000 -tool 2013-09-13 09:05:48 +0000 STEPS=" devmode user fs buildout database web_hosting app config_app docs" STEPS=" get_master devmode user fs buildout remote_database web_hosting app config_app remote_fs" STEPS=" get_master devmode user fs buildout remote_database web_hosting app config_app remote_fs coordinator" FS_HOST | sudo -u $LAVA_SYS_USER tee $sshdir/known_hosts coordinator () { coordinator ]; then coordinator coordinator/ lava-coordinato r.conf ]; then coordinator/ lava-coordinato r.conf" <<EOF
> --- lava-deployment
> +++ lava-deployment
> @@ -33,7 +33,7 @@
>
> # Installation and configuration steps (all the wizard_xxx install_xxx functions)
> LAVA_INSTALL_
> -LAVA_WORKER_
> +LAVA_WORKER_
>
> # Will cause Django to be run with DEBUG enabled.
> LAVA_DEV_MODE=no
> @@ -666,6 +666,27 @@
> ssh-keyscan -H $LAVA_REMOTE_
> }
>
> +install_
> + # put the lava-coordinator conf file in place
> + if [ ! -d /etc/lava-
> + sudo mkdir /etc/lava-
> + fi
> + if [ ! -f /etc/lava-
> + sudo sh -c "cat >/etc/lava-
this won't work because the shell redirection is handled by shell running the -tool process with the UID of the user running it.
lava-deployment
you want something like this:
sudo tee /etc/lava- coordinator/ lava-coordinato r.conf >/dev/null <<EOF