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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 444
Merged at revision: 443
Proposed branch: lp:~andreserl/maas/rename_cluster_to_rack_packaging
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 974 lines (+345/-367)
31 files modified
debian/changelog (+3/-2)
debian/control (+8/-22)
debian/maas-cluster-controller.config (+0/-36)
debian/maas-cluster-controller.dirs (+0/-2)
debian/maas-cluster-controller.install (+0/-14)
debian/maas-cluster-controller.lintian-overrides (+0/-1)
debian/maas-cluster-controller.logrotate (+0/-15)
debian/maas-cluster-controller.maas-clusterd.service (+0/-22)
debian/maas-cluster-controller.maintscript (+0/-16)
debian/maas-cluster-controller.postinst (+0/-125)
debian/maas-cluster-controller.postrm (+0/-35)
debian/maas-cluster-controller.preinst (+0/-43)
debian/maas-cluster-controller.templates (+0/-16)
debian/maas-rack-controller.config (+36/-0)
debian/maas-rack-controller.dirs (+2/-0)
debian/maas-rack-controller.install (+14/-0)
debian/maas-rack-controller.lintian-overrides (+1/-0)
debian/maas-rack-controller.logrotate (+15/-0)
debian/maas-rack-controller.maas-rackd.service (+22/-0)
debian/maas-rack-controller.maintscript (+16/-0)
debian/maas-rack-controller.postinst (+125/-0)
debian/maas-rack-controller.postrm (+35/-0)
debian/maas-rack-controller.preinst (+43/-0)
debian/maas-rack-controller.templates (+16/-0)
debian/maas-region-controller-min.apport (+4/-4)
debian/maas-region-controller.postinst (+2/-2)
debian/python-django-maas.install (+0/-2)
debian/python-maas-client.install (+0/-1)
debian/python-maas-provisioningserver.install (+0/-4)
debian/python-maas-provisioningserver.lintian-overrides (+0/-2)
debian/rules (+3/-3)
To merge this branch: bzr merge lp:~andreserl/maas/rename_cluster_to_rack_packaging
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+285034@code.launchpad.net

Commit message

Initial packaging changes to support Rack Controllers instead of Cluster Controllers.

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

update

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

selfie!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-02-01 17:37:46 +0000
3+++ debian/changelog 2016-02-04 10:56:13 +0000
4@@ -1,6 +1,7 @@
5-maas (2.0.0~alpha1+bzr4622-0ubuntu1) UNRELEASED; urgency=medium
6+maas (2.0.0~alpha1+bzr4633-0ubuntu1) UNRELEASED; urgency=medium
7
8- * UNRELEASED
9+ * New usptream release:
10+ * Rename maas-cluster* to maas-rack*.
11
12 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 01 Feb 2016 18:18:52 +0100
13
14
15=== modified file 'debian/control'
16--- debian/control 2016-02-01 17:40:53 +0000
17+++ debian/control 2016-02-04 10:56:13 +0000
18@@ -17,7 +17,7 @@
19
20 Package: maas
21 Architecture: all
22-Depends: maas-cluster-controller (= ${binary:Version}),
23+Depends: maas-rack-controller (= ${binary:Version}),
24 maas-region-controller (= ${binary:Version}),
25 python3-django-maas (= ${binary:Version}),
26 ${misc:Depends}
27@@ -68,8 +68,6 @@
28 ubuntu-cloudimage-keyring,
29 ${misc:Depends},
30 ${python3:Depends}
31-Breaks: maas-region-controller ( <= 1.4+bzr1693+dfsg-0ubuntu3 )
32-Replaces: maas-region-controller ( <= 1.4+bzr1693+dfsg-0ubuntu3 )
33 Description: MAAS Server minimum region controller
34 This package installs and configures the minimum region controller
35 services provided by MAAS, including the web UI, caching package proxy,
36@@ -115,12 +113,6 @@
37 iproute2,
38 ${misc:Depends},
39 ${python3:Depends}
40-Breaks: maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3),
41- maas-dhcp (<= 1.4+bzr1817+dfsg-0ubuntu1),
42- python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
43-Replaces: maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3),
44- maas-dhcp (<= 1.4+bzr1817+dfsg-0ubuntu1),
45- python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
46 Description: MAAS server provisioning libraries (Python 3)
47 This package provides the MAAS provisioning server python libraries.
48 .
49@@ -144,14 +136,14 @@
50 Section: python
51 Architecture: all
52 Depends: python3-oauth, ${misc:Depends}, ${python3:Depends}
53-Breaks: maas (<= 0.1+bzr971+dfsg-0ubuntu2 ), python-maas-client
54-Replaces: maas (<= 0.1+bzr971+dfsg-0ubuntu2 ), python-maas-client
55+Breaks: python-maas-client
56+Replaces: python-maas-client
57 Description: MAAS python API client (Python 3)
58 This package contains the MAAS client API Python modules.
59 .
60 This package contains Python 3 modules.
61
62-Package: maas-cluster-controller
63+Package: maas-rack-controller
64 Architecture: all
65 Depends: authbind,
66 bind9utils,
67@@ -178,12 +170,10 @@
68 ${python3:Depends}
69 Suggests: amtterm, ipmitool, libvirt-bin, python3-pyvmomi
70 Conflicts: tftpd-hpa
71-Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ),
72- maas-region-controller ( <= 0.1+bzr1314+dfsg-0ubuntu1 ),
73- python-maas-provisioningserver
74-Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ),
75- maas-region-controller ( <= 0.1+bzr1314+dfsg-0ubuntu1 ),
76- python-maas-provisioningserver
77+Breaks: python-maas-provisioningserver,
78+ maas-cluster-controller
79+Replaces: python-maas-provisioningserver,
80+ maas-cluster-controller
81 Description: MAAS server cluster controller
82 This package contains the MAAS cluster controller, which is responsible
83 for enabling and controlling remote DHCP/TFTP instances on their own
84@@ -216,8 +206,6 @@
85 Package: maas-dhcp
86 Architecture: all
87 Depends: isc-dhcp-server (>= 4.2.4), ${misc:Depends}
88-Breaks: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
89-Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
90 Description: MAAS DHCP server
91 This package installs and configures a DHCP server that can be used by
92 MAAS, and enhances the overall MAAS user experience.
93@@ -228,8 +216,6 @@
94 maas-region-controller-min (= ${binary:Version}),
95 ${misc:Depends}
96 Conflicts: dnsmasq
97-Breaks: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
98-Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
99 Description: MAAS DNS server
100 This package installs and configures a DNS server that can be used by
101 MAAS, and enhances the overall MAAS user experience.
102
103=== removed file 'debian/maas-cluster-controller.config'
104--- debian/maas-cluster-controller.config 2015-07-08 19:47:45 +0000
105+++ debian/maas-cluster-controller.config 1970-01-01 00:00:00 +0000
106@@ -1,36 +0,0 @@
107-#!/bin/sh
108-
109-set -e
110-
111-. /usr/share/debconf/confmodule
112-db_version 2.0
113-
114-# Only ask for new installations and reconfiguring.
115-# XXX Fix to not ask when installing from the CD.
116-if ([ "$1" = "configure" ] && [ -z "$2" ]); then
117-
118- db_get maas-cluster-controller/maas-url || true
119- if [ -z "$RET" ]; then
120- # Attempt to pre-populate if installing on the region controller.
121- if [ -f /usr/sbin/maas-region-admin ]; then
122- url=$(maas-region-admin local_config_get --maas-url --plain)
123- # If the URL doesn't end in /MAAS then add it. This helps upgrades from
124- # precise for which the URL didn't contain /MAAS, which is now required
125- if ! echo $url | grep -qs "/MAAS$"; then
126- url="${url}/MAAS"
127- fi
128- db_set maas-cluster-controller/maas-url "$url"
129- else
130- # Will only get here if dbconf value not already set, or
131- # /etc/maas/regiond.conf doesn't exist.
132- db_input medium maas-cluster-controller/maas-url || true
133- db_go
134- fi
135- fi
136-fi
137-
138-if [ "$1" = "reconfigure" ]; then
139- db_input high maas-cluster-controller/maas-url || true
140- db_go
141-fi
142-#DEBHELPER#
143
144=== removed file 'debian/maas-cluster-controller.dirs'
145--- debian/maas-cluster-controller.dirs 2014-04-03 17:51:04 +0000
146+++ debian/maas-cluster-controller.dirs 1970-01-01 00:00:00 +0000
147@@ -1,2 +0,0 @@
148-etc/maas
149-var/lib/maas/boot-resources
150
151=== removed file 'debian/maas-cluster-controller.install'
152--- debian/maas-cluster-controller.install 2015-12-20 21:21:02 +0000
153+++ debian/maas-cluster-controller.install 1970-01-01 00:00:00 +0000
154@@ -1,14 +0,0 @@
155-# Install templates
156-debian/tmp/etc/maas/templates/dhcp
157-debian/tmp/etc/maas/templates/power
158-debian/tmp/etc/maas/templates/pxe
159-debian/tmp/etc/maas/templates/uefi
160-
161-# Install uec2roottar
162-debian/tmp/usr/bin/uec2roottar
163-
164-# Install all other stuff
165-debian/extras/99-maas-sudoers etc/sudoers.d
166-debian/extras/isc-dhcp-server.override etc/init
167-debian/extras/maas-probe-dhcp usr/sbin
168-debian/extras/maas-provision usr/sbin
169
170=== removed file 'debian/maas-cluster-controller.lintian-overrides'
171--- debian/maas-cluster-controller.lintian-overrides 2014-03-27 04:49:52 +0000
172+++ debian/maas-cluster-controller.lintian-overrides 1970-01-01 00:00:00 +0000
173@@ -1,1 +0,0 @@
174-maas-cluster-controller: binary-without-manpage usr/bin/uec2roottar
175
176=== removed file 'debian/maas-cluster-controller.logrotate'
177--- debian/maas-cluster-controller.logrotate 2015-01-22 21:58:00 +0000
178+++ debian/maas-cluster-controller.logrotate 1970-01-01 00:00:00 +0000
179@@ -1,15 +0,0 @@
180-/var/log/maas/clusterd.log {
181- rotate 5
182- weekly
183- compress
184- missingok
185- # copytruncate may lose log messages at the moment of rotation, but
186- # there is no better way to integrate twistd and logrotate.
187- copytruncate
188- # The logs are all owned by the `maas` user, so drop privs.
189- su maas maas
190- # Don't rotate unless the log is at least 10MB.
191- minsize 10M
192- # Force rotation if the log grows beyond 50MB.
193- maxsize 50M
194-}
195
196=== removed file 'debian/maas-cluster-controller.maas-clusterd.service'
197--- debian/maas-cluster-controller.maas-clusterd.service 2015-12-09 02:18:13 +0000
198+++ debian/maas-cluster-controller.maas-clusterd.service 1970-01-01 00:00:00 +0000
199@@ -1,22 +0,0 @@
200-[Unit]
201-Description=MAAS Cluster Controller
202-Documentation=https://maas.ubuntu.com/
203-Requires=network-online.target
204-After=network-online.target
205-
206-[Service]
207-User=maas
208-Group=maas
209-Restart=always
210-RestartSec=10s
211-Environment="LOGFILE=/var/log/maas/clusterd.log"
212-# Logs go to the journal; read them with
213-# journalctl -u maas-clusterd
214-# Logs also go to $LOGFILE for backward compatibility. The journal
215-# should now be preferred as the $LOGFILE will be removed in MAAS 1.9.
216-ExecStart=/bin/sh -c \
217- 'exec /usr/bin/authbind --deep /usr/bin/twistd3 --nodaemon --pidfile= \
218- maas-clusterd 2>&1 | tee -a $LOGFILE'
219-
220-[Install]
221-WantedBy=multi-user.target
222
223=== removed file 'debian/maas-cluster-controller.maintscript'
224--- debian/maas-cluster-controller.maintscript 2015-08-26 11:42:17 +0000
225+++ debian/maas-cluster-controller.maintscript 1970-01-01 00:00:00 +0000
226@@ -1,16 +0,0 @@
227-rm_conffile /etc/maas/bootresources.yaml 1.7.0~beta1+bzr2781-0ubuntu1
228-rm_conffile /etc/maas/maas_local_celeryconfig_cluster.py 1.7.0~beta3+bzr3043-0ubuntu1
229-rm_conffile /etc/init/maas-cluster-celery.conf 1.7.0~beta3+bzr3043-0ubuntu1
230-rm_conffile /etc/init/maas-pserv.conf 1.7.0~beta3+bzr3043-0ubuntu1
231-rm_conffile /etc/init/maas-cluster.conf 1.7.0~beta6+bzr3231-0ubuntu1
232-rm_conffile /etc/init/maas-cluster-register.conf 1.7.0~beta6+bzr3231-0ubuntu1
233-rm_conffile /etc/maas/maas-cluster-http.conf 1.8.0~alpha1+bzr3522-0ubuntu1
234-rm_conffile /etc/maas/templates/power/apc.template 1.9.0~alpha1+bzr4184-0ubuntu1
235-rm_conffile /etc/maas/templates/power/mscm.template 1.9.0~alpha1+bzr4184-0ubuntu1
236-rm_conffile /etc/maas/templates/power/msftocs.template 1.9.0~alpha1+bzr4184-0ubuntu1
237-rm_conffile /etc/maas/templates/power/sm15k.template 1.9.0~alpha1+bzr4184-0ubuntu1
238-rm_conffile /etc/maas/templates/power/ucsm.template 1.9.0~alpha1+bzr4184-0ubuntu1
239-rm_conffile /etc/maas/templates/power/virsh.template 1.9.0~alpha1+bzr4184-0ubuntu1
240-rm_conffile /etc/maas/templates/power/vmware.template 1.9.0~alpha1+bzr4184-0ubuntu1
241-rm_conffile /etc/maas/templates/power/ipmi.conf 1.9.0~alpha1+bzr4221-0ubuntu1
242-rm_conffile /etc/maas/templates/power/ipmi.template 1.9.0~alpha1+bzr4221-0ubuntu1
243
244=== removed file 'debian/maas-cluster-controller.postinst'
245--- debian/maas-cluster-controller.postinst 2015-08-08 10:51:15 +0000
246+++ debian/maas-cluster-controller.postinst 1970-01-01 00:00:00 +0000
247@@ -1,125 +0,0 @@
248-#!/bin/sh
249-
250-set -e
251-
252-. /usr/share/debconf/confmodule
253-db_version 2.0
254-
255-RELEASE=`lsb_release -rs` || RELEASE=""
256-
257-create_var_dir() {
258- # create var dir
259- if [ ! -d /var/lib/maas ]; then
260- mkdir -p /var/lib/maas
261- fi
262- chown -R maas:maas /var/lib/maas/
263-
264-}
265-create_log_dir() {
266- # Give appropriate permissions
267- if [ ! -f /var/log/maas/clusterd.log ]; then
268- touch /var/log/maas/clusterd.log
269- fi
270- chown maas:maas /var/log/maas/clusterd.log
271-}
272-
273-configure_maas_tgt() {
274- # Ensure that iSCSI targets get re-defined on reboot.
275- # Creates a softlink in /etc/tgt/conf.d/ that points to the current
276- # boot images' tgt configuration.
277- mkdir -p /etc/tgt/conf.d
278- ln -sf /var/lib/maas/boot-resources/current/maas.tgt /etc/tgt/conf.d/maas.conf
279-}
280-
281-extract_cluster_uuid(){
282- # Extract ClUSTER_UUID setting from config file $1. This will work
283- # on the old the cluster config file (which is shell).
284- awk '{ split($1,array,"\"")} END{print array[2] }' "$1"
285-}
286-
287-extract_maas_url(){
288- # Extract the MAAS_URL setting from the config file $1.
289- grep -Eo "https?://[^ ]+" "$1" | cut -d"\"" -f1
290-}
291-
292-configure_cluster_uuid(){
293- # This will configure a UUID if one has not previously been set.
294- maas-provision config --init
295-}
296-
297-configure_cluster_authbind() {
298- MAAS_UID="`id -u maas`"
299- if [ ! -f "/etc/authbind/byuid/$MAAS_UID" ]; then
300- if [ ! -d "/etc/authbind/byuid" ]; then
301- mkdir -p /etc/authbind/byuid
302- chmod 755 /etc/authbind
303- chmod 755 /etc/authbind/byuid
304- fi
305- fi
306- echo '0.0.0.0/0:68,69' >/etc/authbind/byuid/$MAAS_UID
307- echo '::/0,68-69' >>/etc/authbind/byuid/$MAAS_UID
308- chown maas:maas /etc/authbind/byuid/$MAAS_UID
309- chmod 700 /etc/authbind/byuid/$MAAS_UID
310-}
311-
312-configure_maas_url(){
313- # Get the MAAS URL on configure/reconfigure and write it to the conf files.
314- db_get maas-cluster-controller/maas-url || true
315- if [ -n "$RET" ]; then
316- maas-provision config --region-url "$RET"
317- fi
318-}
319-
320-configure_shared_secret() {
321- db_get maas-cluster-controller/shared-secret || true
322- if [ -n "$RET" ]; then
323- echo "$RET" | maas-provision install-shared-secret
324- chown maas:maas /var/lib/maas/secret
325- chmod 0640 /var/lib/maas/secret
326- fi
327-}
328-
329-# Unconditionally ensure that there is at least an empty configuration
330-# file. This does *not* overwrite any existing configuration.
331-maas-provision config
332-
333-if [ "$1" = "configure" ] && [ -z "$2" ]; then
334- create_log_dir
335- create_var_dir
336- configure_maas_tgt
337- configure_maas_url
338- configure_cluster_uuid
339- configure_cluster_authbind
340- maas-provision upgrade-cluster
341-
342-elif [ -n "$DEBCONF_RECONFIGURE" ]; then
343- configure_maas_url
344- # Only ask for a shared secret when the region is not installed
345- # on the same system.
346- if [ ! -f /usr/sbin/maas-region-admin ]; then
347- db_input high maas-cluster-controller/shared-secret
348- db_go
349- fi
350- configure_shared_secret
351-
352-elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
353- # If we are upgrading from an older version, then we need to obtain
354- # the cluster UUID from the old configuration file and set it with
355- # the new configuration tool.
356- if [ -f /etc/maas/maas_cluster.conf ]; then
357- uuid=$(extract_cluster_uuid /etc/maas/maas_cluster.conf)
358- maas-provision config --uuid "$uuid"
359- maas_url=$(extract_maas_url /etc/maas/maas_cluster.conf)
360- maas-provision config --region-url "$maas_url"
361- db_set maas-cluster-controller/maas-url "$maas_url"
362- mv /etc/maas/maas_cluster.conf /etc/maas/maas_cluster.conf.maas-old
363- mv /etc/maas/pserv.yaml /etc/maas/pserv.yaml.maas-old
364- fi
365-
366- configure_cluster_authbind
367- maas-provision upgrade-cluster
368-fi
369-
370-db_stop
371-
372-#DEBHELPER#
373
374=== removed file 'debian/maas-cluster-controller.postrm'
375--- debian/maas-cluster-controller.postrm 2015-07-03 14:26:39 +0000
376+++ debian/maas-cluster-controller.postrm 1970-01-01 00:00:00 +0000
377@@ -1,35 +0,0 @@
378-#!/bin/sh
379-
380-set -e
381-
382-#DEBHELPER#
383-
384-RELEASE=`lsb_release -rs` || RELEASE=""
385-
386-case "$1" in
387- purge)
388- # remove log directory
389- rm -rf /var/log/maas
390- # remove var directory
391- DIR=/var/lib/maas
392- if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
393- rm -rf /var/lib/maas
394- fi
395-
396- # Delete symlink for iSCSI config.
397- if [ -L /etc/tgt/conf.d/maas.conf ]; then
398- rm -rf /etc/tgt/conf.d/maas.conf
399- fi
400-
401- # Remove authbind
402- MAAS_UID="`id -u maas`"
403- if [ -f "/etc/authbind/byuid/$MAAS_UID" ]; then
404- rm -rf /etc/authbind/byuid/$MAAS_UID
405- fi
406-
407- # Deleting old/new config files
408- rm -rf /etc/maas/pserv.yaml.maas-old
409- rm -rf /etc/maas/maas_cluster.conf.maas-old
410- rm -rf /etc/maas/clusterd.conf
411-
412-esac
413
414=== removed file 'debian/maas-cluster-controller.preinst'
415--- debian/maas-cluster-controller.preinst 2015-02-18 04:09:08 +0000
416+++ debian/maas-cluster-controller.preinst 1970-01-01 00:00:00 +0000
417@@ -1,43 +0,0 @@
418-#!/bin/sh
419-
420-set -e
421-
422-. /usr/share/debconf/confmodule
423-
424-if [ "$1" = "upgrade" ]; then
425-
426- if dpkg --compare-versions "$2" lt 1.7.0~beta3+bzr3066-0ubuntu1; then
427- if [ -f /etc/init/maas-pserv.conf ]; then
428- invoke-rc.d maas-pserv stop
429- fi
430-
431- if [ -f /etc/init/maas-cluster-celery.conf ]; then
432- invoke-rc.d maas-cluster-celery stop
433- fi
434-
435- if [ -f /var/log/maas/celery.log ]; then
436- rm -rf /var/log/maas/celery.log
437- fi
438- fi
439-
440- if dpkg --compare-versions "$2" lt 1.7.0~beta6+bzr3232-0ubuntu1; then
441- if [ -f /etc/init/maas-cluster.conf ]; then
442- invoke-rc.d maas-cluster stop
443- fi
444- fi
445-
446- if dpkg --compare-versions "$2" lt 1.8.0~alpha1+bzr3486-0ubuntu1; then
447- if [ -f /var/log/maas/pserv.log ]; then
448- rm -rf /var/log/maas/pserv.log
449- fi
450- fi
451-
452- if dpkg --compare-versions "$2" lt 1.8.0~alpha1+bzr3523-0ubuntu1; then
453- if [ -f /etc/apache2/conf-enabled/maas-cluster-http.conf ]; then
454- rm -rf /etc/apache2/conf-enabled/maas-cluster-http.conf
455- fi
456- fi
457-
458-fi
459-
460-#DEBHELPER#
461
462=== removed file 'debian/maas-cluster-controller.templates'
463--- debian/maas-cluster-controller.templates 2014-10-14 06:55:35 +0000
464+++ debian/maas-cluster-controller.templates 1970-01-01 00:00:00 +0000
465@@ -1,16 +0,0 @@
466-Template: maas-cluster-controller/maas-url
467-Type: string
468-Default:
469-_Description: Ubuntu MAAS API address:
470- The MAAS cluster controller and nodes need to contact the MAAS region
471- controller API. Set the URL at which they can reach the MAAS API remotely,
472- e.g. "http://192.168.1.1/MAAS".
473- Since nodes must be able to access this URL, localhost or 127.0.0.1 are not
474- useful values here.
475-
476-Template: maas-cluster-controller/shared-secret
477-Type: password
478-Default:
479-_Description: MAAS Cluster Controller Shared Secret:
480- The MAAS Cluster Controller needs to contact the MAAS server
481- with a share secret. Set the shared secret here.
482
483=== added file 'debian/maas-rack-controller.config'
484--- debian/maas-rack-controller.config 1970-01-01 00:00:00 +0000
485+++ debian/maas-rack-controller.config 2016-02-04 10:56:13 +0000
486@@ -0,0 +1,36 @@
487+#!/bin/sh
488+
489+set -e
490+
491+. /usr/share/debconf/confmodule
492+db_version 2.0
493+
494+# Only ask for new installations and reconfiguring.
495+# XXX Fix to not ask when installing from the CD.
496+if ([ "$1" = "configure" ] && [ -z "$2" ]); then
497+
498+ db_get maas-rack-controller/maas-url || true
499+ if [ -z "$RET" ]; then
500+ # Attempt to pre-populate if installing on the region controller.
501+ if [ -f /usr/sbin/maas-region-admin ]; then
502+ url=$(maas-region-admin local_config_get --maas-url --plain)
503+ # If the URL doesn't end in /MAAS then add it. This helps upgrades from
504+ # precise for which the URL didn't contain /MAAS, which is now required
505+ if ! echo $url | grep -qs "/MAAS$"; then
506+ url="${url}/MAAS"
507+ fi
508+ db_set maas-rack-controller/maas-url "$url"
509+ else
510+ # Will only get here if dbconf value not already set, or
511+ # /etc/maas/regiond.conf doesn't exist.
512+ db_input medium maas-rack-controller/maas-url || true
513+ db_go
514+ fi
515+ fi
516+fi
517+
518+if [ "$1" = "reconfigure" ]; then
519+ db_input high maas-rack-controller/maas-url || true
520+ db_go
521+fi
522+#DEBHELPER#
523
524=== added file 'debian/maas-rack-controller.dirs'
525--- debian/maas-rack-controller.dirs 1970-01-01 00:00:00 +0000
526+++ debian/maas-rack-controller.dirs 2016-02-04 10:56:13 +0000
527@@ -0,0 +1,2 @@
528+etc/maas
529+var/lib/maas/boot-resources
530
531=== added file 'debian/maas-rack-controller.install'
532--- debian/maas-rack-controller.install 1970-01-01 00:00:00 +0000
533+++ debian/maas-rack-controller.install 2016-02-04 10:56:13 +0000
534@@ -0,0 +1,14 @@
535+# Install templates
536+debian/tmp/etc/maas/templates/dhcp
537+debian/tmp/etc/maas/templates/power
538+debian/tmp/etc/maas/templates/pxe
539+debian/tmp/etc/maas/templates/uefi
540+
541+# Install uec2roottar
542+debian/tmp/usr/bin/uec2roottar
543+
544+# Install all other stuff
545+debian/extras/99-maas-sudoers etc/sudoers.d
546+debian/extras/isc-dhcp-server.override etc/init
547+debian/extras/maas-probe-dhcp usr/sbin
548+debian/extras/maas-provision usr/sbin
549
550=== added file 'debian/maas-rack-controller.lintian-overrides'
551--- debian/maas-rack-controller.lintian-overrides 1970-01-01 00:00:00 +0000
552+++ debian/maas-rack-controller.lintian-overrides 2016-02-04 10:56:13 +0000
553@@ -0,0 +1,1 @@
554+maas-rack-controller: binary-without-manpage usr/bin/uec2roottar
555
556=== added file 'debian/maas-rack-controller.logrotate'
557--- debian/maas-rack-controller.logrotate 1970-01-01 00:00:00 +0000
558+++ debian/maas-rack-controller.logrotate 2016-02-04 10:56:13 +0000
559@@ -0,0 +1,15 @@
560+/var/log/maas/rackd.log {
561+ rotate 5
562+ weekly
563+ compress
564+ missingok
565+ # copytruncate may lose log messages at the moment of rotation, but
566+ # there is no better way to integrate twistd and logrotate.
567+ copytruncate
568+ # The logs are all owned by the `maas` user, so drop privs.
569+ su maas maas
570+ # Don't rotate unless the log is at least 10MB.
571+ minsize 10M
572+ # Force rotation if the log grows beyond 50MB.
573+ maxsize 50M
574+}
575
576=== added file 'debian/maas-rack-controller.maas-rackd.service'
577--- debian/maas-rack-controller.maas-rackd.service 1970-01-01 00:00:00 +0000
578+++ debian/maas-rack-controller.maas-rackd.service 2016-02-04 10:56:13 +0000
579@@ -0,0 +1,22 @@
580+[Unit]
581+Description=MAAS Cluster Controller
582+Documentation=https://maas.ubuntu.com/
583+Requires=network-online.target
584+After=network-online.target
585+
586+[Service]
587+User=maas
588+Group=maas
589+Restart=always
590+RestartSec=10s
591+Environment="LOGFILE=/var/log/maas/rackd.log"
592+# Logs go to the journal; read them with
593+# journalctl -u maas-rackd
594+# Logs also go to $LOGFILE for backward compatibility. The journal
595+# should now be preferred as the $LOGFILE will be removed in MAAS 1.9.
596+ExecStart=/bin/sh -c \
597+ 'exec /usr/bin/authbind --deep /usr/bin/twistd3 --nodaemon --pidfile= \
598+ maas-rackd 2>&1 | tee -a $LOGFILE'
599+
600+[Install]
601+WantedBy=multi-user.target
602
603=== added file 'debian/maas-rack-controller.maintscript'
604--- debian/maas-rack-controller.maintscript 1970-01-01 00:00:00 +0000
605+++ debian/maas-rack-controller.maintscript 2016-02-04 10:56:13 +0000
606@@ -0,0 +1,16 @@
607+rm_conffile /etc/maas/bootresources.yaml 1.7.0~beta1+bzr2781-0ubuntu1
608+rm_conffile /etc/maas/maas_local_celeryconfig_cluster.py 1.7.0~beta3+bzr3043-0ubuntu1
609+rm_conffile /etc/init/maas-cluster-celery.conf 1.7.0~beta3+bzr3043-0ubuntu1
610+rm_conffile /etc/init/maas-pserv.conf 1.7.0~beta3+bzr3043-0ubuntu1
611+rm_conffile /etc/init/maas-cluster.conf 1.7.0~beta6+bzr3231-0ubuntu1
612+rm_conffile /etc/init/maas-cluster-register.conf 1.7.0~beta6+bzr3231-0ubuntu1
613+rm_conffile /etc/maas/maas-cluster-http.conf 1.8.0~alpha1+bzr3522-0ubuntu1
614+rm_conffile /etc/maas/templates/power/apc.template 1.9.0~alpha1+bzr4184-0ubuntu1
615+rm_conffile /etc/maas/templates/power/mscm.template 1.9.0~alpha1+bzr4184-0ubuntu1
616+rm_conffile /etc/maas/templates/power/msftocs.template 1.9.0~alpha1+bzr4184-0ubuntu1
617+rm_conffile /etc/maas/templates/power/sm15k.template 1.9.0~alpha1+bzr4184-0ubuntu1
618+rm_conffile /etc/maas/templates/power/ucsm.template 1.9.0~alpha1+bzr4184-0ubuntu1
619+rm_conffile /etc/maas/templates/power/virsh.template 1.9.0~alpha1+bzr4184-0ubuntu1
620+rm_conffile /etc/maas/templates/power/vmware.template 1.9.0~alpha1+bzr4184-0ubuntu1
621+rm_conffile /etc/maas/templates/power/ipmi.conf 1.9.0~alpha1+bzr4221-0ubuntu1
622+rm_conffile /etc/maas/templates/power/ipmi.template 1.9.0~alpha1+bzr4221-0ubuntu1
623
624=== added file 'debian/maas-rack-controller.postinst'
625--- debian/maas-rack-controller.postinst 1970-01-01 00:00:00 +0000
626+++ debian/maas-rack-controller.postinst 2016-02-04 10:56:13 +0000
627@@ -0,0 +1,125 @@
628+#!/bin/sh
629+
630+set -e
631+
632+. /usr/share/debconf/confmodule
633+db_version 2.0
634+
635+RELEASE=`lsb_release -rs` || RELEASE=""
636+
637+create_var_dir() {
638+ # create var dir
639+ if [ ! -d /var/lib/maas ]; then
640+ mkdir -p /var/lib/maas
641+ fi
642+ chown -R maas:maas /var/lib/maas/
643+
644+}
645+create_log_dir() {
646+ # Give appropriate permissions
647+ if [ ! -f /var/log/maas/rackd.log ]; then
648+ touch /var/log/maas/rackd.log
649+ fi
650+ chown maas:maas /var/log/maas/rackd.log
651+}
652+
653+configure_maas_tgt() {
654+ # Ensure that iSCSI targets get re-defined on reboot.
655+ # Creates a softlink in /etc/tgt/conf.d/ that points to the current
656+ # boot images' tgt configuration.
657+ mkdir -p /etc/tgt/conf.d
658+ ln -sf /var/lib/maas/boot-resources/current/maas.tgt /etc/tgt/conf.d/maas.conf
659+}
660+
661+extract_cluster_uuid(){
662+ # Extract ClUSTER_UUID setting from config file $1. This will work
663+ # on the old the cluster config file (which is shell).
664+ awk '{ split($1,array,"\"")} END{print array[2] }' "$1"
665+}
666+
667+extract_maas_url(){
668+ # Extract the MAAS_URL setting from the config file $1.
669+ grep -Eo "https?://[^ ]+" "$1" | cut -d"\"" -f1
670+}
671+
672+configure_cluster_uuid(){
673+ # This will configure a UUID if one has not previously been set.
674+ maas-provision config --init
675+}
676+
677+configure_cluster_authbind() {
678+ MAAS_UID="`id -u maas`"
679+ if [ ! -f "/etc/authbind/byuid/$MAAS_UID" ]; then
680+ if [ ! -d "/etc/authbind/byuid" ]; then
681+ mkdir -p /etc/authbind/byuid
682+ chmod 755 /etc/authbind
683+ chmod 755 /etc/authbind/byuid
684+ fi
685+ fi
686+ echo '0.0.0.0/0:68,69' >/etc/authbind/byuid/$MAAS_UID
687+ echo '::/0,68-69' >>/etc/authbind/byuid/$MAAS_UID
688+ chown maas:maas /etc/authbind/byuid/$MAAS_UID
689+ chmod 700 /etc/authbind/byuid/$MAAS_UID
690+}
691+
692+configure_maas_url(){
693+ # Get the MAAS URL on configure/reconfigure and write it to the conf files.
694+ db_get maas-rack-controller/maas-url || true
695+ if [ -n "$RET" ]; then
696+ maas-provision config --region-url "$RET"
697+ fi
698+}
699+
700+configure_shared_secret() {
701+ db_get maas-rack-controller/shared-secret || true
702+ if [ -n "$RET" ]; then
703+ echo "$RET" | maas-provision install-shared-secret
704+ chown maas:maas /var/lib/maas/secret
705+ chmod 0640 /var/lib/maas/secret
706+ fi
707+}
708+
709+# Unconditionally ensure that there is at least an empty configuration
710+# file. This does *not* overwrite any existing configuration.
711+maas-provision config
712+
713+if [ "$1" = "configure" ] && [ -z "$2" ]; then
714+ create_log_dir
715+ create_var_dir
716+ configure_maas_tgt
717+ configure_maas_url
718+ configure_cluster_uuid
719+ configure_cluster_authbind
720+ maas-provision upgrade-cluster
721+
722+elif [ -n "$DEBCONF_RECONFIGURE" ]; then
723+ configure_maas_url
724+ # Only ask for a shared secret when the region is not installed
725+ # on the same system.
726+ if [ ! -f /usr/sbin/maas-region-admin ]; then
727+ db_input high maas-rack-controller/shared-secret
728+ db_go
729+ fi
730+ configure_shared_secret
731+
732+elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
733+ # If we are upgrading from an older version, then we need to obtain
734+ # the cluster UUID from the old configuration file and set it with
735+ # the new configuration tool.
736+ if [ -f /etc/maas/maas_cluster.conf ]; then
737+ uuid=$(extract_cluster_uuid /etc/maas/maas_cluster.conf)
738+ maas-provision config --uuid "$uuid"
739+ maas_url=$(extract_maas_url /etc/maas/maas_cluster.conf)
740+ maas-provision config --region-url "$maas_url"
741+ db_set maas-rack-controller/maas-url "$maas_url"
742+ mv /etc/maas/maas_cluster.conf /etc/maas/maas_cluster.conf.maas-old
743+ mv /etc/maas/pserv.yaml /etc/maas/pserv.yaml.maas-old
744+ fi
745+
746+ configure_cluster_authbind
747+ maas-provision upgrade-cluster
748+fi
749+
750+db_stop
751+
752+#DEBHELPER#
753
754=== added file 'debian/maas-rack-controller.postrm'
755--- debian/maas-rack-controller.postrm 1970-01-01 00:00:00 +0000
756+++ debian/maas-rack-controller.postrm 2016-02-04 10:56:13 +0000
757@@ -0,0 +1,35 @@
758+#!/bin/sh
759+
760+set -e
761+
762+#DEBHELPER#
763+
764+RELEASE=`lsb_release -rs` || RELEASE=""
765+
766+case "$1" in
767+ purge)
768+ # remove log directory
769+ rm -rf /var/log/maas
770+ # remove var directory
771+ DIR=/var/lib/maas
772+ if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
773+ rm -rf /var/lib/maas
774+ fi
775+
776+ # Delete symlink for iSCSI config.
777+ if [ -L /etc/tgt/conf.d/maas.conf ]; then
778+ rm -rf /etc/tgt/conf.d/maas.conf
779+ fi
780+
781+ # Remove authbind
782+ MAAS_UID="`id -u maas`"
783+ if [ -f "/etc/authbind/byuid/$MAAS_UID" ]; then
784+ rm -rf /etc/authbind/byuid/$MAAS_UID
785+ fi
786+
787+ # Deleting old/new config files
788+ rm -rf /etc/maas/pserv.yaml.maas-old
789+ rm -rf /etc/maas/maas_cluster.conf.maas-old
790+ rm -rf /etc/maas/rackd.conf
791+
792+esac
793
794=== added file 'debian/maas-rack-controller.preinst'
795--- debian/maas-rack-controller.preinst 1970-01-01 00:00:00 +0000
796+++ debian/maas-rack-controller.preinst 2016-02-04 10:56:13 +0000
797@@ -0,0 +1,43 @@
798+#!/bin/sh
799+
800+set -e
801+
802+. /usr/share/debconf/confmodule
803+
804+if [ "$1" = "upgrade" ]; then
805+
806+ if dpkg --compare-versions "$2" lt 1.7.0~beta3+bzr3066-0ubuntu1; then
807+ if [ -f /etc/init/maas-pserv.conf ]; then
808+ invoke-rc.d maas-pserv stop
809+ fi
810+
811+ if [ -f /etc/init/maas-cluster-celery.conf ]; then
812+ invoke-rc.d maas-cluster-celery stop
813+ fi
814+
815+ if [ -f /var/log/maas/celery.log ]; then
816+ rm -rf /var/log/maas/celery.log
817+ fi
818+ fi
819+
820+ if dpkg --compare-versions "$2" lt 1.7.0~beta6+bzr3232-0ubuntu1; then
821+ if [ -f /etc/init/maas-cluster.conf ]; then
822+ invoke-rc.d maas-cluster stop
823+ fi
824+ fi
825+
826+ if dpkg --compare-versions "$2" lt 1.8.0~alpha1+bzr3486-0ubuntu1; then
827+ if [ -f /var/log/maas/pserv.log ]; then
828+ rm -rf /var/log/maas/pserv.log
829+ fi
830+ fi
831+
832+ if dpkg --compare-versions "$2" lt 1.8.0~alpha1+bzr3523-0ubuntu1; then
833+ if [ -f /etc/apache2/conf-enabled/maas-cluster-http.conf ]; then
834+ rm -rf /etc/apache2/conf-enabled/maas-cluster-http.conf
835+ fi
836+ fi
837+
838+fi
839+
840+#DEBHELPER#
841
842=== added file 'debian/maas-rack-controller.templates'
843--- debian/maas-rack-controller.templates 1970-01-01 00:00:00 +0000
844+++ debian/maas-rack-controller.templates 2016-02-04 10:56:13 +0000
845@@ -0,0 +1,16 @@
846+Template: maas-rack-controller/maas-url
847+Type: string
848+Default:
849+_Description: Ubuntu MAAS API address:
850+ The MAAS cluster controller and nodes need to contact the MAAS region
851+ controller API. Set the URL at which they can reach the MAAS API remotely,
852+ e.g. "http://192.168.1.1/MAAS".
853+ Since nodes must be able to access this URL, localhost or 127.0.0.1 are not
854+ useful values here.
855+
856+Template: maas-rack-controller/shared-secret
857+Type: password
858+Default:
859+_Description: MAAS Cluster Controller Shared Secret:
860+ The MAAS Cluster Controller needs to contact the MAAS server
861+ with a share secret. Set the shared secret here.
862
863=== modified file 'debian/maas-region-controller-min.apport'
864--- debian/maas-region-controller-min.apport 2015-06-29 16:46:29 +0000
865+++ debian/maas-region-controller-min.apport 2016-02-04 10:56:13 +0000
866@@ -36,7 +36,7 @@
867
868 def add_info(report, ui):
869 response = ui.yesno(
870- "The contents of /etc/maas/regiond.conf and /etc/maas/clusterd.conf "
871+ "The contents of /etc/maas/regiond.conf and /etc/maas/rackd.conf "
872 "may help developers diagnose your bug more quickly. However, it may "
873 "contain sensitive information. Do you want to include it in your bug "
874 "report?")
875@@ -50,7 +50,7 @@
876 attach_file_if_exists(
877 report, '/etc/maas/regiond.conf', 'MAASRegionConfig')
878 attach_file_if_exists(
879- report, '/etc/maas/clusterd.conf', 'MAASClusterConfig')
880+ report, '/etc/maas/rackd.conf', 'MAASClusterConfig')
881 else:
882 # The user declined to include the configuration files.
883 pass
884@@ -59,14 +59,14 @@
885 attach_file_if_exists(
886 report, '/var/log/maas/regiond.log', 'MAASRegionLog')
887 attach_file_if_exists(
888- report, '/var/log/maas/clusterd.log', 'MAASClusterLog')
889+ report, '/var/log/maas/rackd.log', 'MAASClusterLog')
890
891 # Attaching log files (systemd). These will overwrite the logs above on a
892 # system where systemd is available.
893 attach_journal_logs(
894 report, "MAASRegionLog", "maas-regiond", "maas-regiond-worker@*")
895 attach_journal_logs(
896- report, "MAASClusterLog", "maas-clusterd")
897+ report, "MAASClusterLog", "maas-rackd")
898
899 # Attaching related packages info
900 attach_related_packages(report, ['python-django-maas', 'apparmor'])
901
902=== modified file 'debian/maas-region-controller.postinst'
903--- debian/maas-region-controller.postinst 2015-11-25 17:34:18 +0000
904+++ debian/maas-region-controller.postinst 2016-02-04 10:56:13 +0000
905@@ -151,8 +151,8 @@
906 invoke-rc.d maas-regiond restart || true
907 invoke-rc.d apache2 restart || true
908
909-if [ -f /etc/init/maas-clusterd.conf ]; then
910- invoke-rc.d maas-clusterd restart || true
911+if [ -f /etc/init/maas-rackd.conf ]; then
912+ invoke-rc.d maas-rackd restart || true
913 fi
914
915 db_stop
916
917=== removed file 'debian/python-django-maas.install'
918--- debian/python-django-maas.install 2015-12-06 00:08:06 +0000
919+++ debian/python-django-maas.install 1970-01-01 00:00:00 +0000
920@@ -1,2 +0,0 @@
921-debian/tmp/usr/lib/python2*/dist-packages/maasserver
922-debian/tmp/usr/lib/python2*/dist-packages/metadataserver
923
924=== removed file 'debian/python-maas-client.install'
925--- debian/python-maas-client.install 2015-12-06 00:08:06 +0000
926+++ debian/python-maas-client.install 1970-01-01 00:00:00 +0000
927@@ -1,1 +0,0 @@
928-debian/tmp/usr/lib/python2*/dist-packages/apiclient
929
930=== removed file 'debian/python-maas-provisioningserver.install'
931--- debian/python-maas-provisioningserver.install 2015-12-06 00:08:06 +0000
932+++ debian/python-maas-provisioningserver.install 1970-01-01 00:00:00 +0000
933@@ -1,4 +0,0 @@
934-# Install other stuff
935-debian/extras/maas-probe-dhcp usr/sbin
936-debian/extras/maas-provision usr/sbin
937-debian/tmp/usr/lib/python2*/dist-packages/provisioningserver
938
939=== removed file 'debian/python-maas-provisioningserver.lintian-overrides'
940--- debian/python-maas-provisioningserver.lintian-overrides 2014-01-15 09:48:10 +0000
941+++ debian/python-maas-provisioningserver.lintian-overrides 1970-01-01 00:00:00 +0000
942@@ -1,2 +0,0 @@
943-python-maas-provisioningserver: binary-without-manpage usr/sbin/maas-provision
944-python-maas-provisioningserver: binary-without-manpage usr/sbin/maas-probe-dhcp
945
946=== modified file 'debian/rules'
947--- debian/rules 2016-02-01 13:12:49 +0000
948+++ debian/rules 2016-02-04 10:56:13 +0000
949@@ -15,14 +15,14 @@
950 override_dh_installinit:
951 dh_installinit --name=maas-regiond --no-start
952 dh_installinit --name=maas-regiond-worker@ --no-start
953- dh_installinit --name=maas-clusterd
954+ dh_installinit --name=maas-rackd
955 dh_installinit --name=maas-dhcpd
956 dh_installinit --name=maas-dhcpd6
957 dh_installinit --name=maas-proxy
958
959 override_dh_systemd_start:
960 dh_systemd_start -p maas-region-controller-min --no-start maas-regiond.service
961- dh_systemd_start -p maas-cluster-controller maas-clusterd.service
962+ dh_systemd_start -p maas-rack-controller maas-rackd.service
963 dh_systemd_start -p maas-dhcpd maas-dhcpd.service
964 dh_systemd_start -p maas-dhcpd6 maas-dhcpd6.service
965 dh_systemd_start -p maas-proxy maas-proxy.service
966@@ -57,7 +57,7 @@
967 # install python3 twisted plugins
968 set -ex; for python in $(PYTHON3); do \
969 dh_install twisted/plugins/maasregiond.py usr/lib/$$python/dist-packages/twisted/plugins -pmaas-region-controller-min; \
970- dh_install twisted/plugins/maasclusterd.py usr/lib/$$python/dist-packages/twisted/plugins -pmaas-cluster-controller; \
971+ dh_install twisted/plugins/maasrackd.py usr/lib/$$python/dist-packages/twisted/plugins -pmaas-rack-controller; \
972 done
973
974 dh_install --list-missing

Subscribers

People subscribed via source and target branches

to all changes: