LXD module installs the wrong ZFS package if it's missing

Bug #1799779 reported by Michael Skalka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned
Bionic
Fix Committed
Medium
Unassigned
Cosmic
Fix Committed
Medium
Unassigned
Disco
Fix Released
Medium
Unassigned

Bug Description

When using the LXD module cloud-init will attempt to install ZFS if it does not exist on the target system. However instead of installing the `zfsutils-linux` package it attempts to install `zfs` resulting in an error.

This was captured from a MAAS deployed server however the bug is platform agnostic.

###
ubuntu@node10ob68:~$ cloud-init --version
/usr/bin/cloud-init 18.3-9-g2e62cb8a-0ubuntu1~18.04.2

###
less /var/log/cloud-init.log
...
2018-10-24 19:23:54,255 - util.py[DEBUG]: apt-install [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install zfs] took 0.302 seconds
2018-10-24 19:23:54,255 - cc_lxd.py[WARNING]: failed to install packages ['zfs']: Unexpected error while running command.
Command: ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'install', 'zfs']
Exit code: 100
...

Related branches

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

marking this as 'fix-released' on xenial, it is not a problem there as there is a 'zfs' (virtual) package

Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Xenial):
importance: Undecided → Medium
status: New → Fix Released
Changed in cloud-init (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → Medium
Johnson Shi (johnsonshi)
Changed in cloud-init:
assignee: nobody → Johnson Shi (johnsonshi)
status: Confirmed → In Progress
Johnson Shi (johnsonshi)
Changed in cloud-init (Ubuntu Bionic):
assignee: nobody → Johnson Shi (johnsonshi)
Revision history for this message
Ryan Harper (raharper) wrote :
Download full text (4.6 KiB)

Looking closer at Ubuntu releases:

------
Xenial
------

'zfs' meta package is present, and wants to install:

Note, selecting 'zfsutils-linux' instead of 'zfs'
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  binutils cpp cpp-5 dkms fakeroot gcc gcc-5 libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libfakeroot libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0
  libmpc3 libmpx0 libnvpair1linux libquadmath0 libtsan0 libubsan0 libuutil1linux libzfs2linux libzpool2linux linux-libc-dev make manpages-dev spl spl-dkms zfs-dkms zfs-doc
  zfs-zed
Suggested packages:
  binutils-doc cpp-doc gcc-5-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-5-multilib gcc-5-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
  libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg glibc-doc make-doc default-mta | mail-transport-agent
  samba-common-bin nfs-kernel-server zfs-initramfs
The following NEW packages will be installed:
  binutils cpp cpp-5 dkms fakeroot gcc gcc-5 libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libfakeroot libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0
  libmpc3 libmpx0 libnvpair1linux libquadmath0 libtsan0 libubsan0 libuutil1linux libzfs2linux libzpool2linux linux-libc-dev make manpages-dev spl spl-dkms zfs-dkms zfs-doc
  zfs-zed zfsutils-linux

------
bionic
------

No 'zfs' meta package present, 'zfsutils-linux' offers to install

The following additional packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed
Suggested packages:
  zfs-modules | zfs-dkms nfs-kernel-server samba-common-bin zfs-initramfs | zfs-dracut
The following NEW packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed zfsutils-linux

------
cosmic
------

No 'zfs' meta package present, but has a reference to it in the archive.

$ sudo apt install zfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package zfs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'zfs' has no installation candidate

'zfsutils-linux' offers:

$ sudo apt install zfsutils-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common libnvpair1linux libuutil1linux libzfs2linux libzpool2linux linux-image-unsigned-4.18.0-13-lowlatency
  linux-modules-4.18.0-13-lowlatency os-prober zfs-zed
Suggested packages:
  multiboot-doc grub-emu xorriso desktop-base fdutils linux-doc-4.18.0 | linux-source-4.18.0 linux-tools linux-headers-4.18.0-13-lowlatency nfs-kernel-server
  samba-common-bin zfs-initramfs | zfs-dracut
The following NEW packages will be installed:
  grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common libnvpair1linux libuutil...

Read more...

Revision history for this message
Johnson Shi (johnsonshi) wrote :

Fix is awaiting approval in my branch.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit c283321b to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=c283321b

Changed in cloud-init:
status: In Progress → Fix Committed
Johnson Shi (johnsonshi)
Changed in cloud-init (Ubuntu Bionic):
status: Confirmed → Fix Committed
Johnson Shi (johnsonshi)
Changed in cloud-init (Ubuntu Cosmic):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 18.5-17-gd1a2fe73-0ubuntu1

---------------
cloud-init (18.5-17-gd1a2fe73-0ubuntu1) disco; urgency=medium

  * New upstream snapshot.
    - opennebula: exclude EPOCHREALTIME as known bash env variable with a
      delta (LP: #1813383)
    - tox: fix disco httpretty dependencies for py37 (LP: #1813361)
    - run-container: uncomment baseurl in yum.repos.d/*.repo when using a
      proxy [Paride Legovini]
    - lxd: install zfs-linux instead of zfs meta package
      [Johnson Shi] (LP: #1799779)
    - net/sysconfig: do not write a resolv.conf file with only the header.
      [Robert Schweikert]
    - net: Make sysconfig renderer compatible with Network Manager.
      [Eduardo Otubo]
    - cc_set_passwords: Fix regex when parsing hashed passwords
      [Marlin Cremers] (LP: #1811446)
    - net: Wait for dhclient to daemonize before reading lease file
      [Jason Zions] (LP: #1794399)
    - [Azure] Increase retries when talking to Wireserver during metadata walk
      [Jason Zions]
    - Add documentation on adding a datasource.
    - doc: clean up some datasource documentation.
    - ds-identify: fix wrong variable name in ovf_vmware_transport_guestinfo.
    - Scaleway: Support ssh keys provided inside an instance tag. [PORTE Loïc]
    - OVF: simplify expected return values of transport functions.
    - Vmware: Add support for the com.vmware.guestInfo OVF transport.
      (LP: #1807466)
    - HACKING.rst: change contact info to Josh Powers

 -- Chad Smith <email address hidden> Sat, 26 Jan 2019 08:27:35 -0700

Changed in cloud-init (Ubuntu Disco):
status: Confirmed → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 19.1.

This bug is believed to be fixed in cloud-init in version 19.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: Fix Committed → Fix Released
Johnson Shi (johnsonshi)
Changed in cloud-init (Ubuntu Bionic):
assignee: Johnson Shi (johnsonshi) → nobody
Changed in cloud-init:
assignee: Johnson Shi (johnsonshi) → nobody
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.