Hi, i am new to this list and to OpenIndiana, hope this is the right place to ask..

I have problems getting the cloud-init userscripts to work, while network and user configuration (ssh-key,..) work well.

My environment: OpenIndiana Hipster 2024.04 Version illumos-eac40bb377 64-bit running under Ubuntu/Libvirt, setup via ansible.

User data file:
---------------------------------
#cloud-config
chpasswd: { expire: false }
ssh_pwauth: true

users:
  - name: root
    ssh_authorized_keys:
      - "{{ VM_ADM_SSH_KEY }}"

#package_update: true
#package_upgrade: true

growpart:
  mode: auto
  devices: ['/']

# run on every boot
bootcmd:
- echo "runboot done" >>/var/log/cloud-init-output.log

# run once for setup
runcmd:
- echo "runonce done" >>/var/log/cloud-init-output.log
---------------------------------

Looking at the code i assume a file "/var/metadata/userscript" should be generated on the first run, but that script does not exist. Maybe someone can share a working setup to clarify my understanding of the workflow?


In addition, i found a typo regading the option "runcmd", but i'm pretty sure that this is not causing my issue. (from: https://github.com/Toasterson/metadata-agent/blob/master/src/userdata/cloudconfig.rs: "pub runcms: Option<Multiformat>," not: runcmd)

root@vmoi02:~# strings /usr/lib/useragent | grep runcmd
root@vmoi02:~#
root@vmoi02:~# strings /usr/lib/useragent | grep runcms
/jenkins/jobs/oi-userland/workspace/components/developer/rust/rustc-1.77.2-src/library/alloc/src/slice.rsCloudConfiggroupsuserswrite_filesca-certspackagesgrowpartssh_keysinactiveencodingbootcmdruncmsfinal_message
[... output shortened]

root@vmoi02:~# strings /usr/lib/useragent | grep bootcmd
/jenkins/jobs/oi-userland/workspace/components/developer/rust/rustc-1.77.2-src/library/alloc/src/slice.rsCloudConfiggroupsuserswrite_filesca-certspackagesgrowpartssh_keysinactiveencodingbootcmdruncmsfinal_message
[... output shortened]

Thanks in advance for any advice!
Greetings, Michael




--
Die dümmsten Kälber wählen ihren Schlächter selber:
wer AFD wählt, wählt Faschismus!

_______________________________________________
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to