Merge lp:~andreserl/maas/packaging_enable_authbind into lp:~maas-maintainers/maas/packaging

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 217
Merged at revision: 214
Proposed branch: lp:~andreserl/maas/packaging_enable_authbind
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 90 lines (+27/-2)
5 files modified
debian/changelog (+5/-1)
debian/control (+1/-0)
debian/maas-cluster-controller.maas-cluster-celery.upstart (+1/-1)
debian/maas-cluster-controller.postinst (+15/-0)
debian/maas-cluster-controller.postrm (+5/-0)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_enable_authbind
Reviewer Review Type Date Requested Status
Diogo Matsubara (community) Approve
Review via email: mp+197937@code.launchpad.net

Commit message

* Make use of authbind to allow maas-cluster-celery bind port as non-root.
  - debian/control: Depends on authbind for maas-cluster-controller.
  - debian/maas-cluster-controller.{postinst,postrm}: Handle creation
    and removal of required authbind file.

To post a comment you must log in.
215. By Andres Rodriguez

Update branch rev

216. By Andres Rodriguez

Update ubuntu rev

217. By Andres Rodriguez

* Make use of authbind to allow maas-cluster-celery bind port as non-root.
  - debian/control: Depends on authbind for maas-cluster-controller.
  - debian/maas-cluster-controller.{postinst,postrm}: Handle creation
    and removal of required authbind file.

Revision history for this message
Diogo Matsubara (matsubara) wrote :

I tested this change in the QA lab and it fixes the provisioningserver.tasks.periodic_probe_dhcp celery task failure <http://pastebin.ubuntu.com/6525577/>

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-11-13 14:57:27 +0000
+++ debian/changelog 2013-12-05 19:05:25 +0000
@@ -1,4 +1,4 @@
1maas (1.4+bzr1701+dfsg-0ubuntu2) UNRELEASED; urgency=low1maas (1.4+bzr1761+dfsg-0ubuntu1) UNRELEASED; urgency=low
22
3 * UNRELEASED3 * UNRELEASED
44
@@ -8,6 +8,10 @@
8 [ Andres Rodriguez ]8 [ Andres Rodriguez ]
9 * debian/maas-region-controller.postinst: Allo default-maas-url debconf9 * debian/maas-region-controller.postinst: Allo default-maas-url debconf
10 option to be preseeded.10 option to be preseeded.
11 * Make use of authbind to allow maas-cluster-celery bind port as non-root.
12 - debian/control: Depends on authbind for maas-cluster-controller.
13 - debian/maas-cluster-controller.{postinst,postrm}: Handle creation
14 and removal of required authbind file.
1115
12 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 10 Oct 2013 17:07:51 -040016 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 10 Oct 2013 17:07:51 -0400
1317
1418
=== modified file 'debian/control'
--- debian/control 2013-10-07 19:58:03 +0000
+++ debian/control 2013-12-05 19:05:25 +0000
@@ -166,6 +166,7 @@
166Package: maas-cluster-controller166Package: maas-cluster-controller
167Architecture: all167Architecture: all
168Depends: apache2,168Depends: apache2,
169 authbind,
169 bind9utils,170 bind9utils,
170 distro-info,171 distro-info,
171 freeipmi-tools,172 freeipmi-tools,
172173
=== modified file 'debian/maas-cluster-controller.maas-cluster-celery.upstart'
--- debian/maas-cluster-controller.maas-cluster-celery.upstart 2012-12-13 09:52:54 +0000
+++ debian/maas-cluster-controller.maas-cluster-celery.upstart 2013-12-05 19:05:25 +0000
@@ -26,5 +26,5 @@
26 # Allow the cluster-controller process to read CLUSTER_UUID as set26 # Allow the cluster-controller process to read CLUSTER_UUID as set
27 # in that config file.27 # in that config file.
28 export CLUSTER_UUID28 export CLUSTER_UUID
29 exec /usr/sbin/maas-provision start-cluster-controller $MAAS_URL -u maas -g maas29 exec /usr/bin/authbind --deep /usr/sbin/maas-provision start-cluster-controller $MAAS_URL -u maas -g maas
30end script30end script
3131
=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst 2013-10-08 13:50:53 +0000
+++ debian/maas-cluster-controller.postinst 2013-12-05 19:05:25 +0000
@@ -94,6 +94,20 @@
94 esac94 esac
95}95}
9696
97configure_cluster_authbind() {
98 MAAS_UID="`id -u maas`"
99 if [ ! -f "/etc/authbind/byuid/$MAAS_UID" ]; then
100 if [ ! -d "/etc/authbind/byuid" ]; then
101 mkdir -p /etc/authbind/byuid
102 chmod 755 /etc/authbind
103 chmod 755 /etc/authbind/byuid
104 fi
105 echo '0.0.0.0/0:68,68' >/etc/authbind/byuid/$MAAS_UID
106 chown maas:maas /etc/authbind/byuid/$MAAS_UID
107 chmod 700 /etc/authbind/byuid/$MAAS_UID
108 fi
109}
110
97restart_apache2(){111restart_apache2(){
98 if [ -x /usr/sbin/invoke-rc.d ]; then112 if [ -x /usr/sbin/invoke-rc.d ]; then
99 invoke-rc.d apache2 restart || true113 invoke-rc.d apache2 restart || true
@@ -139,6 +153,7 @@
139 /etc/maas/maas_cluster.conf153 /etc/maas/maas_cluster.conf
140154
141 configure_cluster_uuid155 configure_cluster_uuid
156 configure_cluster_authbind
142 enable_apache_version_mod157 enable_apache_version_mod
143 configure_cluster_http158 configure_cluster_http
144 restart_apache2159 restart_apache2
145160
=== modified file 'debian/maas-cluster-controller.postrm'
--- debian/maas-cluster-controller.postrm 2013-07-29 19:50:11 +0000
+++ debian/maas-cluster-controller.postrm 2013-12-05 19:05:25 +0000
@@ -35,4 +35,9 @@
35 rm -rf /etc/tgt/conf.d/maas.conf35 rm -rf /etc/tgt/conf.d/maas.conf
36 fi36 fi
3737
38 # Remove authbind
39 MAAS_UID="`id -u maas`"
40 if [ -f "/etc/authbind/byuid/$MAAS_UID" ]; then
41 rm -rf /etc/authbind/byuid/$MAAS_UID
42 fi
38esac43esac

Subscribers

People subscribed via source and target branches

to all changes: