Template hostname not working

Hi,

Looking at the lxc-ci/images/centos.yaml at 9bae497783b3fd653d8190baec05f7339e2288e2 · lxc/lxc-ci · GitHub it seems that for centos the hostname template should be there.

If I create a centos/7 container:

incus create images:centos/7 c1

and look at its metadata I see this:

$ incus config metadata show c1
architecture: x86_64
creation_date: 1711437426
expiry_date: 1714029426
properties:
  architecture: x86_64
  description: Centos 7 x86_64 (20240326_07:08)
  name: centos-7-x86_64-default-20240326_07:08
  os: centos
  release: "7"
  serial: "20240326_07:08"
  variant: default
templates:
  /etc/hosts:
    when:
    - create
    - copy
    create_only: false
    template: hosts.tpl
    properties: {}
  /etc/sysconfig/network:
    when:
    - create
    - copy
    create_only: false
    template: network.incus.tpl
    properties: {}
  /etc/sysconfig/network-scripts/ifcfg-eth0:
    when:
    - create
    - copy
    create_only: false
    template: ifcfg-eth0.incus.tpl
    properties: {}

and if I start the container ad look into it the file is not there:

incus exec c1 -- ls /etc/hostname
ls: cannot access /etc/hostname: No such file or directory

Is this normal? I’m still learning all this so I am probably missing something.

@monstermunchkin any idea what’s going on here?