Merge lp:~ltrager/maas/restart-rsyslog-common into lp:~maas-maintainers/maas/packaging

Proposed by Lee Trager
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 495
Proposed branch: lp:~ltrager/maas/restart-rsyslog-common
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 55 lines (+4/-5)
3 files modified
debian/control (+2/-3)
debian/maas-common.postinst (+2/-0)
debian/maas-region-api.postinst (+0/-2)
To merge this branch: bzr merge lp:~ltrager/maas/restart-rsyslog-common
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Brendan Donegan (community) Approve
Review via email: mp+295678@code.launchpad.net

Commit message

Restart rsyslog in maas-common

Description of the change

While maas-rsyslog.conf is shipped in maas-common, which is required by both maas-region-api and maas-rack-controller, only maas-region-api was restarting rsyslog to enable the new config. This restarts rsyslog in maas-common so the config is loaded for both maas-region-api and maas-rack-controller.

To post a comment you must log in.
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Looks sensible - not sure there's a way we can add a test without getting quite high-level, so will leave that for the time being.

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

Could you please make sure that maas-common depends on rsyslog (in debian/control) and I guess that you'd need to drop the dependency from maas-region-api and maas-rack-controller. Also, see inline.

review: Needs Fixing
Revision history for this message
Lee Trager (ltrager) wrote :

Thanks for catching the dependencies, I completely forgot about that. I've also updated the postinst script as you suggested.

Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-04-16 02:28:29 +0000
+++ debian/control 2016-05-25 18:12:16 +0000
@@ -56,7 +56,8 @@
5656
57Package: maas-common57Package: maas-common
58Architecture: all58Architecture: all
59Depends: ${misc:Depends}59Depends: rsyslog,
60 ${misc:Depends}
60Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )61Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
61Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )62Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
62Description: MAAS server common files63Description: MAAS server common files
@@ -80,7 +81,6 @@
80 python3-maas-provisioningserver (= ${binary:Version}),81 python3-maas-provisioningserver (= ${binary:Version}),
81 python3-petname,82 python3-petname,
82 python3-requests,83 python3-requests,
83 rsyslog,
84 ubuntu-cloudimage-keyring,84 ubuntu-cloudimage-keyring,
85 ${misc:Depends},85 ${misc:Depends},
86 ${python3:Depends}86 ${python3:Depends}
@@ -194,7 +194,6 @@
194 python3-tempita,194 python3-tempita,
195 python3-twisted,195 python3-twisted,
196 python3-zope.interface,196 python3-zope.interface,
197 rsyslog,
198 syslinux-common,197 syslinux-common,
199 tgt,198 tgt,
200 uuid-runtime,199 uuid-runtime,
201200
=== modified file 'debian/maas-common.postinst'
--- debian/maas-common.postinst 2016-04-01 18:27:46 +0000
+++ debian/maas-common.postinst 2016-05-25 18:12:16 +0000
@@ -10,6 +10,8 @@
10 touch /var/log/maas/maas.log10 touch /var/log/maas/maas.log
11 fi11 fi
12 chown syslog:syslog /var/log/maas/maas.log12 chown syslog:syslog /var/log/maas/maas.log
13 # Make sure rsyslog reads our config
14 systemctl restart rsyslog >/dev/null 2>&1 || true
13}15}
1416
15configure_lib_dir() {17configure_lib_dir() {
1618
=== modified file 'debian/maas-region-api.postinst'
--- debian/maas-region-api.postinst 2016-03-31 23:22:22 +0000
+++ debian/maas-region-api.postinst 2016-05-25 18:12:16 +0000
@@ -31,8 +31,6 @@
31 # Create log directory base31 # Create log directory base
32 mkdir -p /var/log/maas/rsyslog32 mkdir -p /var/log/maas/rsyslog
33 chown -R syslog:syslog /var/log/maas/rsyslog33 chown -R syslog:syslog /var/log/maas/rsyslog
34 # Make sure rsyslog reads our config
35 invoke-rc.d rsyslog restart
3634
37 # apache2 log symlinks35 # apache2 log symlinks
38 ln -sf /var/log/apache2 /var/log/maas/36 ln -sf /var/log/apache2 /var/log/maas/

Subscribers

People subscribed via source and target branches