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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 507
Merged at revision: 504
Proposed branch: lp:~andreserl/maas/packaging_dbc_go
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 68 lines (+18/-3)
4 files modified
debian/changelog (+6/-2)
debian/maas-region-api.postinst (+4/-0)
debian/maas-region-controller.config (+3/-1)
debian/maas-region-controller.postinst (+5/-0)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_dbc_go
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
LaMont Jones (community) Needs Information
Gavin Panella (community) Approve
Review via email: mp+297774@code.launchpad.net

Commit message

* debian/maas-region-controller.config: Ensure dbc_go is not run when dbconfig common is not yet installed.
* debian/maas-region-api.postinst: Ensure rsyslog is restarted.
* debian/maas-region-controller.postinst: Ensure maas_url ends with 5240.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Some questions, but +1 so you're not blocked.

review: Approve
Revision history for this message
LaMont Jones (lamont) wrote :

Some mostly aesthetic comments, but would like to at least discuss them before saying "approve"

review: Needs Information
Revision history for this message
Christian Reis (kiko) wrote :

On Fri, Jun 17, 2016 at 02:27:26PM -0000, Andres Rodriguez wrote:
> - maas-region local_config_set \
> - --maas-url "http://${ipaddr}/MAAS"
> + local port=$(echo "$1" | cut -d":" -f2)
> + if [ -z "$port" ]; then
> + # MAAS bind's to port 5240. If no port specified as part of

binds, not bind's.

> + # 'ipaddr', we set as such.
> + maas-region local_config_set \
> + --maas-url "http://${ipaddr}:5240/MAAS"
> + else
> + maas-region local_config_set \
> + --maas-url "http://${ipaddr}/MAAS"
> + fi

Also, a nit, but why not:

    [...]

    if [ -z "$local_port" ]; then
        # Ensure MAAS binds to port 5240 by default
        ipaddr=${ipaddr}:5240
    fi

    maas-region local_config_set \
            --maas-url "http://${ipaddr}/MAAS"

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

comments inline!

review: Approve
lp:~andreserl/maas/packaging_dbc_go updated
507. By Andres Rodriguez

Address kiko's suggestions

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-06-16 15:27:18 +0000
3+++ debian/changelog 2016-06-17 17:46:33 +0000
4@@ -1,12 +1,16 @@
5-maas (2.0.0~beta8+bzr5120-0ubuntu1) UNRELEASED; urgency=medium
6+maas (2.0.0~beta8+bzr5132-0ubuntu1) UNRELEASED; urgency=medium
7
8- * UNRELEASED
9+ * New upstream release, 2.0.0 RC1 bzr:
10 * /etc/maas/templates/dns is obsolete. (LP: #1581729)
11 * Switch to OpenSSH for SSH public key validation. Previously
12 Twisted's conch was used but it does not yet support the newer ecdsa
13 and ed25519 key types. (LP: #1590081)
14 * debian/control: maas-region-api depends on maas-cli.
15+ * debian/maas-region-api.postinst: Ensure rsyslog is restarted.
16+ * debian/maas-region-controller.postinst: Ensure maas_url ends with 5240.
17 * Versioned Depend on squid
18+ * debian/maas-region-controller.config: Ensure dbc_go is not run when
19+ dbconfig common is not yet installed.
20
21 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 14 Jun 2016 17:08:48 -0400
22
23
24=== modified file 'debian/maas-region-api.postinst'
25--- debian/maas-region-api.postinst 2016-05-25 08:53:05 +0000
26+++ debian/maas-region-api.postinst 2016-06-17 17:46:33 +0000
27@@ -32,6 +32,10 @@
28 mkdir -p /var/log/maas/rsyslog
29 chown -R syslog:syslog /var/log/maas/rsyslog
30
31+ # Make sure rsyslog reads our config after creating the
32+ # destination folder.
33+ systemctl restart rsyslog >/dev/null 2>&1 || true
34+
35 # apache2 log symlinks
36 ln -sf /var/log/apache2 /var/log/maas/
37 }
38
39=== modified file 'debian/maas-region-controller.config'
40--- debian/maas-region-controller.config 2016-03-07 22:01:56 +0000
41+++ debian/maas-region-controller.config 2016-06-17 17:46:33 +0000
42@@ -33,7 +33,9 @@
43 dbc_dbuser="maas"
44 dbc_remove="true"
45
46- dbc_go maas-region-controller $@
47+ if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
48+ dbc_go maas-region-controller $@
49+ fi
50
51 elif [ -n "$DEBCONF_RECONFIGURE" ]; then
52 db_get maas/default-maas-url || true
53
54=== modified file 'debian/maas-region-controller.postinst'
55--- debian/maas-region-controller.postinst 2016-04-07 16:39:41 +0000
56+++ debian/maas-region-controller.postinst 2016-06-17 17:46:33 +0000
57@@ -21,6 +21,11 @@
58
59 configure_maas_default_url() {
60 local ipaddr="$1"
61+ local local_port=$(echo "$ipaddr" | cut -d":" -f2)
62+ if [ -z "$local_port" ]; then
63+ # Ensure MAAS binds to 5240 by default.
64+ ipaddr=${ipaddr}:5240
65+ fi
66 maas-region local_config_set \
67 --maas-url "http://${ipaddr}/MAAS"
68 }

Subscribers

People subscribed via source and target branches

to all changes: