Merge lp:~allenap/maas/packaging.fix-cluster-installation into lp:~maas-maintainers/maas/packaging

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: 421
Merged at revision: 416
Proposed branch: lp:~allenap/maas/packaging.fix-cluster-installation
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 72 lines (+11/-2)
5 files modified
debian/maas-cluster-controller.config (+1/-1)
debian/maas-cluster-controller.maas-clusterd.service (+1/-1)
debian/maas-cluster-controller.postinst (+4/-0)
debian/maas-region-controller-min.maas-regiond-worker@.service (+1/-0)
debian/maas-region-controller-min.postinst (+4/-0)
To merge this branch: bzr merge lp:~allenap/maas/packaging.fix-cluster-installation
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+264416@code.launchpad.net

Commit message

Ensures that regiond.conf and clusterd.conf are both initialised after package installation.

maas-clusterd will also be restarted if the shared secret is missing. Previously it would never be started.

Description of the change

This builds on Andres's work in lp:~andreserl/maas/fix_cluster_install_1.9, and supersedes that branch.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

comments inline.

review: Needs Fixing
418. By Gavin Panella

Remove superfluous creation of an empty configuration file.

419. By Gavin Panella

Improve comments about unconditionally creating configuration files.

Revision history for this message
Gavin Panella (allenap) wrote :

Thanks for the review! Answers in the diff.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Comments inline. Please address the validation of regiond.conf and clusterd.conf existance. We should not be running *any* type of code unless otherwise necessary.

review: Approve
420. By Gavin Panella

Delay for 10s between unattended restarts of maas-regiond.

421. By Gavin Panella

Merge trunk.

Revision history for this message
Gavin Panella (allenap) wrote :

Thanks for the review! Replies inline. I'm not landing this until I can get a clear run in the manual CI so I imagine you have some time if you want to make more comments :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/maas-cluster-controller.config'
--- debian/maas-cluster-controller.config 2015-06-23 12:30:50 +0000
+++ debian/maas-cluster-controller.config 2015-07-13 18:13:40 +0000
@@ -12,7 +12,7 @@
12 db_get maas-cluster-controller/maas-url || true12 db_get maas-cluster-controller/maas-url || true
13 if [ -z "$RET" ]; then13 if [ -z "$RET" ]; then
14 # Attempt to pre-populate if installing on the region controller.14 # Attempt to pre-populate if installing on the region controller.
15 if [ -e /etc/maas/regiond.conf ]; then15 if [ -f /usr/sbin/maas-region-admin ]; then
16 url=$(maas-region-admin local_config_get --maas-url --plain)16 url=$(maas-region-admin local_config_get --maas-url --plain)
17 # If the URL doesn't end in /MAAS then add it. This helps upgrades from17 # If the URL doesn't end in /MAAS then add it. This helps upgrades from
18 # precise for which the URL didn't contain /MAAS, which is now required18 # precise for which the URL didn't contain /MAAS, which is now required
1919
=== modified file 'debian/maas-cluster-controller.maas-clusterd.service'
--- debian/maas-cluster-controller.maas-clusterd.service 2015-06-29 16:38:41 +0000
+++ debian/maas-cluster-controller.maas-clusterd.service 2015-07-13 18:13:40 +0000
@@ -3,12 +3,12 @@
3Documentation=https://maas.ubuntu.com/3Documentation=https://maas.ubuntu.com/
4Requires=network-online.target4Requires=network-online.target
5After=network-online.target5After=network-online.target
6ConditionPathExists=/var/lib/maas/secret
76
8[Service]7[Service]
9User=maas8User=maas
10Group=maas9Group=maas
11Restart=always10Restart=always
11RestartSec=10s
12Environment="LOGFILE=/var/log/maas/clusterd.log"12Environment="LOGFILE=/var/log/maas/clusterd.log"
13# Logs go to the journal; read them with13# Logs go to the journal; read them with
14# journalctl -u maas-clusterd14# journalctl -u maas-clusterd
1515
=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst 2015-07-03 02:33:20 +0000
+++ debian/maas-cluster-controller.postinst 2015-07-13 18:13:40 +0000
@@ -79,6 +79,10 @@
79 fi79 fi
80}80}
8181
82# Unconditionally ensure that there is at least an empty configuration
83# file. This does *not* overwrite any existing configuration.
84maas-provision config
85
82if [ "$1" = "configure" ] && [ -z "$2" ]; then86if [ "$1" = "configure" ] && [ -z "$2" ]; then
83 create_log_dir87 create_log_dir
84 create_var_dir88 create_var_dir
8589
=== modified file 'debian/maas-region-controller-min.maas-regiond-worker@.service'
--- debian/maas-region-controller-min.maas-regiond-worker@.service 2015-06-24 21:23:05 +0000
+++ debian/maas-region-controller-min.maas-regiond-worker@.service 2015-07-13 18:13:40 +0000
@@ -13,6 +13,7 @@
13User=maas13User=maas
14Group=maas14Group=maas
15Restart=always15Restart=always
16RestartSec=10s
16Environment="DJANGO_SETTINGS_MODULE=maas.settings"17Environment="DJANGO_SETTINGS_MODULE=maas.settings"
17Environment="PYTHONPATH=/usr/share/maas:/usr/lib/django16"18Environment="PYTHONPATH=/usr/share/maas:/usr/lib/django16"
18Environment="LOGFILE=/var/log/maas/regiond.log"19Environment="LOGFILE=/var/log/maas/regiond.log"
1920
=== modified file 'debian/maas-region-controller-min.postinst'
--- debian/maas-region-controller-min.postinst 2015-07-03 13:57:50 +0000
+++ debian/maas-region-controller-min.postinst 2015-07-13 18:13:40 +0000
@@ -38,6 +38,10 @@
38 ln -sf /var/log/apache2 /var/log/maas/38 ln -sf /var/log/apache2 /var/log/maas/
39}39}
4040
41# Unconditionally ensure that there is at least an empty configuration
42# file. This does *not* overwrite any existing configuration.
43maas-region-admin local_config_set
44
41if [ "$1" = "configure" ] && [ -z "$2" ]; then45if [ "$1" = "configure" ] && [ -z "$2" ]; then
42 #########################################################46 #########################################################
43 ################ Folder Permissions ####################47 ################ Folder Permissions ####################

Subscribers

People subscribed via source and target branches