1

cloud-init services not starting after reboot. I am using Suse 15 and my instance is running on openstack cloud.

OS details:

NAME="SLES"  
VERSION="15"  
VERSION_ID="15"  
PRETTY_NAME="SUSE Linux Enterprise Server 15"  
ID="sles"  
ID_LIKE="suse"  
ANSI_COLOR="0;32"  
CPE_NAME="cpe:/o:suse:sles:15"  

Cloud-init version:

cloud-init 19.1

Even we enable all the services but still having same issue.

All soft links created in "/etc/systemd/system/cloud-init.target.wants"

lrwxrwxrwx 1 root root 44 Jun 24 07:16 cloud-config.service ->
 /usr/lib/systemd/system/cloud-config.service  
lrwxrwxrwx 1 root root 43 Jun 24 07:16 cloud-final.service -> /usr/lib/systemd/system/cloud-final.service  
lrwxrwxrwx 1 root root 48 Jun 24 07:21 cloud-init-local.service -> /usr/lib/systemd/system/cloud-init-local.service  
lrwxrwxrwx 1 root root 42 Jun 25 05:04 cloud-init.service -> /usr/lib/systemd/system/cloud-init.service  
3
  • 1
    Hello and welcome to superuser! Could you please edit your question and add the output of systemctl status cloud-init.service and journalctl -eu cloud-init.service? Could you also add more information on how have you configured these services, how have you enabled them, how have you configured the .target which I see you use?
    – Fanatique
    Jun 25, 2019 at 8:53
  • cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/usr/lib/systemd/system/cloud-init.service; enabled; vendor preset: disabled) Active: inactive (dead) Jun 25, 2019 at 10:59
  • journalctl -eu cloud-init.service -- Logs begin at Tue 2019-06-25 10:57:15 UTC, end at Tue 2019-06-25 10:57:57 UTC. -- -- No entries -- Jun 25, 2019 at 11:00

2 Answers 2

1

that happens because cloud-init cant determinate the platform. To fix it, you have to the datasource_list:

cat <<EOF >>/etc/cloud/cloud.cfg.d/01_ds-identify.cfg
datasource_list: [ OpenStack, None ]
EOF
0

Not only you have to define a datasource_list in your cloud-init config, as shown in cloud-init services not starting after reboot, but you have to make sure your YAML list is formatted as an one-liner. The cloud-init YAML parser is not capable to read valid multi-line YAML lists.

See also https://github.com/canonical/cloud-init/blob/b5aecbe9512fa546255cc93b178b4081342fc247/tools/ds-identify#L547-L566

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .