Public bug reported:

Upgrading cloud-init to version 19.1-1-gbaa47854-0ubuntu1~16.04.1 on
Ubuntu 16.04.6 LTS corrupts /etc/cloud/cloud.cfg.d/90_dpkg.cfg by adding
an extra bracket "]" to the datasource_list:

//////////////// bash
# Initial state
root@ub:/home/dan# cat /etc/cloud/cloud.cfg.d/90_dpkg.cfg
datasource_list: [ConfigDrive, None]

# I run a reinstall here because I'm already on the latest version,
# but the same thing happens when upgrading from an old version.
root@ub:/home/dan# apt-get install --reinstall cloud-init
...
Preparing to unpack .../cloud-init_19.1-1-gbaa47854-0ubuntu1~16.04.1_all.deb ...
Unpacking cloud-init (19.1-1-gbaa47854-0ubuntu1~16.04.1) over 
(19.1-1-gbaa47854-0ubuntu1~16.04.1) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Setting up cloud-init (19.1-1-gbaa47854-0ubuntu1~16.04.1) ...
Leaving 'diversion of /etc/init/ureadahead.conf to 
/etc/init/ureadahead.conf.disabled by cloud-init'

# End state
root@ub:/home/dan# cat /etc/cloud/cloud.cfg.d/90_dpkg.cfg
# to update this file, run dpkg-reconfigure cloud-init
datasource_list: [ ConfigDrive, None] ]

# The extra bracket causes file loading to fail and ConfigDrive to not be used 
on future boots.
# From /var/log/cloud-init-output.log:

2019-08-27 20:56:54,194 - util.py[WARNING]: Failed loading yaml blob. Invalid 
format at line 2 column 1: "while parsing a block mapping
  in "<unicode string>", line 2, column 1:
    datasource_list: [ ConfigDrive,  ...
    ^
expected <block end>, but found ']'
  in "<unicode string>", line 2, column 39:
     ... urce_list: [ ConfigDrive, None] ]
                                         ^"

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1841697

Title:
  Upgrade corrupts 90_dpkg.cfg

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1841697/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to