Activity log for bug #1999827

Date Who What changed Old value New value Message
2022-12-15 21:31:53 Arif Ali bug added bug
2023-01-09 07:30:17 Alberto Donato maas: status New Incomplete
2023-02-07 01:54:10 Seyeong Kim description There is an issue with MAAS that, when you have multiple IP addresses on the same interface, the DNS name for the FQDN of the host can change. In the scenario were you have MAAS + postgres + HA, you can have 2 IP addresses that are controlled via corosync, and based on where the IP address is, MAAS will automatically create DNS entries, we can see the host resolution[1] and he PTR records [2] as shown. Now the VIPs for maas and postgres are 192.168.210.2 and 192.168.210.3, and hence the FQDN shouldn't really be used for these IP addresses, as ultimately they are secondary. In a juju deployed environment, in some scenarios we have LMA cross model relations, and the 3 MAAS servers also host telegraf, and then direct their data towards prometheus. This then grabs the IP address of the host as per the relational data (primary interface IP), and grabs the DNS record. In this particular scenario, rather than giving infra1.maas, it will give broam.infra1.maas., which is not the required result. For a simple reproducer, all you need is a simple MAAS server with single IP address. Then add IP address to the same machine in the same network, and we will see the DNS name of the server fluctuate, below is some output of my reproduced issue on a single MAAS server, noting that each time I am expecting 192.168.1.22 to be my MAAS FQDN ip a a 192.168.1.8/24 dev eth0 log message in regiond.log 2022-12-15 19:18:05 maasserver.region_controller: [info] Reloaded DNS configuration; ip 192.168.1.8 connected to maas on eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP> 8 30 IN PTR maas.maas. <SNIP> 22 30 IN PTR eth0.maas.maas. ~~~ ip a a 192.168.1.7/24 dev eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP> 22 30 IN PTR maas.maas. <SNIP> 7 30 IN PTR eth0.maas.maas. 8 30 IN PTR eth0.maas.maas. ~~~ ip a a 192.168.1.6/24 dev eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP 8 30 IN PTR maas.maas. <SNIP 6 30 IN PTR eth0.maas.maas. 22 30 IN PTR eth0.maas.maas. 7 30 IN PTR eth0.maas.maas. ~~~ As we can see from the above output, we can see the undesired output. My expectation is that .22 is always maas.maas. in my scenario, as that should be consistent, no matter what the secondary IP address is set This has been tested in 2.9.2, as well as my lab with 3.2.6 [1] https://paste.ubuntu.com/p/CZ2wfQgnkx/ [2] https://paste.ubuntu.com/p/7WmYFwb2nT/ There is an issue with MAAS that, when you have multiple IP addresses on the same interface, the DNS name for the FQDN of the host can change. In the scenario were you have MAAS + postgres + HA, you can have 2 IP addresses that are controlled via corosync, and based on where the IP address is, MAAS will automatically create DNS entries, we can see the host resolution[1] and he PTR records [2] as shown. Now the VIPs for maas and postgres are 192.168.210.2 and 192.168.210.3, and hence the FQDN shouldn't really be used for these IP addresses, as ultimately they are secondary. In a juju deployed environment, in some scenarios we have LMA cross model relations, and the 3 MAAS servers also host telegraf, and then direct their data towards prometheus. This then grabs the IP address of the host as per the relational data (primary interface IP), and grabs the DNS record. In this particular scenario, rather than giving infra1.maas, it will give broam.infra1.maas., which is not the required result. For a simple reproducer, all you need is a simple MAAS server with single IP address. Then add IP address to the same machine in the same network, and we will see the DNS name of the server fluctuate, below is some output of my reproduced issue on a single MAAS server, noting that each time I am expecting 192.168.1.22 to be my MAAS FQDN ip a a 192.168.1.8/24 dev eth0 log message in regiond.log 2022-12-15 19:18:05 maasserver.region_controller: [info] Reloaded DNS configuration; ip 192.168.1.8 connected to maas on eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP> 8 30 IN PTR maas.maas. <SNIP> 22 30 IN PTR eth0.maas.maas. ~~~ ip a a 192.168.1.7/24 dev eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP> 22 30 IN PTR maas.maas. <SNIP> 7 30 IN PTR eth0.maas.maas. 8 30 IN PTR eth0.maas.maas. ~~~ ip a a 192.168.1.6/24 dev eth0 ~~~ root@maas:~# cat /var/snap/maas/current/bind/zone.1.168.192.in-addr.arpa <SNIP 8 30 IN PTR maas.maas. <SNIP 6 30 IN PTR eth0.maas.maas. 22 30 IN PTR eth0.maas.maas. 7 30 IN PTR eth0.maas.maas. ~~~ As we can see from the above output, we can see the undesired output. My expectation is that .22 is always maas.maas. in my scenario, as that should be consistent, no matter what the secondary IP address is set This has been tested in 2.9.2, as well as my lab with 3.2.6 [1] https://paste.ubuntu.com/p/CZ2wfQgnkx/ [2] https://paste.ubuntu.com/p/7WmYFwb2nT/ ### ADDED As this patch https://bugs.launchpad.net/maas/+bug/1600259, it takes IPs reversely and generate zone file. https://github.com/maas/maas/blob/0c069f0aafbb650928f6c8536debd0de79eb7484/src/maasserver/dns/zonegenerator.py#L399 e.g assume there is one nic which has 172.16.116.131 as a primary IP. after adding one more ip to the same nic, zone file refer to secondary IP instead of primary IP. {<Domain: name=maas>: defaultdict(<class 'maasserver.models.staticipaddress.HostnameIPMapping'>, {'xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.131'}, 4, None, None), 'ens33.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.254'}, 4, None, 3), 'lxdbr0.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'10.69.50.1'}, 4, None, 3)}), <Subnet: 172.16.116.0/24:172.16.116.0/24(vid=0)>: defaultdict(<class 'maasserver.models.staticipaddress.HostnameIPMapping'>, {'xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.254'}, 4, None, None), 'ens33.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.131'}, 4, None, 3), 'lxdbr0.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'10.69.50.1'}, 4, None, 3)}), 'reverse': defaultdict(<class 'maasserver.models.staticipaddress.HostnameIPMapping'>, {'xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.254'}, 4, None, None), 'ens33.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'172.16.116.131'}, 4, None, 3), 'lxdbr0.xtrusia.maas': HostnameIPMapping('pca68y', 30, {'10.69.50.1'}, 4, None, 3)})} I printed info from code, xtrusia.maas had 172.16.116.131 in the beginning, but after I added 172.16.116.254, it is changed to later.
2023-02-07 01:55:07 Seyeong Kim maas: status Incomplete Confirmed
2023-02-07 09:40:35 Adam Collard maas: status Confirmed New
2023-02-10 00:30:22 Seyeong Kim bug added subscriber Seyeong Kim
2023-02-16 09:13:55 Jerzy Husakowski maas: importance Undecided Medium
2023-02-16 09:13:55 Jerzy Husakowski maas: status New Triaged
2023-02-16 09:13:55 Jerzy Husakowski maas: milestone 3.4.0
2023-02-16 09:14:06 Jerzy Husakowski tags sts dns sts
2023-06-08 05:12:58 Seyeong Kim tags dns sts bug-council dns sts
2023-06-08 08:47:42 Jerzy Husakowski tags bug-council dns sts dns sts
2023-06-09 00:13:16 Seyeong Kim tags dns sts bug-council dns sts
2023-06-12 01:39:25 Seyeong Kim merge proposal linked https://code.launchpad.net/~seyeongkim/maas/+git/maas/+merge/444528
2023-06-15 08:09:43 Jerzy Husakowski tags bug-council dns sts dns sts
2023-06-29 08:36:09 Alberto Donato maas: milestone 3.4.0 3.4.x
2023-08-08 12:16:36 Alejandro Santoyo Gonzalez bug added subscriber Alejandro Santoyo Gonzalez
2023-08-11 16:31:31 MAAS Lander maas: status Triaged Fix Committed
2023-08-29 23:47:18 Alexsander de Souza merge proposal linked https://code.launchpad.net/~seyeongkim/maas/+git/maas/+merge/450085
2023-08-30 23:30:19 Seyeong Kim merge proposal linked https://code.launchpad.net/~seyeongkim/maas/+git/maas/+merge/450086
2023-09-01 02:46:23 Seyeong Kim merge proposal linked https://code.launchpad.net/~seyeongkim/maas/+git/maas/+merge/450087
2023-09-02 23:51:11 Mauricio Faria de Oliveira tags dns sts bug-council dns sts
2023-09-04 02:29:10 Alexsander de Souza nominated for series maas/3.3
2023-09-04 02:29:10 Alexsander de Souza bug task added maas/3.3
2023-09-04 02:29:10 Alexsander de Souza nominated for series maas/3.2
2023-09-04 02:29:10 Alexsander de Souza bug task added maas/3.2
2023-09-04 02:29:10 Alexsander de Souza nominated for series maas/3.1
2023-09-04 02:29:10 Alexsander de Souza bug task added maas/3.1
2023-09-04 02:29:37 Alexsander de Souza maas/3.3: milestone 3.3.x
2023-09-04 02:29:40 Alexsander de Souza maas/3.2: milestone 3.1.x
2023-09-04 02:29:58 Alexsander de Souza maas/3.2: milestone 3.1.x 3.2.x
2023-09-04 02:30:03 Alexsander de Souza maas/3.1: milestone 3.1.x
2023-09-05 02:23:14 Seyeong Kim merge proposal linked https://code.launchpad.net/~seyeongkim/maas/+git/maas/+merge/450098
2023-09-07 08:07:05 Jerzy Husakowski maas: milestone 3.4.x 3.5.0
2023-09-07 08:07:17 Jerzy Husakowski nominated for series maas/3.4
2023-09-07 08:07:17 Jerzy Husakowski bug task added maas/3.4
2023-09-07 08:07:29 Jerzy Husakowski maas/3.4: milestone 3.4.x
2023-09-07 08:07:57 Jerzy Husakowski maas/3.4: milestone 3.4.x 3.4.0
2023-09-07 08:09:48 Alberto Donato maas/3.4: status New In Progress
2023-09-07 08:09:51 Alberto Donato maas/3.4: importance Undecided High
2023-09-07 08:09:53 Alberto Donato maas/3.4: assignee Alberto Donato (ack)
2023-09-07 08:10:51 Alberto Donato merge proposal linked https://code.launchpad.net/~ack/maas/+git/maas/+merge/450860
2023-09-07 08:11:02 Jerzy Husakowski maas/3.4: importance High Undecided
2023-09-07 08:11:02 Jerzy Husakowski maas/3.4: status In Progress New
2023-09-07 08:11:02 Jerzy Husakowski maas/3.4: assignee Alberto Donato (ack)
2023-09-07 08:11:46 Jerzy Husakowski maas/3.4: assignee Alberto Donato (ack)
2023-09-07 08:12:00 Alberto Donato maas/3.4: status New In Progress
2023-09-07 08:12:02 Alberto Donato maas/3.4: importance Undecided High
2023-09-07 08:12:20 Jerzy Husakowski tags bug-council dns sts dns sts
2023-09-07 08:57:04 MAAS Lander maas/3.4: status In Progress Fix Committed
2023-10-02 16:01:46 MAAS Lander maas/3.1: status New Fix Committed
2023-10-02 17:17:33 MAAS Lander maas/3.2: status New Fix Committed