Commit b1b01a7
committed
cloudstack-setup-databases: get local address instead of 127.0.1.1
In some linux setup, the server has the line in /etc/hosts
```
127.0.1.1 <hostname>
```
If the mgmt serve IP is not specified when run cloudstack-setup-databases, ACS detects the host ip in python, however there is an issue with it.
```
>>> import socket
>>> socket.gethostbyname(socket.gethostname())
'127.0.1.1' <<<<=======================this is not good
>>> socket.gethostbyname(socket.gethostname() + ".local")
'10.0.100.100' <<<========================this is good
```1 parent 95c2481 commit b1b01a7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
0 commit comments