On my OpenStack instance I am seeing Shared object "libpython2.7.so.1" not found, required by "python2.7" when it is running /usr/local/etc/rc.d/cloudinit. From the rcorder below we can see ldconfig is running after cloudinit. This is ZFS which may affect the ordering. The patch below resolves it. --- cloudinit.orig 2014-10-11 04:26:25.000000000 +1300 +++ cloudinit 2017-12-15 22:16:23.550246050 +1300 @@ -1,7 +1,7 @@ #!/bin/sh # PROVIDE: cloudinit -# REQUIRE: FILESYSTEMS NETWORKING cloudinitlocal +# REQUIRE: FILESYSTEMS NETWORKING cloudinitlocal ldconfig # BEFORE: cloudconfig cloudfinal . /etc/rc.subr rcorder before ---- /etc/rc.d/growfs /etc/rc.d/sysctl /etc/rc.d/hostid /etc/rc.d/zvol /etc/rc.d/dumpon /etc/rc.d/ddb /etc/rc.d/initrandom /etc/rc.d/geli /etc/rc.d/gbde /etc/rc.d/ccd /etc/rc.d/swap /etc/rc.d/fsck /etc/rc.d/root /etc/rc.d/mdconfig /etc/rc.d/hostid_save /etc/rc.d/mountcritlocal /usr/local/etc/rc.d/cloudinitlocal /etc/rc.d/zfs /etc/rc.d/var /etc/rc.d/cleanvar /etc/rc.d/FILESYSTEMS /etc/rc.d/kldxref /etc/rc.d/kld /etc/rc.d/addswap /etc/rc.d/random /etc/rc.d/postrandom /etc/rc.d/adjkerntz /etc/rc.d/atm1 /etc/rc.d/hostname /etc/rc.d/ip6addrctl /etc/rc.d/netoptions /etc/rc.d/sppp /etc/rc.d/ipfilter /etc/rc.d/ipnat /etc/rc.d/ipfs /etc/rc.d/serial /etc/rc.d/netif /etc/rc.d/devd /etc/rc.d/resolv /etc/rc.d/local_unbound /etc/rc.d/atm2 /etc/rc.d/pfsync /etc/rc.d/pflog /etc/rc.d/pf /etc/rc.d/stf /etc/rc.d/ppp /etc/rc.d/faith /etc/rc.d/routing /etc/rc.d/mroute6d /etc/rc.d/nsswitch /etc/rc.d/rtsold /etc/rc.d/static_ndp /etc/rc.d/static_arp /etc/rc.d/bridge /etc/rc.d/route6d /etc/rc.d/mrouted /etc/rc.d/routed /etc/rc.d/defaultroute /etc/rc.d/ipfw /etc/rc.d/netwait /etc/rc.d/NETWORKING /usr/local/etc/rc.d/cloudinit /usr/local/etc/rc.d/cloudconfig /etc/rc.d/ipsec /etc/rc.d/mountcritremote /etc/rc.d/accounting /etc/rc.d/ldconfig /etc/rc.d/newsyslog /etc/rc.d/syslogd /etc/rc.d/ntpdate /etc/rc.d/rpcbind /etc/rc.d/nfsclient /etc/rc.d/devfs /etc/rc.d/ipmon /etc/rc.d/mdconfig2 /etc/rc.d/kdc /etc/rc.d/watchdogd /etc/rc.d/savecore /etc/rc.d/archdep /etc/rc.d/abi /etc/rc.d/SERVERS /etc/rc.d/nisdomain /etc/rc.d/ypserv /etc/rc.d/ypbind /etc/rc.d/ypset /etc/rc.d/amd /etc/rc.d/atm3 /etc/rc.d/auditd /etc/rc.d/auditdistd /etc/rc.d/tmp /etc/rc.d/cleartmp /etc/rc.d/ctld /etc/rc.d/dmesg /etc/rc.d/hastd /etc/rc.d/ipxrouted /etc/rc.d/iscsid /etc/rc.d/iscsictl /etc/rc.d/keyserv /etc/rc.d/nfsuserd /etc/rc.d/gssd /etc/rc.d/quota /etc/rc.d/mountd /etc/rc.d/nfsd /etc/rc.d/statd /etc/rc.d/lockd /etc/rc.d/pppoed /etc/rc.d/pwcheck /etc/rc.d/virecover /etc/rc.d/DAEMON /etc/rc.d/mountlate /etc/rc.d/swaplate /etc/rc.d/apm /etc/rc.d/apmd /etc/rc.d/bootparams /etc/rc.d/hcsecd /etc/rc.d/bthidd /etc/rc.d/local /etc/rc.d/lpd /etc/rc.d/motd /etc/rc.d/nscd /etc/rc.d/ntpd /etc/rc.d/powerd /etc/rc.d/rarpd /etc/rc.d/rctl /etc/rc.d/sdpd /etc/rc.d/rfcomm_pppd_server /etc/rc.d/rtadvd /etc/rc.d/rwho /etc/rc.d/timed /etc/rc.d/ugidfw /etc/rc.d/utx /etc/rc.d/yppasswdd /etc/rc.d/LOGIN /etc/rc.d/sshd /etc/rc.d/sendmail /etc/rc.d/othermta /etc/rc.d/cron /usr/local/etc/rc.d/cloudfinal /etc/rc.d/ypxfrd /etc/rc.d/ypupdated /etc/rc.d/ubthidhci /etc/rc.d/syscons /etc/rc.d/jail /etc/rc.d/localpkg /etc/rc.d/securelevel /etc/rc.d/nfscbd /etc/rc.d/msgs /etc/rc.d/moused /etc/rc.d/mixer /etc/rc.d/kpasswdd /etc/rc.d/kfd /etc/rc.d/kadmind /etc/rc.d/ipropd_slave /etc/rc.d/ipropd_master /etc/rc.d/inetd /etc/rc.d/hostapd /etc/rc.d/gptboot /etc/rc.d/geli2 /etc/rc.d/ftpd /etc/rc.d/ftp-proxy /etc/rc.d/bsnmpd /etc/rc.d/bgfsck /etc/rc.d/autounmountd /etc/rc.d/automountd /etc/rc.d/automount
Due to switching jobs, I am no longer using cloud-init on FreeBSD. If you would like to take over maintainership I'd be happy to hand it over to you.
A commit references this bug: Author: tobik Date: Mon Jan 1 12:14:13 UTC 2018 New revision: 457768 URL: https://svnweb.freebsd.org/changeset/ports/457768 Log: net/cloud-init: Add ldconfig to rc.d script rcorder shows that ldconfig is running after cloudinit in some cases. This can lead to problems like the following when running it on OpenStack: Shared object "libpython2.7.so.1" not found, required by "python2.7" - Reset maintainer by request of the current maintainer PR: 224361 Submitted by: thompsa Approved by: maintainer Changes: head/net/cloud-init/Makefile head/net/cloud-init/files/ head/net/cloud-init/files/patch-sysvinit_freebsd_cloudinit