Comment 18 for bug 2012801

Revision history for this message
Nobuto Murata (nobuto) wrote :

> As I commented in the review, I still see the issue.
> https://code.launchpad.net/~cgrabowski/maas/+git/maas/+merge/444471

Okay, I've tested it properly now after getting the idea that the code is for PostgreSQL triggers.

1. download a patch
$ wget https://code.launchpad.net/~cgrabowski/maas/+git/maas/+merge/444471/+preview-diff/1014174/+files/preview.diff

2. apply it by hand
$ cat preview.diff \
    | filterdiff -i a/src/maasserver/triggers/system.py \
    | sudo patch /usr/lib/python3/dist-packages/maasserver/triggers/system.py

3. execute maas db upgraden
$ sudo maas-region dbupgrade

4. confirm the trigger function has the new and expected content
$ sudo -u postgres psql -d maasdb \
    -c "SELECT prosrc FROM pg_proc WHERE proname = 'sys_dns_updates_interface_ip_insert';"

And the behavior is still confusing.

1. with and without eth0 are still mixed even though there is no duplication for each host.
2. probably without eth0 is preferred to be the "canonical" hostname of the device

$ grep lxd- /var/lib/bind/maas/zone.maas
eth0.juju-b1c448-0-lxd-0 A 192.168.151.199
eth0.juju-b1c448-0-lxd-1 A 192.168.151.200
eth0.juju-b1c448-0-lxd-2 A 192.168.151.111
juju-b1c448-0-lxd-3 A 192.168.151.186
eth0.juju-b1c448-0-lxd-4 A 192.168.151.188
eth0.juju-b1c448-0-lxd-5 A 192.168.151.189
eth0.juju-b1c448-0-lxd-6 A 192.168.151.187
eth0.juju-b1c448-0-lxd-7 A 192.168.151.198
eth0.juju-b1c448-1-lxd-0 A 192.168.151.117
eth0.juju-b1c448-1-lxd-1 A 192.168.151.107
eth0.juju-b1c448-1-lxd-2 A 192.168.151.122
eth0.juju-b1c448-1-lxd-3 A 192.168.151.120
eth0.juju-b1c448-1-lxd-4 A 192.168.151.194
eth0.juju-b1c448-1-lxd-5 A 192.168.151.195
eth0.juju-b1c448-1-lxd-6 A 192.168.151.196
eth0.juju-b1c448-1-lxd-7 A 192.168.151.197
eth0.juju-b1c448-2-lxd-0 A 192.168.151.128
eth0.juju-b1c448-2-lxd-1 A 192.168.151.190
eth0.juju-b1c448-2-lxd-2 A 192.168.151.129
eth0.juju-b1c448-2-lxd-3 A 192.168.151.104
eth0.juju-b1c448-2-lxd-4 A 192.168.151.106
eth0.juju-b1c448-2-lxd-5 A 192.168.151.191
eth0.juju-b1c448-2-lxd-6 A 192.168.151.118
eth0.juju-b1c448-2-lxd-7 A 192.168.151.193
eth0.juju-b1c448-2-lxd-8 A 192.168.151.192