Why "cloud-init" is kept back in a new droplet with Ubuntu 16.04 while doing an "apt upgrade"?

July 11, 2017 421 views
Linux Basics Ubuntu 16.04

I have checked with "apt-mark hold cloud-init" and got the following mesage:
"cloud-init was already set on hold."

Is it safe to unhold it and upgrade it?

4 Answers
ricardoe56cf7fd July 12, 2017
Accepted Answer

Thank you for the answers.

There is another method to update it, wich is:

apt-mark unhold cloud-init

in the first place to unhold the holded package, and then

apt upgrade

My questions are:

  1. Why it was put on hold?
  2. Is it there a compatibility issue with DO so is kept on hold as they need this package for the control panels?

I would not recomend apt dist-upgrade as it involves updating other staff from vesion to version.

  • @ricardoe56cf7fd

    Well, I have never seen cloud-init being put on hold, so it must be something locally on your server that did that.

    No, if DigitalOcean required a special version, then all images would be a DigitalOcean repository for cloud-init.

    It is not required to have cloud-init installed to use the droplet, but if you recover a snapshot/backup, then you would manually have to setup IP-addresses (and maybe a few other thing). It is mainly used in the installation process, but expanding the disk is also automatically done by cloud-init. Generally, it's recommended to leave it installed and keep it up-to-date.

Hi @ricardoe56cf7fd

I have updated it on several servers, so I would consider it safe and with no issues.

You need to run apt dist-upgrade to upgrade between versions.
The apt upgrade will only upgrade minor updates like security patches.

I had the same problem and it seems like a strange situation to me. Anyway, I fixed this by installing the cloud-init package: sudo apt install cloud-init.

Straight from DO support:
"We pin cloud-init to a specified version in order to prevent upgrades from affecting the configuration options within your Droplet. While upgrades to cloud-init should not affect your Droplet, there have been certain situations where changes to the system had been performed due to cloud-init upgrades."

Based on that, I would say that it "should" be safe to unpin and upgrade it, but why take the chance?

Have another answer? Share your knowledge.