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

Subscribers

People subscribed via source and target branches

to all changes: