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

Node registration failing when using other users except for root #1650

Open
nathanielkeeler opened this issue Nov 26, 2024 · 0 comments
Open

Comments

@nathanielkeeler
Copy link

nathanielkeeler commented Nov 26, 2024

Hello everyone,

What steps did you take and what happened:
When adding mulitple users, or when replacing the root user with another user in the machine registrating config, the nodes using the ISO cannot register to rancher properly.
After the ISO is installed and the machine reboots, the following occurs:

stat /etc/rancher/elemental/agent/config.yaml: no such file or directory
Bildschirmfoto vom 2024-11-26 09-09-30

In Rancher the registered machine is in an unavailable state:
Bildschirmfoto vom 2024-11-26 09-18-26

Failing Machine Registration config when replacing root with another user:

config:
  cloud-config:
    users:
      - name: example
        lock_passwd: true
        groups: sudo
        shell: /bin/bash
        sudo: ALL=(ALL) NOPASSWD:ALL
        ssh_authorized_keys:
            - "ssh-rsa AAAAB...== abc"
            - "ssh-rsa AAAAB...== xyz"
            - "ssh-rsa AAAAB...== efg"
  elemental:
      install:
        debug: true
        device: /dev/sda
        reboot: true
        snapshotter:
          type: btrfs
      registration:
        auth: mac
      reset:
        debug: true
        enabled: true
        reboot: true
        reset-oem: true
        reset-persistent: true

Failing Machine Registration Config with multiple users:

config:
  cloud-config:
    users:
      - name: root
        passwd: root
      - name: example
        lock_passwd: true
        groups: sudo
        shell: /bin/bash
        sudo: ALL=(ALL) NOPASSWD:ALL
        ssh_authorized_keys:
            - "ssh-rsa AAAAB...== abc"
            - "ssh-rsa AAAAB...== xyz"
            - "ssh-rsa AAAAB...== efg"
  elemental:
      install:
        ...

Failing Machine Registration Config with multiple users (basic):

config:
  cloud-config:
    users:
      - name: root
        passwd: root
      - name: example
        passwd: example
  elemental:
      install:
        ...

Working Machine Registration Config with adding the ssh-keys to the root user:

config:
  cloud-config:
    users:
      - name: root
        lock_passwd: true
        shell: /bin/bash
        ssh_authorized_keys:
            - "ssh-rsa AAAAB...== abc"
            - "ssh-rsa AAAAB...== xyz"
            - "ssh-rsa AAAAB...== efg"
  elemental:
      install:
        ...

What did you expect to happen:
The nodes setup with additional users instead of only the root user.

Environment:

  • Elemental release version (use cat /etc/os-release):
    Elemental Version: 1.6.5
NAME="SL-Micro"
VERSION="6.0"
VERSION_ID="6.0"
PRETTY_NAME="SUSE Linux Micro 6.0"
ID="sl-micro"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sl-micro:6.0"
HOME_URL="https://www.suse.com/products/micro/"
DOCUMENTATION_URL="https://documentation.suse.com/sl-micro/6.0/"
IMAGE_REPO="registry.suse.com/suse/sl-micro/6.0/baremetal-os-container"
IMAGE_TAG="2.1.3-4.7"
IMAGE="registry.suse.com/suse/sl-micro/6.0/baremetal-os-container:2.1.3-4.7"
TIMESTAMP=20241107104849
GRUB_ENTRY_NAME="SUSE Linux Micro"
  • Rancher version: 2.9.2
  • Kubernetes version (use kubectl version): on cluster: v1.30.4+rke2r1
  • Cloud provider or hardware configuration: VMWare vSphere, Node VM CPU: 2 Cores, RAM: 4GB, Disk: 30GB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant