gravitl / netmaker-helm

34 stars 36 forks source link

netmaker-0 can't see any internal domain names #5

Open chukynax opened 2 years ago

chukynax commented 2 years ago

Netmaker container not able to connect to psql service as soon as other pods successfully able to

2022/06/08 18:41:05 [netmaker] connecting to postgres
2022/06/08 18:41:05 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:07 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:09 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:11 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:13 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:15 [netmaker] unable to connect to db, retrying . . .
2022/06/08 18:41:15 [netmaker] Error connecting to database
2022/06/08 18:41:15 dial tcp: lookup netmaker-postgresql-ha-pgpool.default.svc.cluster.local: no such host
k exec -it netmaker-0 -- cat /etc/resolv.conf                                        
Defaulted container "netmaker" out of: netmaker, init-sysctl (init)
nameserver 169.254.25.10
search default.svc.cluster.local svc.cluster.local cluster.local atmo.video openstacklocal
options ndots:5
root@nginx-656945f87b-nwp4j:/# cat /etc/resolv.conf 
nameserver 169.254.25.10
search default.svc.cluster.local svc.cluster.local cluster.local atmo.video openstacklocal
options ndots:5
root@nginx-656945f87b-nwp4j:/# ping netmaker-postgresql-ha-pgpool.default.svc.cluster.local
PING netmaker-postgresql-ha-pgpool.default.svc.cluster.local (10.233.18.153): 56 data bytes
64 bytes from 10.233.18.153: icmp_seq=0 ttl=64 time=0.052 ms
^C--- netmaker-postgresql-ha-pgpool.default.svc.cluster.local ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.052/0.052/0.052/0.000 ms
afeiszli commented 2 years ago

Please try with the latest Helm, though I think this is likely a cluster-specific issue if the pod cannot find the service.