Skip to content

HostnameConfig in v1.12.1 not applied #12564

@joshartman

Description

@joshartman

Bug Report

The HostnameConfig is not applied in v1.12.1 multiple documents.

Description

I have moved the automatic installation from the old network.yaml format to the multi document features as suggested by "smira" in bug #12561.

This works for me except the "HostnameConfig" is not applied. It does read the document as when I inject an error into the document (e.g. change hostname: to static:) it reports an error when booting.

Here is the multiple documents I am using:

---
apiVersion: v1alpha1
kind: HostnameConfig
hostname: "mxs01"
---
apiVersion: v1alpha1
kind: LinkConfig
name: ens18 # Name of the link (interface).
up: true # Bring the link up or down.
# mtu: 0 # Configure LinkMTU (Maximum Transmission Unit) for the link.
---
apiVersion: v1alpha1
kind: LinkConfig
name: ens19 # Name of the link (interface).
up: true # Bring the link up or down.
# mtu: 0 # Configure LinkMTU (Maximum Transmission Unit) for the link.
---
apiVersion: v1alpha1
kind: BondConfig
name: bond0 # Name of the bond link (interface) to be created.
# Names of the links (interfaces) on which the bond will be created.
links:
      - ens18
      - ens19
bondMode: active-backup # Bond mode.
xmitHashPolicy: layer2
lacpRate: slow
arpValidate: none
arpAllTargets: any
primaryReselect: always
failOverMac: 0
# Configure addresses to be statically assigned to the link.
addresses:
    - address: 172.20.0.99/24 # IP address to be assigned to the link.
# Configure routes to be statically created via the link.
routes:
    - gateway: 172.20.0.254 # The route's gateway (if empty, creates link scope route).
---
apiVersion: v1alpha1
kind: ResolverConfig
# A list of nameservers (DNS servers) to use for resolving domain names.
nameservers:
    - address: 172.20.0.254 # The IP address of the nameserver.
# Configuration for search domains (in /etc/resolv.conf).
searchDomains:
    # A list of search domains to be used for DNS resolution.
    domains:
        - mxs.local
---
apiVersion: v1alpha1
kind: TimeSyncConfig
# Specifies NTP configuration to sync the time over network.
ntp:
    # Specifies time (NTP) servers to use for setting the system time.
    servers:
        - 172.20.0.254

The following command is used to embed the document directly into the "metal-amd64.iso"

YAML=${1:-network.yaml}
docker run --rm -t -v $HOME/tmp/auto/_out:/out -v /dev:/dev -v $(pwd)/:/x --privileged ghcr.io/siderolabs/imager:v1.12.1 iso --embedded-config-path /x/${YAML}

Logs

There is nothing displayed in the logs that it sees the new hostname, setting it or even seeing it. The image shows that the hostname is set to "n/a".

Image

Environment

  • Talos version: v1.12.1
  • Kubernetes version: n/a
  • Platform: metal-amd64

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions