rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
23.38k stars 2.97k forks source link

[BUG] Nodes name are different in RKE2 downstream cluster #41052

Open YunSangJun opened 1 year ago

YunSangJun commented 1 year ago

Rancher Server Setup

Information about the Cluster

YunSangJun commented 1 year ago

If change the location of the script that changes the hostname as below, all nodes will have the same name. In my thought, it seems that Rancher refer the hostname when set node name. Is it by design?.

===== [centos@test-f82e-w00-9ab86e06-lxldm ~]$ curl http://169.254.169.254/openstack/latest/user_data

cloud-config

hostname: test-f82e-w00-9ab86e06-lxldm runcmd:

//host name [centos@test-f82e-w00-9ab86e06-lxldm ~]$ hostname test-f82e-w00-9ab86e06-lxldm.ap-northeast-arc.stg.h53

//node name 1) test1

kubectl get nodes NAME STATUS ROLES AGE VERSION test-f82e-m00-a6513c24-sqzzc.ap-northeast-arc.stg.h53 Ready control-plane,etcd,master 17m v1.23.6+rke2r2 test-f82e-w00-9ab86e06-5pphd.ap-northeast-arc.stg.h53 Ready worker 15m v1.23.6+rke2r2 test-f82e-w00-9ab86e06-ftkts.ap-northeast-arc.stg.h53 Ready worker 15m v1.23.6+rke2r2 test-f82e-w00-9ab86e06-lbt2p.ap-northeast-arc.stg.h53 Ready worker 15m v1.23.6+rke2r2 test-f82e-w00-9ab86e06-lxldm.ap-northeast-arc.stg.h53 Ready worker 15m v1.23.6+rke2r2

2) test2

kubectl get nodes NAME STATUS ROLES AGE VERSION test2-c9f9-m00-94bbe3c9-vlmmg.ap-northeast-arc.stg.h53 Ready control-plane,etcd,master 7m20s v1.23.6+rke2r2 test2-c9f9-w00-0dcca191-hb7n6.ap-northeast-arc.stg.h53 Ready worker 5m7s v1.23.6+rke2r2

3) test3

kubectl get nodes NAME STATUS ROLES AGE VERSION test3-0938-m00-aac97a25-22cdg.ap-northeast-arc.stg.h53 Ready control-plane,etcd,master 5m17s v1.23.6+rke2r2 test3-0938-m00-aac97a25-ngzv9.ap-northeast-arc.stg.h53 Ready control-plane,etcd,master 5m54s v1.23.6+rke2r2 test3-0938-m00-aac97a25-nmtp6.ap-northeast-arc.stg.h53 Ready control-plane,etcd,master 8m44s v1.23.6+rke2r2 test3-0938-w00-636dc298-qx7rl.ap-northeast-arc.stg.h53 Ready worker 4m35s v1.23.6+rke2r2 test3-0938-w00-636dc298-r5phr.ap-northeast-arc.stg.h53 Ready worker 4m35s v1.23.6+rke2r2