Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Handling multiple IP addresses #158

Open
bcdiaconu opened this issue Sep 20, 2024 · 1 comment
Open

Bug - Handling multiple IP addresses #158

bcdiaconu opened this issue Sep 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bcdiaconu
Copy link
Contributor

bcdiaconu commented Sep 20, 2024

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:

  • postgresql configuration will listen to the dynamic address. Therefore, after reboot will not be able to listen on the already change IP. The config file is /etc/postgresql/14/main/postgresql.conf and the param is listen_addresses = '172.18.21.135, ::1, localhost'
  • the regiond is configured to connect on the same dynamic ip address. Therefore, after reboot region controller will not be able to connect to postgresql database because the file /etc/maas/regiond.conf is configured to listen to the same replaced IP address.

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 bcdiaconu added the bug Something isn't working label Sep 20, 2024
@bcdiaconu bcdiaconu changed the title Bug - Something doesn't work Bug - Handling multiple IP addresses Sep 20, 2024
@bcdiaconu
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant