[OpenIndiana-discuss] OI-hipster-cloudimage 2024.04 cloud-init userscripts not executed

Michael Brüning m.bruening at cademica.net
Mon Dec 23 19:20:19 UTC 2024


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 at vmoi02:~# strings /usr/lib/useragent | grep runcmd
root at vmoi02:~#
root at 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 at 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!



More information about the openindiana-discuss mailing list