Bug#849316: machinctl: fails to list anything if a libvirt qemu container is running
On 29 December 2016 at 14:54, Felipe Satelerwrote: > On 26 December 2016 at 06:18, Michael Biebl wrote: >> >> Am 25.12.2016 um 22:32 schrieb Felipe Sateler: >> > PR 4978 was closed in favor of 4972. However, it has not been merged >> > yet. The patch is small so at least I don't have a problem with >> > backporting. However, we prefer patches to be merged upstream, so >> > we'll wait until the PR is merged. Feel free to ping again if the PR >> > is merged and there has been no activity. >> >> Nod, I have no objection pulling that patch once merged. > > So, PR 4972 was merged. This can be thus backported (I've not done so > yet because I'm not at my debian laptop). I think a related PR is > 4979, it might be a good idea to backport that one as well too. > > https://github.com/systemd/systemd/pull/4979 The patch in 4972 does not apply cleanly, because it depends on another pr[1] that introduces new dbus calls. I'm not sure I want to backport that as well, so I adpated the patch. Guido, would you like to try the attached patch to see if the backport fixes the problem for you? [1] https://github.com/systemd/systemd/pull/4795 -- Saludos, Felipe Sateler diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 7b9be3b42..e929570f8 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -242,23 +242,19 @@ static int list_machines(int argc, char *argv[], void *userdata) { if (name[0] == '.' && !arg_all) continue; -if (!GREEDY_REALLOC(machines, n_allocated, n_machines + 1)) { +if (!GREEDY_REALLOC0(machines, n_allocated, n_machines + 1)) { r = log_oom(); goto out; } -machines[n_machines].os = NULL; -machines[n_machines].version_id = NULL; +machines[n_machines].name = name; +machines[n_machines].class = class; +machines[n_machines].service = service; + r = get_os_release_property(bus, name, "ID\0" "VERSION_ID\0", [n_machines].os, [n_machines].version_id); -if (r < 0) -goto out; - -machines[n_machines].name = name; -machines[n_machines].class = class; -machines[n_machines].service = service; l = strlen(name); if (l > max_name)
Bug#849316: machinctl: fails to list anything if a libvirt qemu container is running
On 26 December 2016 at 06:18, Michael Bieblwrote: > > Am 25.12.2016 um 22:32 schrieb Felipe Sateler: > > PR 4978 was closed in favor of 4972. However, it has not been merged > > yet. The patch is small so at least I don't have a problem with > > backporting. However, we prefer patches to be merged upstream, so > > we'll wait until the PR is merged. Feel free to ping again if the PR > > is merged and there has been no activity. > > Nod, I have no objection pulling that patch once merged. So, PR 4972 was merged. This can be thus backported (I've not done so yet because I'm not at my debian laptop). I think a related PR is 4979, it might be a good idea to backport that one as well too. https://github.com/systemd/systemd/pull/4979 -- Saludos, Felipe Sateler
Bug#849316: machinctl: fails to list anything if a libvirt qemu container is running
Am 25.12.2016 um 22:32 schrieb Felipe Sateler: > PR 4978 was closed in favor of 4972. However, it has not been merged > yet. The patch is small so at least I don't have a problem with > backporting. However, we prefer patches to be merged upstream, so > we'll wait until the PR is merged. Feel free to ping again if the PR > is merged and there has been no activity. Nod, I have no objection pulling that patch once merged. Regards, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#849316: machinctl: fails to list anything if a libvirt qemu container is running
Control: forwarded -1 https://github.com/systemd/systemd/pull/4972 On 25 December 2016 at 06:52, Guido Güntherwrote: > Package: systemd > Version: 232-8 > Severity: normal > Tags: patch > > Hi, > machinectl currently silently aborts if libvirt managed QEMU VMs are > running and does not list anything. This is fixed in > > https://github.com/systemd/systemd/pull/4972 > or > https://github.com/systemd/systemd/pull/4978 > > Would be great to ohave this in stretch since it breaks machinectl > completely for some use cases. > PR 4978 was closed in favor of 4972. However, it has not been merged yet. The patch is small so at least I don't have a problem with backporting. However, we prefer patches to be merged upstream, so we'll wait until the PR is merged. Feel free to ping again if the PR is merged and there has been no activity. -- Saludos, Felipe Sateler
Bug#849316: machinctl: fails to list anything if a libvirt qemu container is running
Package: systemd Version: 232-8 Severity: normal Tags: patch Hi, machinectl currently silently aborts if libvirt managed QEMU VMs are running and does not list anything. This is fixed in https://github.com/systemd/systemd/pull/4972 or https://github.com/systemd/systemd/pull/4978 Would be great to ohave this in stretch since it breaks machinectl completely for some use cases. Cheers, -- Guido -- Package-specific info: -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-rc8-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages systemd depends on: ii adduser 3.115 ii libacl1 2.2.52-3 ii libapparmor12.10.95-7 ii libaudit1 1:2.6.7-1 ii libblkid1 2.29-1 ii libc6 2.24-8 ii libcap2 1:2.25-1 ii libcryptsetup4 2:1.7.3-3 ii libgcrypt20 1.7.3-2 ii libgpg-error0 1.25-2 ii libidn111.33-1 ii libip4tc0 1.6.0-4 ii libkmod223-1 ii liblz4-10.0~r131-2 ii liblzma55.2.2-1.2 ii libmount1 2.29-1 ii libpam0g1.1.8-3.3 ii libseccomp2 2.3.1-2.1 ii libselinux1 2.6-3 ii libsystemd0 232-8 ii mount 2.29-1 ii util-linux 2.29-1 Versions of packages systemd recommends: ii dbus1.10.14-1 ii libpam-systemd 232-8 Versions of packages systemd suggests: ii policykit-10.105-17 ii systemd-container 232-8 pn systemd-ui Versions of packages systemd is related to: pn dracut ii initramfs-tools 0.125 ii udev 232-7 -- Configuration Files: /etc/systemd/system.conf changed [not included] -- no debconf information