[Bug 2037555] [NEW] autoinstall cloud-init complains about mount directive - none is not of type string

Launchpad Bug Tracker 2037555 at bugs.launchpad.net
Wed Sep 27 15:32:23 UTC 2023


You have been subscribed to a public bug by Dan Bungert (dbungert):

Hi,

I'm installing Ubuntu 22.04.3 from an ISO on a proxmox server using
packer. With packer I'm giving some command line arguments that allow me
to configure the network and loads the cloud-init configuration through
a http server that packer provides:

                        "<spacebar>",
                        "ip=${var.vm_ip}::${var.vm_gateway}:${var.vm_netmask}::::${var.vm_dns} ",
                        "autoinstall 'ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/' ",
                        "<F10>"

The user-data is loaded correctly (I can see it under in /var/lib/cloud/instance), but I get an error during the installation process:
"load_autoinstall_data cloud config scheme error autoinstall.user-data.mounts.0.1 none is not of type 'strings'"

Running "cloud-init schema --config-file /var/lib/cloud/instance/user-
data.txt" confirms that everything is fine and that the syntax is
correct.

This is what the autoinstall (and user-data) looks like:
```
#cloud-config
autoinstall:
  version: 1
  locale: en_US
  keyboard:
    layout: us
  network:
    network:
      version: 2
      ethernets:
       ens18:
         addresses:
             - 10.88.88.157/24
         routes:
         - to: default
           via: 10.88.88.126
         nameservers:
           search: [example.internal]
           addresses: [10.88.88.126]
  refresh-installer:
    update: no
  ssh:
    install-server: true
    allow-pw: true
  packages:
    - qemu-guest-agent
    - python3-pip
    - jq
  storage:
    layout:
      name: direct
    swap:
      size: 0
  user-data:
    manage_etc_hosts: false
    mounts:
      - [ swap, null ]
    package_upgrade: false
    users:
      - name: packer
        passwd: $6$<password-hash>
        groups: [adm, cdrom, dip, plugdev, sudo]
        lock-passwd: false
        sudo: ALL=(ALL) NOPASSWD:ALL
        shell: /bin/bash
        ssh_authorized_keys:
          - ssh-ed25519 <my-ssh-key>
```

Removing the mounts directive altogether (with the "swap, null" item) bypasses the error completely.
The cloud-init version (before upgrades) is 23.2.1-0ubuntu0~22.04.1.

The cloud-init version in the Ubuntu 22.04.1 iso image is
22.2-0ubuntu1~22.04.3 (I don't know how that works, why it's referencing
22.04.3, I'm checking this by using ctrl+alt+F2 during the installation
process, so I don't think it's got time to upgrade cloud-init).

Using the Ubuntu 22.04.1 ISO works without any issues.

** Affects: subiquity
     Importance: Medium
         Status: Confirmed


** Tags: cloud-init foundations-todo mounts user-data
-- 
autoinstall cloud-init complains about mount directive - none is not of type string
https://bugs.launchpad.net/bugs/2037555
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to the bug report.



More information about the foundations-bugs mailing list