[Bug 1529079] Re: Can't start virtual machines with installed systemd-container package on Xenial

Bug Watch Updater 1529079 at bugs.launchpad.net
Thu Oct 26 17:16:21 UTC 2017


Launchpad has imported 9 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=1350909.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2016-06-28T17:22:55+00:00 Quentin wrote:

Description of problem:

libvirt's virSystemdCreateMachine (src/util/virsystemd.c) calls the
systemd API `CreateMachineWithNetwork` via D-Bus to register machines.
It works fine until systemd 225. However, with systemd 229, the `Before`
property that is passed isn't accepted anymore and thus, makes the
registration and creation of machines to fail.

Version-Release number of selected component (if applicable):

libvirt 1.2.17 (13.el7_2.5)
systemd 229 (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS -ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN)

Steps to Reproduce:

0. Get an Ubuntu Xenial VM
1. apt-get install qemu-kvm libvirt-bin
2. Follow instructions at https://wiki.ubuntu.com/SergeHallyn_libvirtnest , in particular:
     a. wget http://people.canonical.com/~serge/cdboot.xml
     b. wget -O mini.iso http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/mini.iso
     c. qemu-img create cdboot.img 1G
     d. virsh define cdboot.xml
     e. virsh start cdboot
3. now apt-get install systemd-container
4. now virsh destroy cdboot; virsh start cdboot; it should fail

(https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/39)

Actual results:

libvirtError: Cannot set property Before, or unknown property.

Expected results:

- The machine should be started properly:
     a. `Before` shouldn't be passed,
     b. `After` should probably not be passed either,
- A systemd registration failure should maybe not be critical.

Additional info:

Issue reproduced on Ubuntu Xenial & CoreOS >1010.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/48

------------------------------------------------------------------------
On 2016-06-28T18:07:23+00:00 Daniel wrote:

Passing Before & After properties is absolutely required in order to get
correct shutdown ordering - ie we need systemd to run libvirt-guests.

I've confirmed testing on Fedora 24 with systemd 229 and see no failure,
so I don't believe this is a libvirt bug. More likely it is a distro
specific systemd bug or deployment mistake (eg perhaps missing libvirt-
guests.service unit file).

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/51

------------------------------------------------------------------------
On 2016-06-28T19:10:02+00:00 Michael wrote:

I haven't been able to spot anything in either the CoreOS or Fedora
systemd patch sets that would impact this one way or the other so far,
will need to dig further.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/53

------------------------------------------------------------------------
On 2016-06-28T22:00:45+00:00 Michael wrote:

Ok, found some suspicious behavior in systemd. The distinction may be
whether or not the 'After' dependency refers to an existing unit or not.
On CoreOS it is entirely likely libvirtd.service doesn't exist or has a
different name. I'm not sure about the Ubuntu case. Also the order if
After/Before in the properties list is significant. Using Before/After
appears to work.

Both dependencies do not exist, but fails only when After is first:

    # busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 \
        org.freedesktop.systemd1.Manager StartTransientUnit 'ssa(sv)a(sa(sv))' \
        test7.slice replace 2 After as 1 other.target Before as 1 fake.target 0
    Cannot set property Before, or unknown property.

    # busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 \
        org.freedesktop.systemd1.Manager StartTransientUnit 'ssa(sv)a(sa(sv))' \
        test7.slice replace 2 Before as 1 fake.target After as 1 other.target 0
    o "/org/freedesktop/systemd1/job/23660"

Whether or not the Before dependency exists never matters.

Quentin: so at least this hints at a workaround, either create a dummy
libvirtd.service unit file or run the container with that unit name. Or
if the container doesn't make sense to run as libvirtd.service maybe a
unit alias is sufficient.

Alternate workaround: patch libvirt to swap the order of those two
properties.

Real fix: figure out what on earth is going on in systemd, but that's
all the brain power I can spend on this at the moment.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/54

------------------------------------------------------------------------
On 2016-06-29T10:24:38+00:00 Quentin wrote:

See https://www.redhat.com/archives/libvir-list/2016-June/msg02163.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/57

------------------------------------------------------------------------
On 2016-07-08T05:48:09+00:00 Quentin wrote:

See https://github.com/systemd/systemd/pull/3676

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/58

------------------------------------------------------------------------
On 2016-07-08T08:51:14+00:00 Daniel wrote:

Re-opening since F24 has the version of systemd with the flaw and so
could benefit from the patch

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/59

------------------------------------------------------------------------
On 2017-07-25T21:23:11+00:00 Fedora wrote:

This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/70

------------------------------------------------------------------------
On 2017-08-08T15:07:34+00:00 Fedora wrote:

Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/comments/71


** Changed in: systemd (Fedora)
       Status: Unknown => Won't Fix

** Changed in: systemd (Fedora)
   Importance: Unknown => High

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

Title:
  Can't start virtual machines with installed systemd-container package
  on Xenial

Status in libvirt package in Ubuntu:
  Invalid
Status in systemd package in Ubuntu:
  Fix Released
Status in libvirt source package in Xenial:
  Invalid
Status in systemd source package in Xenial:
  Fix Released
Status in systemd package in Fedora:
  Won't Fix

Bug description:
  Can't start virtual machines after upgrade to Xenial.

  On Ubuntu Server 16.04:
  # virsh start testserver
  Cannot set property Before, or unknown property.

  On Kubuntu 16.04:
  Cannot set property Before, or unknown property.
  Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
      callback(asyncjob, *args, **kwargs)
    File "/usr/share/virt-manager/virtManager/create.py", line 1873, in do_install
      guest.start_install(meter=meter)
    File "/usr/share/virt-manager/virtinst/guest.py", line 414, in start_install
      noboot)
    File "/usr/share/virt-manager/virtinst/guest.py", line 478, in _create_guest
      dom = self.conn.createLinux(start_xml or final_xml, 0)
    File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3585, in createLinux
      if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
  libvirtError: Cannot set property Before, or unknown property.

  At this moment there is no libvirt or systemd-related error messages in syslog when this error appear on the screen (or virsh output). Both systems was upgraded from 15.10.
  ---
  ApportVersion: 2.19.3-0ubuntu2
  Architecture: amd64
  DistroRelease: Ubuntu 16.04
  Package: libvirt (not installed)
  ProcCmdline: BOOT_IMAGE=/@/boot/vmlinuz-4.3.3-040303-generic root=UUID=a100d974-72cf-44ad-acf8-6ec060b773dd ro rootflags=subvol=@Xenial quiet nomdmonddf nomdmonisw
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=C
   SHELL=/bin/bash
  Tags:  xenial
  Uname: Linux 4.3.3-040303-generic x86_64
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

  _MarkForUpload: True
  modified.conffile..etc.libvirt.qemu.networks.default.xml: [modified]
  mtime.conffile..etc.libvirt.qemu.networks.default.xml: 2015-02-27T11:49:59.773560

  SRU INFORMATION
  ===============
  Fix: https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntu-xenial&id=5c4291769cb426a

  Regression potential: This changes a central place of systemd
  (although the fix is quite obvious), so if that code is broken it
  could potentially lead to boot failure. However, the fix has been
  tested in yakkety, and all the time in upstrean and downstream CI, so
  if this would actually break anything it should have surfaced by now.
  So low overall.

  Test case: Should be verified by the reporter as the bug description
  did not include a reproducer.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1529079/+subscriptions



More information about the foundations-bugs mailing list