cloud-image-utils should Break, not Conflict with cloud-utils

Bug #1418568 reported by Ian Booth
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-utils (Ubuntu)
Fix Released
Medium
Scott Moser
Trusty
Fix Released
Medium
Scott Moser

Bug Description

[Begin SRU Template]
[Impact]
Due to the broken use of 'Conflicts' rather than 'Breaks', if user runs:
  apt-get install cloud-image-utils
then any package that depended on cloud-utils (specifically cloud-init) will be removed by apt.

This affects juju's use specifically as described in comment 1.

[Test Case]
Test case is not completely trivial, as you need a package installed that depends on cloud-utils without an '| cloud-image-utils'.

An older version of cloud-init would suffice, or using the cloud-tools archive with precise level packages as described in comment 1.

# with cloud-tools archive
 # launch fresh cloud image of trusty
 $ sudo apt-add-repository -y cloud-archive:tools
 $ sudo apt-get update -qy
 $ apt-get install --dry-run -q cloud-image-utils

# from precise trying to get newer cloud-tools
 # launch fresh cloud image of precise
 $ echo "deb http://archive.ubuntu.com/ubuntu/ trusty main" |
    sudo tee -a /etc/apt/sources.list
 $ sudo apt-get update -qy
 $ sudo apt-get install --dry-run -q cloud-image-utils

[Regression Potential]
This was a bug and this fix should only be positive. Possible regressions are in other bugs like this, where installation of one package conflicts or causes another to be uninstallable/not-upgradable.

Other packages that depend on cloud-utils per 'apt-cache-rdepends' are

  cloud-initramfs-growroot, bikeshed, lxc-templates, cloud-init, juju-local
  uvtool-libvirt

[End SRU Template]

=== Original Bug ==
As per https://bugs.launchpad.net/juju-core/+bug/1407699/comments/4, cloud-images-utils cannot be installed on precise. This is blocking the release of Juju 1.22, as that needs to have cloud-images-utils available, and tries to apt-get install it during cloud init, but the apt install doesn't go ahead due to the above problem.

As per the above comment:

<smoser> we can fix that with a packaging change to cloud-init in precise.
<smoser> to depend on cloud-image-utils | cloud-utils

Could we please get that packaging change done and the new cloud-init apckage propagated to the archives?

Scott Moser (smoser)
summary: - cannot install cloud-images-utils on precise
+ depends on cloud-utils without knowledge of cloud-image-utils
Changed in cloud-init:
status: New → Fix Released
Changed in cloud-init (Ubuntu):
status: New → Fix Released
Changed in cloud-init:
importance: Undecided → Medium
Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote : Re: depends on cloud-utils without knowledge of cloud-image-utils

This was found in bug 1407699.

 * on precise juju uses the cloud tools archive (https://wiki.ubuntu.com/ServerTeam/CloudToolsArchive)
 * precise's version of cloud-init depends on cloud-utils
 * Juju began installing cloud-image-utils.
 * cloud-image-utils conflicts with cloud-utils. cloud-image-utils was just a re-packaging for dependency shrink and so it conflicts with older versions of cloud-utils which would include the same set of files.

To reproduce, launch precise instance:
$ sudo apt-add-repository -y cloud-archive:tools
$ sudo apt-get update -qy
$ apt-get install --dry-run -q cloud-image-utils
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  distro-info distro-info-data genisoimage libaio1 libnspr4 libnss3 librados2
  librbd1 python-distro-info qemu-utils
Suggested packages:
  shunit2 wodim cdrkit-doc
The following packages will be REMOVED:
  cloud-init cloud-initramfs-growroot cloud-utils
The following NEW packages will be installed:
  cloud-image-utils distro-info distro-info-data genisoimage libaio1 libnspr4
  libnss3 librados2 librbd1 python-distro-info qemu-utils
0 upgraded, 11 newly installed, 3 to remove and 9 not upgraded.
Remv cloud-init [0.6.3-0ubuntu1.15]
Remv cloud-initramfs-growroot [0.4ubuntu1]
Remv cloud-utils [0.25-0ubuntu5.1]
Inst libaio1 (0.3.109-2ubuntu1 Ubuntu:12.04/precise [amd64])
Inst libnspr4 (4.10.7-0ubuntu0.12.04.1 Ubuntu:12.04/precise-updates [amd64])
Inst libnss3 (3.17.1-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
Inst distro-info-data (0.8ubuntu0.7 Ubuntu:12.04/precise-updates [all])
Inst distro-info (0.8.2 Ubuntu:12.04/precise [amd64])
Inst genisoimage (9:1.1.11-2ubuntu2 Ubuntu:12.04/precise [amd64])
Inst librados2 (0.41-1ubuntu2.1 Ubuntu:12.04/precise-updates [amd64])
Inst librbd1 (0.41-1ubuntu2.1 Ubuntu:12.04/precise-updates [amd64])
Inst python-distro-info (0.8.2 Ubuntu:12.04/precise [all])
Inst qemu-utils (1.0+noroms-0ubuntu14.21 Ubuntu:12.04/precise-updates [amd64])
Inst cloud-image-utils (0.27-0ubuntu9~ctools0 precise-updates [all])
Conf libaio1 (0.3.109-2ubuntu1 Ubuntu:12.04/precise [amd64])
Conf libnspr4 (4.10.7-0ubuntu0.12.04.1 Ubuntu:12.04/precise-updates [amd64])
Conf libnss3 (3.17.1-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
Conf distro-info-data (0.8ubuntu0.7 Ubuntu:12.04/precise-updates [all])
Conf distro-info (0.8.2 Ubuntu:12.04/precise [amd64])
Conf genisoimage (9:1.1.11-2ubuntu2 Ubuntu:12.04/precise [amd64])
Conf librados2 (0.41-1ubuntu2.1 Ubuntu:12.04/precise-updates [amd64])
Conf librbd1 (0.41-1ubuntu2.1 Ubuntu:12.04/precise-updates [amd64])
Conf python-distro-info (0.8.2 Ubuntu:12.04/precise [all])
Conf qemu-utils (1.0+noroms-0ubuntu14.21 Ubuntu:12.04/precise-updates [amd64])
Conf cloud-image-utils (0.27-0ubuntu9~ctools0 precise-updates [all])

Changed in cloud-initramfs-tools (Ubuntu):
status: New → Fix Released
Changed in cloud-initramfs-tools (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Medium
Changed in cloud-initramfs-tools (Ubuntu):
importance: Undecided → Medium
Scott Moser (smoser)
no longer affects: cloud-init (Ubuntu)
no longer affects: cloud-init
no longer affects: cloud-init (Ubuntu Precise)
no longer affects: cloud-initramfs-tools (Ubuntu)
no longer affects: cloud-initramfs-tools (Ubuntu Precise)
no longer affects: cloud-utils (Ubuntu Precise)
Changed in cloud-utils (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Scott Moser (smoser)
Changed in cloud-utils (Ubuntu Trusty):
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Medium
status: New → In Progress
Scott Moser (smoser)
summary: - depends on cloud-utils without knowledge of cloud-image-utils
+ cloud-image-utils should Break, not Conflict with cloud-utils
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-utils - 0.27-0ubuntu11

---------------
cloud-utils (0.27-0ubuntu11) vivid; urgency=medium

  * packages should Breaks/Replaces the pre-splitup version of cloud-utils
    rather than Conflicts/Replaces (LP: #1418568)
 -- Scott Moser <email address hidden> Thu, 05 Feb 2015 11:36:00 -0500

Changed in cloud-utils (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Please add the SRU header as mentioned on https://wiki.ubuntu.com/StableReleaseUpdates

Scott Moser (smoser)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ian, or anyone else affected,

Accepted cloud-utils into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-utils/0.27-0ubuntu9.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-utils (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ian Booth (wallyworld) wrote :

Hi Brian and Scott,

The issue itself only appears on precise. On trusty, apt-get install cloud-image-utils works fine. So would we not need to test with a fix to the debs in precise-proposed in order to validate that things will now work on precise?

Revision history for this message
Scott Moser (smoser) wrote :

I've tested with trusty's package that it doesn't regress any behavior on trusty:
$ echo "deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-get update -q
$ sudo apt-get install cloud-image-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  distro-info distro-info-data euca2ools genisoimage libaio1
  libboost-system1.54.0 libboost-thread1.54.0 libnspr4 libnss3 libnss3-nssdb
  librados2 librbd1 libxslt1.1 python-distro-info python-lxml
  python-requestbuilder python-setuptools qemu-utils sharutils
Suggested packages:
  shunit2 wodim cdrkit-doc python-lxml-dbg debootstrap bsd-mailx mailx
The following NEW packages will be installed:
  cloud-image-utils distro-info distro-info-data euca2ools genisoimage libaio1
  libboost-system1.54.0 libboost-thread1.54.0 libnspr4 libnss3 libnss3-nssdb
  librados2 librbd1 libxslt1.1 python-distro-info python-lxml
  python-requestbuilder python-setuptools qemu-utils sharutils
0 upgraded, 20 newly installed, 0 to remove and 18 not upgraded.
Need to get 5,473 kB of archives.

and on precise cloud instance using trusty-proposed (which is admittedly questionable but shows that trusty-proposed package doesn't force removal of cloud-init and such).

$ sudo apt-get install qemu-utils # which is needed to avoid other dependencies from trusty
$ echo "deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-get update -q
$ sudo apt-get install cloud-utils
$ sudo apt-get -qy install cloud-image-utils
sudo: unable to resolve host precise-20150206-162956
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  cloud-guest-utils cloud-utils distro-info distro-info-data gdisk genisoimage
  libicu48 python-distro-info
Suggested packages:
  shunit2 wodim cdrkit-doc
The following NEW packages will be installed:
  cloud-guest-utils cloud-image-utils distro-info distro-info-data gdisk
  genisoimage libicu48 python-distro-info
The following packages will be upgraded:
  cloud-utils

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

Ian, you're getting the package on precise from cloud-tools (https://wiki.ubuntu.com/ServerTeam/CloudToolsArchive).
cloud-tools tracks trusty level of certain packages on precise. So we have to SRU to trusty (which is safe) to update the cloud-tools repo.

I've just now added that package to cloud-tools-proposed.

Once it shows up there, we can test and move it from -proposed to -updates.
You can test it in -proposed by adding the cloud-tools-proposed instead of cloud
-tools-updates with:
  apt-add-repository cloud-archive:tools-proposed

Revision history for this message
Ian Booth (wallyworld) wrote :

I have run up a precise instance in EC2 and added the cloud-tools-proposed repo. The apt install of cloud-image-utils works as expected.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-utils - 0.27-0ubuntu9.1

---------------
cloud-utils (0.27-0ubuntu9.1) trusty-proposed; urgency=medium

  * packages should Breaks/Replaces the pre-splitup version of cloud-utils
    rather than Conflicts/Replaces (LP: #1418568)
 -- Scott Moser <email address hidden> Thu, 05 Feb 2015 11:44:29 -0500

Changed in cloud-utils (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for cloud-utils has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Scott Moser (smoser) wrote :

I just moved this from -proposed to -updates, so it should all "just work" for juju using cloud-tools archive.

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.