cloud-init not setting password from admin_pass in meta_data.json

asked 2018-11-02 18:08:11 -0500

I've got a nova setup that was working previously but for some reason is no longer setting the admin password from the configdrive. cloud-init is finding the config drive okay and seems to have no trouble loading from it and setting network configs, but admin_pass from meta_data.json seems to get ignored.

Here are some logs showing that the data is being read:

2018-10-29 22:51:50,893 - util.py[DEBUG]: Fetched {'pstore': {'opts': 'rw,nosuid,nodev,noexec,relatime', 'mountpoint': '/sys/fs/pstore', 'fstype': 'pstore'}, 'securityfs': {'opts': 'rw,nosuid,nodev,noexec,relatime', 'mountpoint': '/sys/kernel/security', 'fstype': 'securityfs'}, 'debugfs': {'opts': 'rw,relatime', 'mountpoint': '/sys/kernel/debug', 'fstype': 'debugfs'}, 'udev': {'opts': 'rw,nosuid,relatime,size=500660k,nr_inodes=125165,mode=755', 'mountpoint': '/dev', 'fstype': 'devtmpfs'}, 'fusectl': {'opts': 'rw,relatime', 'mountpoint': '/sys/fs/fuse/connections', 'fstype': 'fusectl'}, 'mqueue': {'opts': 'rw,relatime', 'mountpoint': '/dev/mqueue', 'fstype': 'mqueue'}, 'hugetlbfs': {'opts': 'rw,relatime', 'mountpoint': '/dev/hugepages', 'fstype': 'hugetlbfs'}, 'systemd-1': {'opts': 'rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct', 'mountpoint': '/proc/sys/fs/binfmt_misc', 'fstype': 'autofs'}, 'tmpfs': {'opts': 'ro,nosuid,nodev,noexec,mode=755', 'mountpoint': '/sys/fs/cgroup', 'fstype': 'tmpfs'}, 'devpts': {'opts': 'rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000', 'mountpoint': '/dev/pts', 'fstype': 'devpts'}, 'sysfs': {'opts': 'rw,nosuid,nodev,noexec,relatime', 'mountpoint': '/sys', 'fstype': 'sysfs'}, '/dev/vda1': {'opts': 'rw,relatime,data=ordered', 'mountpoint': '/', 'fstype': 'ext4'}, 'proc': {'opts': 'rw,nosuid,nodev,noexec,relatime', 'mountpoint': '/proc', 'fstype': 'proc'}, 'cgroup': {'opts': 'rw,nosuid,nodev,noexec,relatime,memory', 'mountpoint': '/sys/fs/cgroup/memory', 'fstype': 'cgroup'}} mounts from proc
2018-10-29 22:51:50,893 - util.py[DEBUG]: Running command ['mount', '-o', 'ro,sync', '-t', 'auto', '/dev/sr0', '/run/cloud-init/tmp/tmpthdk34l3'] with allowed return codes [0] (shell=False, capture=True)
2018-10-29 22:51:50,913 - openstack.py[DEBUG]: Selected version '2015-10-15' from ['2012-08-10', '2013-04-04', '2013-10-17', '2015-10-15', '2016-06-30', '2016-10-06', '2017-02-22', 'latest']
2018-10-29 22:51:50,913 - util.py[DEBUG]: Reading from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/network_data.json (quiet=False)
2018-10-29 22:51:50,915 - util.py[DEBUG]: Read 820 bytes from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/network_data.json
2018-10-29 22:51:50,916 - util.py[DEBUG]: Reading from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/vendor_data.json (quiet=False)
2018-10-29 22:51:50,916 - util.py[DEBUG]: Read 2 bytes from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/vendor_data.json
2018-10-29 22:51:50,916 - util.py[DEBUG]: Reading from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/meta_data.json (quiet=False)
2018-10-29 22:51:50,917 - util.py[DEBUG]: Read 1047 bytes from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/meta_data.json
2018-10-29 22:51:50,917 - util.py[DEBUG]: Reading from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/user_data (quiet=False)
2018-10-29 22:51:50,917 - util.py[DEBUG]: Read 1705 bytes from /run/cloud-init/tmp/tmpthdk34l3/openstack/2015-10-15/user_data
2018-10-29 22:51:50,918 - util.py[DEBUG]: Reading from /run/cloud-init/tmp/tmpthdk34l3/ec2/latest/meta-data.json (quiet=False)
2018-10-29 22:51:50,919 - util.py[DEBUG]: Read 526 bytes from /run/cloud-init/tmp ...
(more)
edit retag flag offensive close merge delete

Comments

As far as I understand it, Nova doesn't use cloud-init to set the admin password, but a hypervisor-specific function. This is probably done by injecting the password into the VM's filesystem, which would explain why Heat doesn't have to recreate the instance when changing the admin password.

Bernd Bausch gravatar imageBernd Bausch ( 2018-11-02 22:24:56 -0500 )edit