[Bug 295062] nuageinit fails for non-YAML user-data scripts
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295062] nuageinit fails for non-YAML user-data scripts"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 May 2026 17:40:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295062
Bug ID: 295062
Summary: nuageinit fails for non-YAML user-data scripts
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: ross@exitzero.uk
nuageinit(7) provides support for cloud-init (https://cloud-init.io/) to allow
customisation of FreeBSD disk images on first boot. "BASIC-CLOUDINIT" images
are built as part of the FreeBSD release process, with nuageinit configured to
run on first boot.
On previous FreeBSD releases (I have tested on 14.3 and 15.0), the "user-data"
(or "user_data") file could be provided as a YAML file, with the first line
reading "#cloud-config" (note there is a typo in the man page, which
incorrectly specifies "#!cloud-config") or as an executable script, with a
shebang like "#!/bin/sh -e".
Historically, YAML support was quite limited and so I needed a shell script to
provide my required functionality.
Unfortunately, support for executable scripts is broken in CURRENT,
14.4-RELEASE and 15.1-RELEASE (awaiting beta testing at time of writing).
The bug is in /usr/libexec/nuageinit
(https://cgit.freebsd.org/src/tree/libexec/nuageinit/nuageinit) introduced in
this commit:
https://cgit.freebsd.org/src/commit/libexec/nuageinit/nuageinit?id=cae280931c9e1f072d8bf300c377ae120300b898
On line 732
(https://cgit.freebsd.org/src/blame/libexec/nuageinit/nuageinit?id=cae280931c9e1f072d8bf300c377ae120300b898#n732)
the load_userdata() function attempts to parse the user-data file as YAML, then
failing and exiting if that parsing is unsuccessful. Unfortunately, the check
for whether the file contains YAML or not doesn't occur until line 760
(https://cgit.freebsd.org/src/blame/libexec/nuageinit/nuageinit?id=cae280931c9e1f072d8bf300c377ae120300b898#n760),
which is run after the load_userdata() function has been called.
It is therefore never possible to reach line 793, where a non-YAML, executable
user-data file is handled.
Possible workaround: Switch away from an executable user-data to YAML. I don't
believe this will meet all my requirements since my existing script explicitly
sets group IDs, which isn't supported in the YAML version.
--
You are receiving this mail because:
You are the assignee for the bug.