cloud-init fails on debian 8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Undecided
|
Unassigned |
Bug Description
On a minimal debian 8 install, with cloud-init installed from the debian jessie repositories, it does not work as expected. The hostname does not change, the SSH key is not set and the root password is not set.
This is on a cloud provider using Openstack with the config drive (cloudvps).
The same config file works on Debian 7 (with cloud-init installed via backports).
Without a custom config file, it also fails with the same error messages (with a default debian 8 package provided config file).
When running manually:
cloud-init modules --mode init
Traceback (most recent call last):
File "/usr/bin/
File "/usr/bin/
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/bin/
KeyError: 'modules-init'
The config or final part also fail, both give this error message:
cloud-init modules --mode config
Can not apply stage config, no datasource found! Likely bad things to come!
---
Traceback (most recent call last):
File "/usr/bin/
File "/usr/lib/
return self._get_
File "/usr/lib/
pkg_list)
File "/usr/lib/
raise DataSourceNotFo
DataSourceN
---
The config drive is available:
root@debian:~# lsblk /dev/sr0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 410K 0 rom
root@debian:~# blkid /dev/sr0
/dev/sr0: UUID="2015-
Including the metadata:
# cat /mnt/openstack/
{"admin_pass": "[...]", "random_seed": "l4Zr[...]=", "uuid": "3bc8[...]370b4", "availability_
This is the custom config file:
user: root
disable_root: 0
preserve_
datasource_
system_info:
distro: debian
cloud_
- bootcmd
- resizefs
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- ssh
cloud_
- disk-setup
- ssh-import-id
- locale
- set-passwords
- runcmd
cloud_
- scripts-per-once
- scripts-per-boot
- scripts-
- scripts-user
- keys-to-console
- final-message
As said, it also fails with a default debian 8 config file.
This is the debug log:
cat /var/log/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Cloud-init v. 0.7.6 running 'init-local' at Mon, 11 May 2015 13:46:29 +0000. Up 8.10 seconds.
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Writing to /var/log/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Changing the ownership of /var/log/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to remove /var/lib/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to remove /var/lib/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 11 bytes from /proc/uptime
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'init' took 0.024 seconds (0.02)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Cloud-init v. 0.7.6 running 'init' at Mon, 11 May 2015 13:46:29 +0000. Up 8.26 seconds.
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Writing to /var/log/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Changing the ownership of /var/log/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['ifconfig', '-a'] with allowed return codes [0] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['netstat', '-rn'] with allowed return codes [0] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] cloud-init[DEBUG]: Checking to see if files that we need already exist from a previous run that would allow us to stop early.
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /var/lib/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /var/lib/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /var/lib/
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['debian', 'cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Failed at attempted import of 'debian' due to: No module named debian
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found debian with attributes ['Distro'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] stages.py[DEBUG]: Using distro class <class 'cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Looking for for data source in: ['ConfigDrive'], via packages ['', 'cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['DataSourceCon
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Failed at attempted import of 'DataSourceConf
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found DataSourceConfi
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Searching for data source in: ['DataSourceCon
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['/sbin/blkid', '-odevice', '/dev/sr0'] with allowed return codes [0, 2] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['/sbin/blkid', '-odevice', '/dev/sr1'] with allowed return codes [0, 2] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['/sbin/blkid', '-tTYPE=vfat', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['/sbin/blkid', '-tTYPE=iso9660', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['/sbin/blkid', '-tLABEL=config-2', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /proc/mounts (quiet=False)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 1780 bytes from /proc/mounts
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Fetched {'devpts': {'mountpoint': '/dev/pts', 'opts': 'rw,nosuid,
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['mount', '-o', 'ro,sync', '/dev/sr0', '/tmp/tmp8GBPpv'] with allowed return codes [0] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /tmp/tmp8GBPpv/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 581 bytes from /tmp/tmp8GBPpv/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /tmp/tmp8GBPpv/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 961 bytes from /tmp/tmp8GBPpv/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Running command ['umount', '-l', '/tmp/tmp8GBPpv'] with allowed return codes [0] (shell=False, capture=True)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Recursively deleting /tmp/tmp8GBPpv
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /var/lib/
May 11 15:46:29 debian [CLOUDINIT] stages.py[INFO]: Loaded datasource DataSourceConfi
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 128 bytes from /proc/cmdline
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 476 bytes from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to load yaml from string of length 476 with allowed root types (<type 'dict'>,)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 88 bytes from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to load yaml from string of length 88 with allowed root types (<type 'dict'>,)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 1910 bytes from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to load yaml from string of length 1910 with allowed root types (<type 'dict'>,)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 26 bytes from /etc/cloud/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to load yaml from string of length 26 with allowed root types (<type 'dict'>,)
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_list with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_dict with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] importer.py[DEBUG]: Found m_str with attributes ['Merger'] in ['cloudinit.
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
May 11 15:46:29 debian [CLOUDINIT] __init__.py[DEBUG]: Merging using located merger 'DictMerger: (method=
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Attempting to remove /var/lib/
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: Read 11 bytes from /proc/uptime
May 11 15:46:29 debian [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'init' took 0.714 seconds (0.71)
root@debian:~#
Hi,
I'm seeing exactly same bug than you with debian8