cloud-init query traceback on root read-only etc/cloud/cloud.cfg.d/ files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned |
Bug Description
If any files are root read-only in /etc/cloud/
cloud-init version: 21.4
Reproducible on Jammy Desktop installer images
csmith@
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
retval = util.log_time(
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/lib/
paths = read_cfg_paths()
File "/usr/lib/
init.read_cfg()
File "/usr/lib/
self._cfg = self._read_
File "/usr/lib/
base_
File "/usr/lib/
util.
File "/usr/lib/
confd_cfg = read_conf_d(confd)
File "/usr/lib/
cfgs.
File "/usr/lib/
return load_yaml(
File "/usr/lib/
with open(fname, 'rb') as ifh:
PermissionError: [Errno 13] Permission denied: '/etc/cloud/
# works fine for root user
csmith@
[sudo] password for csmith:
{
"_beta_keys": [
"subplatform"
],
"availability_
"base64_
"cloud_name": "none",
"distro": "ubuntu",
"distro_release": "jammy",
"distro_version": "22.04",
"ds": {
"_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.",
"meta_data": {
"instance_id": "fd598361-
}
},
"instance_id": "iid-datasource
"kernel_release": "5.13.0-
"local_hostname": "csmith-
"machine": "x86_64",
"merged_cfg": {
"_doc": "Merged cloud-init system config from /etc/cloud/
"_log": [
"[loggers]
"[handler_
"[handler_
],
"apt": {
"preserve_
},
"cloud_
"emit_upstart",
"snap",
"ssh-import-id",
"locale",
"set-passwords",
"grub-dpkg",
"apt-
"apt-configure",
"ubuntu-
"ntp",
"timezone",
"disable-
"runcmd",
"byobu"
],
"cloud_
"package-
"fan",
"landscape",
"lxd",
"ubuntu-
"write-
"puppet",
"chef",
"mcollective",
"salt-minion",
"reset_rmc",
"refresh_
"rightscale_
"scripts-
"scripts-
"scripts-
"scripts-
"scripts-user",
"ssh-
"keys-
"install-
"phone-home",
"final-message",
"power-
],
"cloud_
"migrator",
"seed_random",
"bootcmd",
"write-files",
"growpart",
"resizefs",
"disk_setup",
"mounts",
"set_hostname",
"update_
"update_
"ca-certs",
"rsyslog",
"users-groups",
"ssh"
],
"datasource": {
"None": {
"metadata": {
"instance_id": "fd598361-
},
"userdata_raw": "#cloud-
}
},
"datasource_
"None"
],
"def_log_file": "/var/log/
"disable_root": true,
"log_cfgs": [
[
"[loggers]
"[handler_
]
],
"network": {
"config": "disabled"
},
"output": {
"all": "| tee -a /var/log/
},
"preserve_
"syslog_
"syslog:adm",
"root:adm",
"root:wheel",
"root:root"
],
"users": [
"default"
],
"vendor_data": {
"enabled": true,
"prefix": []
},
"vendor_data2": {
"enabled": true,
"prefix": []
}
},
"platform": "none",
"public_ssh_keys": [],
"python_version": "3.9.9",
"region": null,
"sensitive_keys": [
"merged_cfg"
],
"subplatform": "config",
"sys_info": {
"dist": [
"ubuntu",
"22.04",
"jammy"
],
"platform": "Linux-
"python": "3.9.9",
"release": "5.13.0-
"system": "Linux",
"uname": [
"Linux",
"csmith-
"5.13.
"#19-Ubuntu SMP Thu Oct 7 21:58:00 UTC 2021",
"x86_64",
"x86_64"
],
"variant": "ubuntu"
},
"system_platform": "Linux-
"userdata": "#cloud-
"v1": {
"_beta_keys": [
"subplatform"
],
"availability
"cloud_name": "none",
"distro": "ubuntu",
"distro_release": "jammy",
"distro_version": "22.04",
"instance_id": "iid-datasource
"kernel_release": "5.13.0-
"local_hostname": "csmith-
"machine": "x86_64",
"platform": "none",
"public_
"python_version": "3.9.9",
"region": null,
"subplatform": "config",
"system_
"variant": "ubuntu"
},
"variant": "ubuntu",
"vendordata": ""
}
description: | updated |
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
This bug is believed to be fixed in cloud-init in version 22.2. If this is still a problem for you, please make a comment and set the state back to New
Thank you.