Maxim Perevedentsev | 31 Jul 18:35 2015

[libvirt] [PATCH 0/2] Added waiting for DAD to finish for bridge address.

This is a fix for commit db488c79173b240459c7754f38c3c6af9b432970
dnsmasq main process which is relied on when waiting for DAD to complete
exits without actually waiting for DAD. This is dnsmasq daemon's task.

It seems to be a race that DAD finished before dnsmasq main process exited.
The above commit needs the execution to block until DAD finishes
for bridge IPv6 address because then it closes dummy tap device.
Thus we need to ensure this ourselves.

So we periodically poll the kernel using netlink and
check whether there are any IPv6 addresses assigned to bridge
which have 'tentative' state. After DAD is finished, execution continues.
I guess that is what dnsmasq was assumed to do.

We use netlink to dump information about existing IPv6 addresses. Netlink's
response is a multi-part message. Unfortunately, the current implementation
of virNetlink treats such messages as faulty and throws an error. So the patch 2/2
adds multi-part nelink response support.

Maxim Perevedentsev (2):
  network: added waiting for DAD to finish for bridge address.
  netlink: add support for multi-part netlink messages.

 src/network/bridge_driver.c | 109 +++++++++++++++++++++++++++++++++++++++++++-
 src/util/virnetlink.c       |   4 +-
 2 files changed, 111 insertions(+), 2 deletions(-)

--
Sincerely,
Maxim Perevedentsev
(Continue reading)

Maxim Perevedentsev | 31 Jul 18:29 2015

[libvirt] [PATCH 0/2] Added waiting for DAD to finish for bridge address.

This is a fix for commit db488c79173b240459c7754f38c3c6af9b432970
dnsmasq main process which is relied on when waiting for DAD to complete
exits without actually waiting for DAD. This is dnsmasq daemon's task.

It seems to be a race that DAD finished before dnsmasq main process exited.
The above commit needs the execution to block until DAD finishes
for bridge IPv6 address because then it closes dummy tap device.
Thus we need to ensure this ourselves.

So we periodically poll the kernel using netlink and
check whether there are any IPv6 addresses assigned to bridge
which have 'tentative' state. After DAD is finished, execution continues.
I guess that is what dnsmasq was assumed to do.

We use netlink to dump information about existing IPv6 addresses. Netlink's
response is a multi-part message. Unfortunately, the current implementation
of virNetlink treats such messages as faulty and throws an error. So the patch 2/2
adds multi-part nelink response support.

Maxim Perevedentsev (2):
  network: added waiting for DAD to finish for bridge address.
  netlink: add support for multi-part netlink messages.

 src/network/bridge_driver.c | 109 +++++++++++++++++++++++++++++++++++++++++++-
 src/util/virnetlink.c       |   4 +-
 2 files changed, 111 insertions(+), 2 deletions(-)

--
Sincerely,
Maxim Perevedentsev
(Continue reading)

Peter Krempa | 31 Jul 16:49 2015
Picon

[libvirt] [PATCH 0/2] qemu: Improve memory alignment handling and fix upcoming powerpc

Peter Krempa (2):
  qemu: Make memory alignment helper more universal
  qemu: ppc64: Align memory sizes to 256MiB

 src/qemu/qemu_domain.c                             | 33 ++++++++++++++++------
 src/qemu/qemu_domain.h                             |  3 +-
 src/qemu/qemu_hotplug.c                            |  4 +--
 .../qemuxml2argv-pseries-cpu-compat.args           |  2 +-
 4 files changed, 30 insertions(+), 12 deletions(-)

--

-- 
2.4.5

Ben Gray | 31 Jul 16:10 2015
Picon

[libvirt] Replace AF_LOCAL with AF_PACKET

Hi,

     I've a question on whether it's 'safe' to change the socket type 
used in virNetxxx calls from AF_PACKET to AF_LOCAL ?

     The reason I ask is that we're using libvirt-lxc with a couple of 
bridge interfaces, and we've found that the socket close call on 
AF_PACKET type sockets takes between 40ms and 60ms. For our container 
config there is roughly 12 close calls on AF_PACKET sockets, delaying 
the start-up of the LXC container by around 450ms.

     So a simple fix to speed up our container start-up is to just 
switch from AF_PACKET to AF_LOCAL sockets.  Hence my question on whether 
we can safely do this, or is there some reason why AF_PACKET was chosen ?

Thanks in advance,
Ben.

FWIW - I believe that AF_PACKET sockets take so long to close is because 
the kernel packet driver calls synchronize_net() when closing.

Jiri Denemark | 31 Jul 14:58 2015
Picon

[libvirt] [PATCH v2] qemu: Do not reset labels when migration fails

When stopping a domain on the destination host after a failed migration,
we need to avoid reseting security labels since the domain is still
running on the source host. While we were correctly doing so in some
cases, there were still some paths which did this wrong.

https://bugzilla.redhat.com/show_bug.cgi?id=1242904

Signed-off-by: Jiri Denemark <jdenemar <at> redhat.com>
---

Notes:
    Version 2:
    - fix qemuProcessStop call in qemuProcessReconnect

 src/qemu/qemu_driver.c    |  5 ++++-
 src/qemu/qemu_migration.c |  3 ++-
 src/qemu/qemu_process.c   | 19 ++++++++++++++-----
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5b22639..b9278f8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
 <at>  <at>  -2187,6 +2187,7  <at>  <at>  qemuDomainDestroyFlags(virDomainPtr dom,
     int ret = -1;
     virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
+    unsigned int stopFlags = 0;

     virCheckFlags(VIR_DOMAIN_DESTROY_GRACEFUL, -1);
(Continue reading)

Jiri Denemark | 31 Jul 13:57 2015
Picon

[libvirt] [PATCH] qemu: Do not reset labels when migration fails

When stopping a domain on the destination host after a failed migration,
we need to avoid reseting security labels since the domain is still
running on the source host. While we were correctly doing so in some
cases, there were still some paths which did this wrong.

https://bugzilla.redhat.com/show_bug.cgi?id=1242904

Signed-off-by: Jiri Denemark <jdenemar <at> redhat.com>
---
 src/qemu/qemu_driver.c    |  5 ++++-
 src/qemu/qemu_migration.c |  3 ++-
 src/qemu/qemu_process.c   | 14 ++++++++++----
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5b22639..b9278f8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
 <at>  <at>  -2187,6 +2187,7  <at>  <at>  qemuDomainDestroyFlags(virDomainPtr dom,
     int ret = -1;
     virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
+    unsigned int stopFlags = 0;

     virCheckFlags(VIR_DOMAIN_DESTROY_GRACEFUL, -1);

 <at>  <at>  -2200,6 +2201,8  <at>  <at>  qemuDomainDestroyFlags(virDomainPtr dom,

     qemuDomainSetFakeReboot(driver, vm, false);

(Continue reading)

Luyao Huang | 31 Jul 04:19 2015
Picon

[libvirt] [python PATCH] examples: small fix for nodestats.py example

Add nodestats.py in MANIFEST.in and add a
small description for nodestats.py in README

Signed-off-by: Luyao Huang <lhuang <at> redhat.com>
---
 MANIFEST.in     | 1 +
 examples/README | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/MANIFEST.in b/MANIFEST.in
index b5ba783..0d66f9c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
 <at>  <at>  -13,6 +13,7  <at>  <at>  include examples/esxlist.py
 include examples/event-test.py
 include examples/guest-vcpus/guest-vcpu-daemon.py
 include examples/guest-vcpus/guest-vcpu.py
+include examples/nodestats.py
 include examples/topology.py
 include generator.py
 include libvirt-lxc-override-api.xml
diff --git a/examples/README b/examples/README
index 0cb4513..13211b6 100644
--- a/examples/README
+++ b/examples/README
 <at>  <at>  -14,6 +14,9  <at>  <at>  dhcpleases.py - list dhcp leases for a given virtual network
 domipaddrs.py - list IP addresses for guest domains
 guest-vcpus - two helpers to make the guest agent event useful with agent based
               vCPU state modification
+nodestats.py - print total memory and free memory for each host NUMA node and
(Continue reading)

Jiri Denemark | 30 Jul 17:00 2015
Picon

[libvirt] [PATCH] qemu: Properly check for incoming migration job

In addition to checking the current asynchronous job
qemuMigrationJobIsActive reports an error if the current job does not
match the one we asked for. Let's just check the job directly since we
are not interested in the error in qemuProcessHandleMonitorEOF.

Signed-off-by: Jiri Denemark <jdenemar <at> redhat.com>
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1c0c734..23baa82 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
 <at>  <at>  -310,7 +310,7  <at>  <at>  qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
         auditReason = "failed";
     }

-    if (qemuMigrationJobIsActive(vm, QEMU_ASYNC_JOB_MIGRATION_IN))
+    if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN)
         qemuMigrationErrorSave(driver, vm->def->name,
                                qemuMonitorLastError(priv->mon));

--

-- 
2.5.0

Peter Krempa | 30 Jul 16:47 2015
Picon

[libvirt] [PATCH] qemu: Reject migration with memory-hotplug if destination doesn't support it

If destination libvirt doesn't support memory hotplug since all the
support was introduced by adding new elements the destination would
attempt to start qemu with an invalid configuration. The worse part is
that qemu might hang in such situation.

Fix this by sending a required migration feature called 'memory-hotplug'
to the destination. If the destination doesn't recognize it it will fail
the migration.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1248350
---
 src/qemu/qemu_migration.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index f5866c4..824126f 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
 <at>  <at>  -86,6 +86,7  <at>  <at>  enum qemuMigrationCookieFlags {
     QEMU_MIGRATION_COOKIE_FLAG_NETWORK,
     QEMU_MIGRATION_COOKIE_FLAG_NBD,
     QEMU_MIGRATION_COOKIE_FLAG_STATS,
+    QEMU_MIGRATION_COOKIE_FLAG_MEMORY_HOTPLUG,

     QEMU_MIGRATION_COOKIE_FLAG_LAST
 };
 <at>  <at>  -98,7 +99,8  <at>  <at>  VIR_ENUM_IMPL(qemuMigrationCookieFlag,
               "persistent",
               "network",
               "nbd",
(Continue reading)

Kothapally Madhu Pavan | 30 Jul 13:54 2015
Picon

[libvirt] [PATCH v2 0/3] Disable floppy disk for PowerPC VMs

This is an attempt to fix:
Libvirt BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1180486

Libvirt currently assumes ISA_based floppy disks to be available across all
architectures and machine types. However, PowerPC Book 3S compatible ('ie pseries)
virtual machines do not support Floppy disks.

This patch series prevents libvirt from launching ppc64[le] -based 'pseries'
VMs with floppy devices.

This version of patch attempts to fulfill the coments of Andrea Bolognani
and Jan Tomko on previous version of patch.
---

Kothapally Madhu Pavan (3):
      Caps: Disable floppy disk for PowerPC VM
      Avoid starting a PowerPC VM with floppy disk
      test: Introduce test case to disallow floppy disk on pseries

 src/qemu/qemu_capabilities.c                       |   15 +++++--
 src/qemu/qemu_command.c                            |    8 ++++
 .../qemuxml2argv-disk-floppy-pseries.args          |    6 +++
 .../qemuxml2argv-disk-floppy-pseries.xml           |   41 ++++++++++++++++++++
 tests/qemuxml2argvtest.c                           |    1 
 5 files changed, 67 insertions(+), 4 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.xml

--
Kothapally Madhu Pavan
(Continue reading)

Andrea Bolognani | 30 Jul 11:37 2015
Picon

[libvirt] [PATCH v11 0/5] nodeinfo: Add support for subcores

Only patch 1/5 has been updated, all the other patches
are the same as v8:

  2/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01045.html
  3/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01048.html
  4/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01049.html
  5/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01050.html

I'm including the full history below.

Cheers.

Changes in v11:

  * don't declare variables only used inside a code block
    guarded by #ifdef outside of said code block

  * use virBitmapNextSetBit() instead of going through
    all possible index values and calling
    virBitmapIsBitSet() for each one

Changes in v10:

  * don't attempt to close a file that wasn't opened

  * report a detailed error to help with diagnosis

Changes in v9:

  * take into account the fact that kvm might not be loaded
(Continue reading)


Gmane