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

Posted July 11, 2017 5.7k views
Linux BasicsUbuntu 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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

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?