Closed gallexme closed 4 years ago
First hunch is that it comes from https://github.com/ReSearchITEng/kubeadm-playbook/blob/2440e5827e451a8694ce28ab744b177ff81ee181/roles/primary-master/tasks/main.yml#L308 (which is done for both admin.conf and kubelet.conf to overcome issues with http_proxy (in case is being used). BTW, are you using ipv6? This might require fix of the regex
It would be really helpful if you could skip this task (comment it out) and see if it solves the issue. Ideally, share admin.conf before being updated, so we can understand why replace goes wrong (in case this is the issue).
im not actively using ipv6, but im sure every node has some ipv6 address assigned {{ master_name }} seems to be ok: [master.h0st.space] => { "msg": "62-210-136-24.rev.poneytelecom.eu" }
so apperantly it tries to use Reverse DNS? instead of the fqdn set in the inventory
wait, I see instead of master, it says: node0. Could it be that ansible is confused due to the fact that group name "node" is the same as the name of your machine 'node'?
@ReSearchITEng sorry between the 2 comments i switched the all/network.yaml cluster_name from node0 to master
i think i found the issue
https://github.com/ansible/ansible/issues/38777
import socket
socket.gethostname()
'master.h0st.space'
socket.getfqdn()
'62-210-136-24.rev.poneytelecom.eu'
hostname -A 62-210-136-24.rev.poneytelecom.eu master.h0st.space
is this coming from DNS or from /etc/hosts file?
If you don't have access to DNS, update the hosts file, so:
hostname -s
in indeed short (aka master) and hostname -f
is indeed long.
Maybe even remove the alias master.h0st.space.
What we could do, is to skip this replacement task when proxy is not defined... Please update when you have news.
@ReSearchITEng it is like that already
sudo hostname -f master.h0st.space sudo hostname -s master host file
at /etc/hosts 127.0.0.1 localhost 127.0.1.1 sd-53287.dedibox.fr storage
::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
only hostname -A returns an additional Alias to the 62-210-136-24.rev.poneytelecom.eu as first entry
which isnt from me, probably the cloud provider set the network card or so to it
Edit: trying to change ansible_fqdn to inventory_hostname
runs way farther now until TASK [tools : labeling]
fatal: [node0.h0st.space -> master.h0st.space]: FAILED! => {"changed": true, "cmd": "kubectl label nodes node0 node-role.kubernetes.io/infra= --overwrite", "delta": "0:00:00.069388", "end": "2019-11-06 21:01:44.788673", "msg": "non-zero return code", "rc": 1, "start": "2019-11-06 21:01:44.719285", "stderr": "Error from server (NotFound): nodes \"node0\" not found", "stderr_lines": ["Error from server (NotFound): nodes \"node0\" not found"], "stdout": "", "stdout_lines": []}
uhm it tries to use the inventory_hostname_short name as node name, but they called inventory_hostname
kubectl get nodes
NAME STATUS ROLES AGE VERSION
master.h0st.space NotReady master 116s v1.16.2
node0.h0st.space NotReady <none> 48s v1.16.2
Above is already fixed, get the new changes.
as soon as im done with a installation im gonna try merging everything :| trying to document all the issues i find on the way, and hack through fixing them
If there are no more comments, shall we close this issue?
Once I get it to run through, but master doesn't have a connection to any node yet, cuz the different network reasons
Stale issue message
I Used a FQDN in in the Inventory File Thats the Result: