hi, I've been using py38-cloud-init, and now py39-cloud-init in conjunction with Xen Orchestra: https://xen-orchestra.com/docs/installation.html#xoa https://xoa.io/deploy Originally with py38-cloud-init, and now py39-cloud-init, I'm applying the following change: sed -i '' -e 's/ gid = grp.getgrnam(group).gr_gid/ pass #20220224 this comment added in packer builder. bug?: gid = grp.getgrnam(group).gr_gid/g' /usr/local/lib/python3.9/site-packages/cloudinit/util.py Unless I make that change, a corresponding cloud_init with eg: write_files: - content: | some-script-here path: /root/some-script.sh or write_files: - content: | some-script-here permissions: 0744 path: /root/some-script.sh write_files: - content: | some-script-here permissions: "0744" path: /root/some-script.sh doesn't appear to be handled correctly. Example error message: from /var/log/cloud-init-output.log is: util.py[WARNING]: Running module write-files (<module 'cloudinit.config.cc_write_files' from '/usr/local/lib/python3.9/site-packages/cloudinit/config/cc_write_files.py'>) failed I am successfully using cloud-init with the same xen/xen-orchestra & other operating systems, for example alma linux, without needing to apply this change. Please let me know if there is further information I can provide. Alternatively, also let me know if you believe this issue should be submitted upstream with cloud-init team directly. Many thanks
> I've been using py38-cloud-init, and now py39-cloud-init in conjunction with Xen Orchestra Perhaps to clarify: This means the hypervisor host is xen with cloud-init provided via xen orchestra, but the issue I'm reporting occurs in a FreeBSD13 vm on that platform.
Confirm, i'm see this error message in log, my host system FreeBSD bhyve cloud-init. But file created in guest system. We have 2 way, add patch in port, and need report upstream, #cloud-init IRC channel on Libera or https://bugs.launchpad.net/cloud-init/+filebug
Created attachment 235227 [details] reformat makepatch for current port
In irc cloud-init have hardcoded root:root https://github.com/canonical/cloud-init/blob/e0416cd67b423b9ae28e5edcd0db7aecdde4ecbe/cloudinit/config/cc_write_files.py#L18 need set owner: root:wheel in write_files
upstream pull request https://github.com/canonical/cloud-init/pull/1587
Comment on attachment 235227 [details] reformat makepatch for current port this wrong way, upstream have more complex patch. Testing
this was fixed upstream and released in 22.3