Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hostname changes #2475

Open
lbrigman124 opened this issue Dec 10, 2024 · 0 comments
Open

Hostname changes #2475

lbrigman124 opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lbrigman124
Copy link

What is version of KubeKey has the issue?

v3.1.1

What is your os environment?

Rocky Linux 9

KubeKey config file

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: rockygsm-1
spec:
  hosts:
  - {name: hmdc-10 , address: 10.109.182.10, internalAddress: 10.109.182.10, user: user , password: abc1234 }
  - {name: hmdc-11 , address: 10.109.182.11, internalAddress: 10.109.182.11, user: user , password: abc1234 }
  - {name: hmdc-12 , address: 10.109.182.12, internalAddress: 10.109.182.12, user: user , password: abc1234 }
  roleGroups:
    etcd:
    - hmdc-10
    - hmdc-11
    - hmdc-12
    control-plane:
    - hmdc-10
    - hmdc-11
    - hmdc-12
    worker:
    - hmdc-10
    - hmdc-11
    - hmdc-12

A clear and concise description of what happend.

If the nodes are not actually named what is provided because the address is multi-homed but the provided address is the DNS name of the hosts for the provided IP. Then the hostname gets changed.

This is problematic in that the hostname is tied to Active Directories and other authentication processes.

Changing the hostname is in lot of cases a security violation and will prevent the use of the tool requiring a wholesale rewrite to use a different installer

Relevant log output

sudo -E /bin/bash -c "hostnamectl set-hostname hmdc-10 && sed -i '/^127.0.1.1/s/.*/127.0.1.1      hmdc-10/g' /etc/hosts"
sudo -E /bin/bash -c "hostnamectl set-hostname hmdc-11 && sed -i '/^127.0.1.1/s/.*/127.0.1.1      hmdc-11/g' /etc/hosts"
sudo -E /bin/bash -c "hostnamectl set-hostname hmdc-12 && sed -i '/^127.0.1.1/s/.*/127.0.1.1      hmdc-12/g' /etc/hosts"

Additional information

If the FQDN is given in the config file then the short hostname is changed to be the FQDN.

@lbrigman124 lbrigman124 added the bug Something isn't working label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant