Jim Fehlig | 27 May 21:46 2015

[libvirt] [PATCH V2] libxl: support domainReset

Currently, libxl does not provide a reset function, but domainReset
can be implemented in the libxl driver by forcibly destroying the
domain and starting it again.

Signed-off-by: Jim Fehlig <jfehlig <at> suse.com>
---

This is essentially a V2 of a patch submitted quite some time ago

https://www.redhat.com/archives/libvir-list/2014-August/msg00077.html

The idea of implmenting domainReset in the libxl driver by forcibly
destroying the domain and starting it again was ACK'ed in principle
by Ian Campbell

https://www.redhat.com/archives/libvir-list/2014-August/msg00109.html

I never pushed the patch since it was not ACK'ed by a libvirt
maintainer and stumbled across it while cleaning up some of my
old branches.  The only change here is rebase against current
libvirt.git master.

 src/libxl/libxl_driver.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 12be816..671d336 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
 <at>  <at>  -1237,6 +1237,64  <at>  <at>  libxlDomainReboot(virDomainPtr dom, unsigned int flags)
(Continue reading)

Shivaprasad G Bhat | 27 May 20:05 2015
Picon

[libvirt] [PATCH] check if console PTY is null before attempting to open

Console devices have their pty devices assigned when the qemu is actually
started. The libvirt spends considerable amount of time to start the qemu if
the guest has multiple passthrough devices. If time is spent during the
hostdev preparation, someone attempts to open the console, the libvirt
crashes in virChrdevLockFilePath().The patch attempts to fix the crash by
adding a check before attempting to open.

Signed-off-by: Shivaprasad G Bhat <sbhat <at> linux.vnet.ibm.com>
---
 src/qemu/qemu_driver.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1233d8f..fec928f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
 <at>  <at>  -16278,6 +16278,12  <at>  <at>  qemuDomainOpenConsole(virDomainPtr dom,
         goto cleanup;
     }

+    if (!(chr->source.data.file.path)) {
+        virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+                       _("PTY device is not yet assigned"));
+        goto cleanup;
+    }
+
     /* handle mutually exclusive access to console devices */
     ret = virChrdevOpen(priv->devs,
                         &chr->source,

(Continue reading)

Laine Stump | 27 May 20:03 2015

[libvirt] [PATCH] node_device: more informative error log when device isn't found

In a couple of cases, the node device driver (and the test node device
driver which likely copied it) was only logging "Node device not
found" when it couldn't find the requested device. This patch changes
those cases to log the name (and in the case when it's relevant, the
wwnn and wwpn) as well.
---
 src/node_device/node_device_driver.c | 14 ++++++++++----
 src/test/test_driver.c               |  8 ++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 34ba1fa..768db7f 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
 <at>  <at>  -248,7 +248,9  <at>  <at>  nodeDeviceLookupByName(virConnectPtr conn, const char *name)
     nodeDeviceUnlock();

     if (!obj) {
-        virReportError(VIR_ERR_NO_NODE_DEVICE, NULL);
+        virReportError(VIR_ERR_NO_NODE_DEVICE,
+                       _("no node device with matching name '%s'"),
+                       name);
         goto cleanup;
     }

 <at>  <at>  -597,8 +599,10  <at>  <at>  nodeDeviceCreateXML(virConnectPtr conn,
      * we're returning what we get... */

     if (dev == NULL)
-        virReportError(VIR_ERR_NO_NODE_DEVICE, NULL);
(Continue reading)

Laine Stump | 27 May 20:02 2015

[libvirt] [PATCH] debug: assure NULLSTR() around all %s args in debug at top of public APIs

There are also a couple that were very uninformatively just logging
the value of the pointer rather than the string itself:

* the "name" arg to virNodeDeviceLookupByName()
* wwnn and wwpn args to virNodeDeviceLookupSCSIHostByWWN()

All char*'s that make sense should now have their contents logged
rather than the pointer, and all %s args should now be inside
NULLSTR().
---
 src/libvirt-domain.c    | 36 ++++++++++++++++++------------------
 src/libvirt-host.c      |  6 +++---
 src/libvirt-interface.c |  6 +++---
 src/libvirt-network.c   |  6 +++---
 src/libvirt-nodedev.c   | 10 +++++-----
 src/libvirt-nwfilter.c  |  6 +++---
 src/libvirt-secret.c    |  4 ++--
 src/libvirt-storage.c   | 16 ++++++++--------
 8 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 2edba1a..5907f58 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
 <at>  <at>  -167,7 +167,7  <at>  <at>  virDomainPtr
 virDomainCreateXML(virConnectPtr conn, const char *xmlDesc,
                    unsigned int flags)
 {
-    VIR_DEBUG("conn=%p, xmlDesc=%s, flags=%x", conn, xmlDesc, flags);
+    VIR_DEBUG("conn=%p, xmlDesc=%s, flags=%x", conn, NULLSTR(xmlDesc), flags);
(Continue reading)

Lubomir Rintel | 27 May 19:30 2015
Picon
Picon

[libvirt] [PATCH libvirt] interface: don't error out if a bond has no interfaces

It's not a problem at all and causes virt-manager to break down.

Note: netcf 0.2.8 generates invalid XML for a bond with no interfaces anyway,
so this error is in fact not reached as we fail earlier. Fix submitted upstream.

Signed-off-by: Lubomir Rintel <lkundrak <at> v3.sk>
---
 src/conf/interface_conf.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index c2eb945..29769ac 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
 <at>  <at>  -553,19 +553,15  <at>  <at>  virInterfaceDefParseBondItfs(virInterfaceDefPtr def,
     nbItf = virXPathNodeSet("./interface", ctxt, &interfaces);
     if (nbItf < 0) {
         ret = -1;
-        goto error;
+        goto cleanup;
     }

-    if (nbItf == 0) {
-        virReportError(VIR_ERR_XML_ERROR,
-                       "%s", _("bond has no interfaces"));
-        ret = -1;
-        goto error;
-    }
+    if (nbItf == 0)
+        goto cleanup;
(Continue reading)

Ján Tomko | 27 May 17:08 2015
Picon

[libvirt] [PATCH 0/3] volume resize fixes

First two patches fix bugs and are applicable for the freeze.

Ján Tomko (3):
  Simplify allocation check in storageVolResize
  Fix shrinking volumes with the delta flag
  virsh: make negative values with vol-resize more convenient

 src/storage/storage_driver.c | 26 +++++++++-----------------
 tools/virsh-volume.c         | 15 ++++++++-------
 2 files changed, 17 insertions(+), 24 deletions(-)

--

-- 
2.3.6

--
libvir-list mailing list
libvir-list <at> redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Eric Blake | 27 May 16:43 2015
Picon

[libvirt] [PATCH] maint: document use of zanata for translations

Based on recent list questions on how to contribute a translation fix.

Signed-off-by: Eric Blake <eblake <at> redhat.com>
---

Should be safe for freeze, but as I have never contributed a
translation fix, I'll wait for review.

 HACKING              | 19 ++++++++++++-------
 docs/hacking.html.in |  7 +++++++
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/HACKING b/HACKING
index fbe838b..e308568 100644
--- a/HACKING
+++ b/HACKING
 <at>  <at>  -18,7 +18,12  <at>  <at>  listen to feedback.
 and is browsable along with other libvirt-related repositories (e.g.
 libvirt-python) online <http://libvirt.org/git/>.

-(3) Post patches in unified diff format, with git rename detection enabled. You
+(3) Patches to translations are maintained via the zanata project
+<https://fedora.zanata.org/>. If you want to fix a translation in a .po file,
+join the appropriate language team. The libvirt release process automatically
+pulls the latest version of each translation file from zanata.
+
+(4) Post patches in unified diff format, with git rename detection enabled. You
 need a one-time setup of:

   git config diff.renames true
(Continue reading)

Luyao Huang | 27 May 11:50 2015
Picon

[libvirt] [PATCHv2] qemu: add a check for slot and base when build dimm address

When hot-plug a memory device, we don't check if there
is a memory device have the same address with the memory device
we want hot-pluged. Qemu forbid use/hot-plug 2 memory device
with same slot or the same base(qemu side this elemnt named addr).

Introduce a address check when build memory device qemu command line.

Signed-off-by: Luyao Huang <lhuang <at> redhat.com>
---
v2:
 move the check to qemuBuildMemoryDeviceStr() to check the dimm address
 when start/hot-plug a memory device.

 src/qemu/qemu_command.c | 77 ++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 57 insertions(+), 20 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d8ce511..0380a3b 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
 <at>  <at>  -4955,6 +4955,61  <at>  <at>  qemuBuildMemoryDimmBackendStr(virDomainMemoryDefPtr mem,
 }

 
+static int
+qemuBuildMemoryDeviceAddr(virBuffer *buf,
+                          virDomainDefPtr def,
+                          virDomainMemoryDefPtr mem)
+{
+    ssize_t i;
(Continue reading)

Cédric Bosdonnat | 27 May 10:56 2015

[libvirt] [PATCH] lxc: properly clean up qemu-nbd

Add the qemu-nbd tasks to the container cgroup to make sure those will
be killed when the container is stopped. In order to reliably get the
qemu-nbd tasks PIDs, we use /sys/devices/virtual/block/≤DEV>/pid as
qemu-nbd is daemonizing itself.
---
 src/libvirt_private.syms |  1 +
 src/lxc/lxc_controller.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/util/virprocess.c    | 45 ++++++++++++++++++++++++++++++++++++++
 src/util/virprocess.h    |  2 ++
 4 files changed, 104 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 8c50ea2..409bb4f 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
 <at>  <at>  -1973,6 +1973,7  <at>  <at>  virProcessAbort;
 virProcessExitWithStatus;
 virProcessGetAffinity;
 virProcessGetNamespaces;
+virProcessGetPids;
 virProcessGetStartTime;
 virProcessKill;
 virProcessKillPainfully;
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index e144c2d..14d873e 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
 <at>  <at>  -107,6 +107,9  <at>  <at>  struct _virLXCController {

     pid_t initpid;
(Continue reading)

Martin Kletzander | 27 May 10:10 2015
Picon

[libvirt] [PATCH] storage_fs: Create directory with UID if needed

The code already exists there, it just modified different flags.  I just
noticed this when looking at the code.  This patch is better to view
with bigger context or '-W'.

Signed-off-by: Martin Kletzander <mkletzan <at> redhat.com>
---
 src/storage/storage_backend_fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index bcbbb3ae252a..5dc712925b27 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
 <at>  <at>  -1,7 +1,7  <at>  <at> 
 /*
  * storage_backend_fs.c: storage backend for FS and directory handling
  *
- * Copyright (C) 2007-2014 Red Hat, Inc.
+ * Copyright (C) 2007-2015 Red Hat, Inc.
  * Copyright (C) 2007-2008 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
 <at>  <at>  -807,7 +807,7  <at>  <at>  virStorageBackendFileSystemBuild(virConnectPtr conn ATTRIBUTE_UNUSED,
         (needs_create_as_uid || !virFileExists(pool->def->target.path)))
         mode = VIR_STORAGE_DEFAULT_POOL_PERM_MODE;
     if (needs_create_as_uid)
-        flags |= VIR_DIR_CREATE_AS_UID;
+        dir_create_flags |= VIR_DIR_CREATE_AS_UID;

     /* Now create the final dir in the path with the uid/gid/mode
(Continue reading)

Daniel Veillard | 27 May 08:50 2015
Picon

[libvirt] Entering freeze for libvirt 1.2.16

  I'm one day late but I have tagged the release candidate 1
in git and pushed signed tarballs and rpms to the usual place:

  ftp://libvirt.org/libvirt/

 we have a bit less than 160 commits so far since 1.2.15.
I tried it with my usual limited testing and it looks fine,
https://ci.centos.org/ seems fine when it comes to libvirt,
but please give it a try so we can get potential bugs or
portability issues out.

 I will probably make an rc2 on Friday and push the final
release next Monday or Tuesday,

  thanks !

Daniel

--

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard <at> redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


Gmane