3

I have several user-data files on an internal gitlab repo.

I am running a deploy job which is deploying the user-data to our internal tftp server.

Our tftp server is part of our netboot.xyz instance. When I try to deploy our user-data via preseed address, it seems the installer picks up our config, but fails with:

DataSourceNoCloud.py[DEBUG]: Seed from https://our-tftp/user-data not supported by DataSourceNoCloud [seed=None] [dsmode=net]

So I thought I create another JOB which is running the validation script of subiquity, which is documented here.

Let's ignore my approaches to get the script running inside a docker container... The deps a straight forward ridiculous for a validation script.

So I installed a bare metal shell gitlab-executor and installed on the machine the deps of the script.

Sadly the response doesn't help at all, so many deps for nothing:

$ ./scripts/validate-autoinstall-user-data.py ../user-data
Could not find path to SNAP
Failure: The provided autoinstall config failed validation

What does that even mean? My user-data has no entry for snap dependencies. Here is my user-data:

#cloud-config
autoinstall:
  version: 1
  storage:
    layout:
      name: lvm
      sizing-policy: all
  keyboard:
    layout: de
    toggle: null
    variant: ''
  timezone: "Europe/Berlin"
  user-data:
    users:
    - name: admin-user
      passwd: <REMOVED>
      shell: /bin/bash
      lock-passwd: false
      groups: users
  ssh:
    allow-pw: false
    authorized-keys:
      - "ssh-ed25519 <REMOVED>"
      - "ssh-ed25519 <REMOVED>"
    install-server: true
  late-commands:
    - |
      bash <<'EOF'
        source <(cat /run/systemd/netif/leases/* | grep ^HOSTNAME=)
        [[ -n "${HOSTNAME}" ]] && echo "${HOSTNAME}" > /target/etc/hostname
      EOF
      true
MaKaNu
  • 161
  • 6

2 Answers2

1

Looked like this issue got introduced in 95ccb9c75322f75a2357c88836ee3fb40a6ffd1e. You may try 9fd3c924791b737d6b6cce04a35e3b82d45b535b as of now.

Neel
  • 11
1

It appears that the validate script needs subiquity-legacy-cloud-init-validate script. It expects to find this in the following location(s)

server_bin = f"{snap_path}/system_scripts"
desktop_bin = f"{snap_path}/bin/subiquity/system_scripts"

I don't have snap installed on my system however i noticed that the script(s) can be found in the subiquity checkout in the system_scripts subdirectory. As such you should be able to use the following command to run the validate script

SNAP=. ./scripts/validate-autoinstall-user-data.py ~/autoinstall.yaml
balder
  • 111