setting manual_cache_clean causes warning

Bug #1742479 reported by Scott Moser
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
cloud-init (Ubuntu)
Fix Released

Bug Description

If manual_cache_clean is set in an instance, then ds-identify will write
 '# manual_cache_clean."'
to its config (/run/cloud-init/cloud.cfg).

cloud-init will try to load that file, and will WARN on it not being a dict.

2018-01-10 15:45:57,282 -[WARNING]: Failed loading yaml blob
2018-01-10 15:45:57,283 -[DEBUG]: Failed loading yaml blob
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/", line 898, in load_yaml
    (allowed, type_utils.obj_name(converted)))
TypeError: Yaml load allows (<class 'dict'>,) root types, but got NoneType instead

python3 -c 'import yaml; yaml.load("# manual_cache_clean.\n")'
 echo "manual_cache_clean: true" > /etc/cloud/cloud.cfg.d/manual.cfg
If you set manual_cache_clean in an instance, then

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 17.2-1-g4089e20c-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-17.20-generic 4.13.8
Uname: Linux 4.13.0-17-generic x86_64
ApportVersion: 2.20.8-0ubuntu5
Architecture: amd64
CloudName: NoCloud
Date: Wed Jan 10 15:46:20 2018
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Chad Smith (chad.smith) wrote :

This is done in ./src/maasserver/

        # Prevent the node from requesting cloud-init data on every reboot.
        # This is done so a machine does not need to contact MAAS every time
        # it reboots.
        "manual_cache_clean": True,

Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 17.2-13-g6299e8d0-0ubuntu1

cloud-init (17.2-13-g6299e8d0-0ubuntu1) bionic; urgency=medium

  * New upstream snapshot.
    - Do not log warning on config files that represent None. (LP: #1742479)
    - tests: Use git hash pip dependency format for pylxd. [Chad Smith]
    - tests: add integration requirements text file [Joshua Powers]
    - MAAS: add check_instance_id based off oauth tokens. (LP: #1712680)

 -- Scott Moser <email address hidden> Mon, 15 Jan 2018 10:15:05 -0500

Changed in cloud-init (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 18.1

This bug is believed to be fixed in cloud-init in 18.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: New → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.