Closed nsu700 closed 4 months ago
I'm not sure we can influence which ip gets reported primarily although you should see the additional ones in kcli info vm (under ips field).
Can you share output of kcli --debug info vm 924d8-worker-3
Yes, please check the attachment Found it not always get the wrong IP, I have restarted worker-0, worker-2 and worker-3, now only the worker-0 returns the correct IP
[lab-user@bastion-924d8 ~]$ kcli list vm
+------------------+--------+-----------------+------------------------------------+------+---------+
| Name | Status | Ip | Source | Plan | Profile |
+------------------+--------+-----------------+------------------------------------+------+---------+
| 924d8-ctlplane-0 | up | 192.168.172.140 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-ctlplane-1 | up | 192.168.172.42 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-ctlplane-2 | up | 192.168.172.75 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-worker-0 | up | 192.168.172.141 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-worker-1 | up | 192.168.172.142 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-worker-2 | up | 10.133.2.2 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| 924d8-worker-3 | up | 10.134.2.2 | rhcos-412.86.202306132230-0-vmware | ocp | kvirt |
| bastion-924d8 | up | 192.168.172.10 | | | |
+------------------+--------+-----------------+------------------------------------+------+---------+
[lab-user@bastion-924d8 ~]$
sadly, the debug file doesnt contain the kind of information I was looking for. As I am currently missing a vsphere platform where to troubleshoot this properly, please reach out on slack and we can do a tmate session on this
https://github.com/karmab/kcli/commit/eac69aec70722f07c9ca4a479ee26ae534676f04 should address it, provided you use default sdn range in your openshift cluster. I can't provide a cleaner fix because vsphere api doesnt provide a better way to identify which ips are valid
Found the IP is not the correct one for my vSphere VM 924d8-worker-3
The worker-3 should be 192.168.172.143, but in the above output, it is 10.134.2.2, seems it just grab the
ovn-k8s-mp0
address, but not thebr-ex
My environment is:
Attach my paramfile for reference, the worker-2 and worker-3 were added after OCP provisoned with command
kcli scale kube openshift --paramfile parameters.yml -w 4 openshift
: