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

Proposed by Lee Trager on 2016-05-25
Status: Merged
Approved by: Andres Rodriguez on 2016-05-26
Approved revision: 495
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 Approve on 2016-05-26
Brendan Donegan (community) 2016-05-25 Approve on 2016-05-25
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.
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
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
495. By Lee Trager on 2016-05-25

andreserl fixes

Lee Trager (ltrager) wrote :

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

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-04-16 02:28:29 +0000
3+++ debian/control 2016-05-25 18:12:16 +0000
4@@ -56,7 +56,8 @@
5
6 Package: maas-common
7 Architecture: all
8-Depends: ${misc:Depends}
9+Depends: rsyslog,
10+ ${misc:Depends}
11 Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
12 Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
13 Description: MAAS server common files
14@@ -80,7 +81,6 @@
15 python3-maas-provisioningserver (= ${binary:Version}),
16 python3-petname,
17 python3-requests,
18- rsyslog,
19 ubuntu-cloudimage-keyring,
20 ${misc:Depends},
21 ${python3:Depends}
22@@ -194,7 +194,6 @@
23 python3-tempita,
24 python3-twisted,
25 python3-zope.interface,
26- rsyslog,
27 syslinux-common,
28 tgt,
29 uuid-runtime,
30
31=== modified file 'debian/maas-common.postinst'
32--- debian/maas-common.postinst 2016-04-01 18:27:46 +0000
33+++ debian/maas-common.postinst 2016-05-25 18:12:16 +0000
34@@ -10,6 +10,8 @@
35 touch /var/log/maas/maas.log
36 fi
37 chown syslog:syslog /var/log/maas/maas.log
38+ # Make sure rsyslog reads our config
39+ systemctl restart rsyslog >/dev/null 2>&1 || true
40 }
41
42 configure_lib_dir() {
43
44=== modified file 'debian/maas-region-api.postinst'
45--- debian/maas-region-api.postinst 2016-03-31 23:22:22 +0000
46+++ debian/maas-region-api.postinst 2016-05-25 18:12:16 +0000
47@@ -31,8 +31,6 @@
48 # Create log directory base
49 mkdir -p /var/log/maas/rsyslog
50 chown -R syslog:syslog /var/log/maas/rsyslog
51- # Make sure rsyslog reads our config
52- invoke-rc.d rsyslog restart
53
54 # apache2 log symlinks
55 ln -sf /var/log/apache2 /var/log/maas/

Subscribers

People subscribed via source and target branches