canonical / maas-ansible-playbook

An Ansible playbook for installing and configuring MAAS
Apache License 2.0
44 stars 34 forks source link

Bug - Handling multiple IP addresses #158

Open bcdiaconu opened 3 hours ago

bcdiaconu commented 3 hours ago

Describe the bug On my maas machine, I have 2 ip addresses, one is dynamically allocated so it will change on each reboot, and one that is static. The issues I'm facing are interconnected:

Reproducing Install canonical multipass on a windows host. Create a new machine for installing maas. Install maas on that particular machine. Check in browser machine is working properly. Stop and Start the machine for it to acquire new IP address. Check in browser, it will no longer work. Look into /etc/postgresql/14/main/postgresql.conf and the param is listen_addresses = '172.18.21.135, ::1, localhost' Check the file /etc/maas/regiond.conf for line with content database_host: "172.18.21.135" Check IP addresses by ip addr that the ip address was changed from 172.18.21.135 to another.

Observation I observe there is maas_postgres_ipv4 variable that can be override but I do not see it used in the region controller installation.

bcdiaconu commented 2 hours ago

I modified variable maas_postgres_primary_host_v4: "127.0.0.1" which did add this to the /etc/maas/regiond.conf as expected but it seems unsynchronized with the address in /etc/postgresql/14/main/postgresql.conf file