Merge lp:~jtv/maas/pkg-bug-1373207 into lp:~maas-maintainers/maas/packaging

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 309
Proposed branch: lp:~jtv/maas/pkg-bug-1373207
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 105 lines (+19/-27)
4 files modified
debian/changelog (+9/-1)
debian/maas-cluster-controller.install (+0/-6)
debian/maas-cluster-controller.links (+0/-1)
debian/maas-cluster-controller.postinst (+10/-19)
To merge this branch: bzr merge lp:~jtv/maas/pkg-bug-1373207
Reviewer Review Type Date Requested Status
Newell Jensen (community) Approve
Review via email: mp+235748@code.launchpad.net

Commit message

Fix packaging, which was no longer building successfully: some Celery configuration files were removed from trunk, so the packaging should no longer install/update them.

Description of the change

This also gets rid of one of those nasty modify-files-in-/etc situations.

Jeroen

To post a comment you must log in.
Revision history for this message
Newell Jensen (newell-jensen) wrote :

I just ran into this trying to build the package.

review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

There's still some unrelated breakage, stopping the cluster controller from installing. I'll land this branch (because at least it's progress) and then focus on that other failure. Thanks for the review.

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 2014-09-21 22:05:31 +0000
3+++ debian/changelog 2014-09-24 05:03:40 +0000
4@@ -1,4 +1,4 @@
5-maas (1.7.0~beta3+bzr3043-0ubuntu1) trusty; urgency=medium
6+maas (1.7.0~beta3+bzr3067-0ubuntu1) trusty; urgency=medium
7
8 * New Upstream Snapshot, Beta 3 bzr3043
9
10@@ -12,6 +12,14 @@
11 * debian/maas-region-controller-min.install
12 debian/maas-region-controller-min.lintian-overrides
13 - Install deployment user-data: maas_configure_interfaces.py script.
14+ * debian/maas-cluster-controller.links
15+ debian/maas-cluster-controller.install
16+ debian/maas-cluster-controller.postinst
17+ - Reflect Celery removal changes made in trunk r3067.
18+ - Don't install celeryconfig_cluster.py any longer.
19+ - Don't install maas_local_celeryconfig_cluster.py any longer.
20+ - Don't symlink maas_local_celeryconfig_cluster.py from /etc to /usr.
21+ - Don't insert UUID into maas_local_celeryconfig_cluster.py.
22
23 [ Julian Edwards ]
24 * debian/maas-region-controller.postinst: Don't restart RabbitMQ on
25
26=== modified file 'debian/maas-cluster-controller.install'
27--- debian/maas-cluster-controller.install 2014-05-27 10:22:58 +0000
28+++ debian/maas-cluster-controller.install 2014-09-24 05:03:40 +0000
29@@ -7,12 +7,6 @@
30 # Install cluster config file
31 debian/tmp/etc/maas/maas_cluster.conf
32
33-# Install celery config file
34-debian/tmp/usr/share/maas/celeryconfig_cluster.py
35-
36-# Install local celery cluster config file
37-debian/tmp/etc/maas/maas_local_celeryconfig_cluster.py
38-
39 # Install templates
40 debian/tmp/etc/maas/templates/dhcp
41 debian/tmp/etc/maas/templates/power
42
43=== removed file 'debian/maas-cluster-controller.links'
44--- debian/maas-cluster-controller.links 2012-09-29 17:21:10 +0000
45+++ debian/maas-cluster-controller.links 1970-01-01 00:00:00 +0000
46@@ -1,1 +0,0 @@
47-etc/maas/maas_local_celeryconfig_cluster.py usr/share/maas/maas_local_celeryconfig_cluster.py
48
49=== modified file 'debian/maas-cluster-controller.postinst'
50--- debian/maas-cluster-controller.postinst 2014-09-10 14:07:57 +0000
51+++ debian/maas-cluster-controller.postinst 2014-09-24 05:03:40 +0000
52@@ -49,28 +49,23 @@
53 # maas_cluster.conf; otherwise, we want to generate one.
54 local uuid
55
56-
57 if [ -n "$(extract_cluster_uuid /etc/maas/maas_cluster.conf)" ]; then
58 # UUID is already set up. Wonderful.
59 return
60 fi
61
62 # Look for a UUID stored in the old location.
63- uuid="$(extract_cluster_uuid /etc/maas/maas_local_celeryconfig_cluster.py)"
64+ if [ -e '/etc/maas/maas_local_celeryconfig_cluster.py' ]; then
65+ uuid="$(extract_cluster_uuid /etc/maas/maas_local_celeryconfig_cluster.py)"
66+ fi
67
68 if [ -z "$uuid" ]; then
69- # No UUID at all yet. Generate one, and insert it into its
70- # placeholder in the old config location.
71+ # No UUID at all yet. Generate one.
72 uuid="$(uuidgen)"
73- sed -i "s|^CLUSTER_UUID = None$|CLUSTER_UUID = '$uuid'|" \
74- /etc/maas/maas_local_celeryconfig_cluster.py
75 fi
76
77- # Either way, at this point we have a uuid, and it is configured in
78- # the old config location.
79- #
80- # Write it to maas_cluster.conf as well. There is no initial
81- # placeholder in this file, so just append the setting.
82+ # Write the uuid to maas_cluster.conf
83+ # There is no initial placeholder in this file, so just append the setting.
84 echo "CLUSTER_UUID=\"$uuid\"" >>/etc/maas/maas_cluster.conf
85 }
86
87@@ -150,14 +145,10 @@
88 configure_maas_tgt
89 configure_pserv_generator
90
91- # These config files may contain a private cluster UUID. Only maas
92- # can read them; only root can write them
93- chown root:maas \
94- /etc/maas/maas_local_celeryconfig_cluster.py \
95- /etc/maas/maas_cluster.conf
96- chmod 0640 \
97- /etc/maas/maas_local_celeryconfig_cluster.py \
98- /etc/maas/maas_cluster.conf
99+ # This config file may contain a private cluster UUID. Only maas
100+ # can read it; only root can write it.
101+ chown root:maas /etc/maas/maas_cluster.conf
102+ chmod 0640 /etc/maas/maas_cluster.conf
103
104 configure_cluster_uuid
105 configure_cluster_authbind

Subscribers

People subscribed via source and target branches