[Bug 285679] net/cloud-init cloudinit not reading user-data with NoCloud datasource

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 26 Mar 2025 19:19:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285679

            Bug ID: 285679
           Summary: net/cloud-init cloudinit not reading user-data with
                    NoCloud datasource
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: abhay.rathod@quest.com
                CC: andrey@bsdnir.info
                CC: andrey@bsdnir.info
             Flags: maintainer-feedback?(andrey@bsdnir.info)

Created attachment 259056
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=259056&action=edit
cloud-init log file

Hello

I have FreeBSD 14.2 setup with py311-cloud-init-24.1.4_2 package. I have
enabled cloudinit_enable="YES" in rc.conf. All cloudinit config files are
located in /usr/local/etc/cloud/ and I have added an new config file under
/usr/local/etc/cloud.cfg.d/00_nocloud.cfg

Code:
datasource_list: ["NoCloud","None"]
datasource:
  NoCloud:
  seedfrom: file:///root/cloud/
network:
  config: disabled
  timeout: 1

Now, I have created a user-data file under /root/cloud/ with following content

-------------
#cloud-config
# run an arbitrary command very early on
bootcmd:
  - echo bootcmd | tee -a /root/cloud/cloudinit_was_here
# touch arbitrary files very early on, note YAML list for multiple files
write_files:
- content: |
    writefiles
  path: /root/cloud/cloudinit_was_here
  append: true
- content: |
    writefiles
  path: /root/cloud/writefiles_was_here
  append: true
# run an arbitrary command later on
runcmd:
  - echo runcmd | tee -a /root/cloud/cloudinit_was_here

--------------

I have cleared /var/run/cloud-init directory and started the cloud-init service

Executed below commands:

service cloudinit start
cloud-init --debug init --local
cloud-init --debug init
cloud-init  --debug modules --mode config
cloud-init modules --mode final

However nothing happened. I was expected 2 files to be created in /root/cloud
folder.

Am I missing anything?

-- 
You are receiving this mail because:
You are the assignee for the bug.