John Ferlan | 12 Feb 18:12 2016
Picon

[libvirt] [PATCH v3 0/3] Add capability for text based polkit authentication for virsh

v2: http://www.redhat.com/archives/libvir-list/2016-February/msg00618.html

Adjustments since v2:

 Patch 1 - Change not only the message (as requested), but also use a
           different and new error code (VIR_ERR_AUTH_UNAVAILABLE).

 Patch 2 - Added a check for "if (!isatty(STDIN_FILENO))" 
           Used a new parameter for pkttyagent call - "--notify-fd", which
             is documented as "To get notified when the authentication agent
             has been registered either listen to the Changed D-Bus signal
             or use --notify-fd to pass the number of a file descriptor that
             has been passed to the program. This file descriptor will then
             be closed when the authentication agent has been successfully
             registered.  Followed the systemd mechanism. If it's felt that
             a timeout of -1 is too dangerous, I'd be fine with changing it.

 Patch 3 - Since we now can determine our failure based on err->code, use
             the new VIR_ERR_AUTH_UNAVAILABLE to attempt the AgentCreate.
             Also, since virPolkitAgentCreate now will wait for the agent
             to start before returning, the agentstart counter is removed.

John Ferlan (3):
  polkit: Adjust message when authentication agent isn't found
  util: Introduce API's for Polkit text authentication
  virsh: Add support for text based polkit authentication

 include/libvirt/virterror.h |  3 +-
 src/libvirt_private.syms    |  2 ++
 src/util/virerror.c         |  8 ++++-
(Continue reading)

Ján Tomko | 12 Feb 14:59 2016
Picon

[libvirt] [PATCH 0/2] Introduce safewrite_str

Ján Tomko (2):
  vsh: use virBufferTrim in vshOutputLogFile
  Introduce safewrite_str

 src/conf/virchrdev.c       |  2 +-
 src/libvirt_private.syms   |  1 +
 src/lxc/lxc_process.c      |  4 ++--
 src/network/leaseshelper.c |  2 +-
 src/openvz/openvz_conf.c   | 15 ++++++---------
 src/qemu/qemu_domain.c     |  2 +-
 src/util/vircommand.c      |  4 ++--
 src/util/virfile.c         |  9 ++++++++-
 src/util/virfile.h         |  1 +
 src/util/virlog.c          |  6 +++---
 src/util/virpidfile.c      |  4 ++--
 src/util/virxml.c          | 17 ++++++-----------
 tools/vsh.c                |  9 ++-------
 13 files changed, 36 insertions(+), 40 deletions(-)

--

-- 
2.4.10

--
libvir-list mailing list
libvir-list <at> redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Peter Krempa | 12 Feb 14:17 2016
Picon

[libvirt] [PATCH 0/2] virsh: fix usage of vshPrint

Peter Krempa (2):
  vsh: Simplify bailing out on OOM conditions
  vsh: Replace vshPrint macro with function

 tools/virsh-domain.c | 16 +++++++++-------
 tools/vsh.c          | 34 +++++++++++++++++++++++++++++-----
 tools/vsh.h          |  5 ++---
 3 files changed, 40 insertions(+), 15 deletions(-)

--

-- 
2.6.2

Michal Privoznik | 12 Feb 14:15 2016
Picon

[libvirt] [PATCH] virportallocatortest: Run on linux only

After the rework of mocking of our tests there's the
virportallocator test failing to link on mingw. Well, it's the
mocking library actually:

../gnulib/lib/.libs/libgnu.a(bind.o): In function `rpl_bind':
/home/jenkins/libvirt-mingw/build32/gnulib/lib/../../../gnulib/lib/bind.c:33: multiple
definition of
`rpl_bind'
.libs/virportallocatormock_la-virportallocatormock.o:/home/jenkins/libvirt-mingw/build32/tests/../../tests/virportallocatormock.c:79:
first defined here

I've no idea why this matters to mingw and does not to others.
Nevertheless, if we make the test linux only the problem goes
away.

Apparently, our test for RTLD_NEXT is not sufficient because
mingw32 defines it. Lets put aside for a while fact that it has
the same value as RTLD_DEFAULT which by description has different
meaning, shall we?

Signed-off-by: Michal Privoznik <mprivozn <at> redhat.com>
---
 tests/virportallocatormock.c | 6 ++++--
 tests/virportallocatortest.c | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/virportallocatormock.c b/tests/virportallocatormock.c
index e44191e..fa6e75b 100644
--- a/tests/virportallocatormock.c
+++ b/tests/virportallocatormock.c
(Continue reading)

Erik Skultety | 12 Feb 11:08 2016
Picon

[libvirt] [PATCH v4 0/7] admin: Introduce server listing API

Since v3:
- refactors to virHashForEach and hash iterators
- servers are now stored in a hash table instead of an array
- added forgotten virObjectLock in remoteAdminConnectListServers

Erik Skultety (7):
  util: Add a return value to void hash iterators
  util: Refactor virHashForEach so it returns as soon as an iterator
    fails
  virnetdaemon: Store servers in a hash table
  admin: Move admin_server.{h,c} to admin.{h,c}
  admin: Introduce virAdmServer structure
  admin: Introduce adminDaemonConnectListServers API
  virt-admin: Introduce cmdSrvList

 daemon/Makefile.am                                 |   5 +-
 daemon/admin.c                                     | 181 +++++++++++++++
 daemon/admin.h                                     |  36 +++
 daemon/admin_server.c                              | 111 +++-------
 daemon/admin_server.h                              |  26 +--
 daemon/libvirtd.c                                  |   6 +-
 include/libvirt/libvirt-admin.h                    |  25 ++-
 po/POTFILES.in                                     |   3 +-
 src/admin/admin_protocol.x                         |  26 ++-
 src/admin/admin_remote.c                           |  71 ++++++
 src/admin_protocol-structs                         |  15 ++
 src/conf/network_conf.c                            |  15 +-
 src/conf/nwfilter_params.c                         |   8 +-
 src/conf/snapshot_conf.c                           |  31 +--
 src/conf/virchrdev.c                               |   7 +-
(Continue reading)

John Ferlan | 12 Feb 00:38 2016
Picon

[libvirt] [PATCH v2 0/3] Add capability for text based polkit authentication for virsh

v1: http://www.redhat.com/archives/libvir-list/2016-February/msg00545.html

Differences to v1:

 - Patch 1, adjust error message slightly

 - Patch 2, remove the unnecessary virPolkitAgentCheck and the sleep

 - Patch 3, remove the --pkauth parameter
            adjust the logic to attempt the authentications in a loop 
              with the first being one for the graphical agent. If that
              fails because there was no agent to be found, then start
              up the text based agent. Also add logic to wait for the
              text based authentication agent to start (just in case).

John Ferlan (3):
  polkit: Adjust message when action-id isn't found
  util: Introduce API's for Polkit text authentication
  virsh: Add support for text based polkit authentication

 src/libvirt_private.syms |  2 ++
 src/util/virpolkit.c     | 64 +++++++++++++++++++++++++++++++++++++++++++++---
 src/util/virpolkit.h     |  5 ++++
 tests/virpolkittest.c    |  3 ++-
 tools/virsh.c            | 49 ++++++++++++++++++++++++++++++++----
 tools/virsh.h            |  2 ++
 6 files changed, 115 insertions(+), 10 deletions(-)

--

-- 
2.5.0
(Continue reading)

Laine Stump | 11 Feb 22:37 2016

[libvirt] [PATCH 0/3] networking logging improvements

1/3 was originally part of 2/3, but I decided I should split it out
since it changes something other than logging (although it should
still be a NOP). 2/3 changes what's logged when a domain interface is
connected to / disconnected from a network, and 3/3 changes what is
logged during 802.1QbX associate/disassociate operations.

All of these logging changed have proven useful to me when debugging
802.1QbX problems on a downstream version of libvirt (0.10.2 in
RHEL6), so I thought I'd share the joy :-)

Laine Stump (3):
  network: consolidate connection count updates for device pool
  network: consolidated info log for all network allocate/free
    operations
  util: clean up and expand 802.1QbX negotiation logging

 src/network/bridge_driver.c      | 91 +++++++++++++++++++---------------------
 src/util/virnetdevvportprofile.c | 60 ++++++++++++++++++++++----
 2 files changed, 95 insertions(+), 56 deletions(-)

--

-- 
2.5.0

Wido den Hollander | 11 Feb 17:04 2016
Picon
Gravatar

[libvirt] Improvements to the RBD storage backend

Hi,

After review by John Ferlan I'm sending a revised version of my earlier
patch which adds the fast-diff feature for RBD volumes.

Before the patch there is one small improvement which is later used
by the fast-diff feature.

The other is a bugfix where the #ifdef in the code wasn't requiring the
right version of librbd.

Wido

Andrea Bolognani | 11 Feb 14:36 2016
Picon

[libvirt] [PATCH 0/4] tests: Fix syntax-check failure, plus extras

Commit a03cbfe0fb introduced a syntax-check failure: patch
1/4 prepares for 2/4, where the failure is actually fixed.

Patches 3/4 and 4/4 improve the naming consistency for mock
libraries by shuffling files around a bit.

Cheers.

Andrea Bolognani (4):
  tests: Split off the mock part of the port allocator test
  tests: Allow use of close() in mock libraries
  tests: Don't use "lib" prefix for mock libraries
  tests: Rename virmockdbus -> virdbusmock for consistency

 cfg.mk                                 |   2 +-
 tests/Makefile.am                      |  26 ++++----
 tests/{virmockdbus.c => virdbusmock.c} |   2 +-
 tests/virfirewalltest.c                |   2 +-
 tests/virpolkittest.c                  |   2 +-
 tests/virportallocatormock.c           | 108 +++++++++++++++++++++++++++++++
 tests/virportallocatortest.c           | 112 +++------------------------------
 tests/virsystemdtest.c                 |   2 +-
 8 files changed, 134 insertions(+), 122 deletions(-)
 rename tests/{virmockdbus.c => virdbusmock.c} (97%)
 create mode 100644 tests/virportallocatormock.c

--

-- 
2.5.0

(Continue reading)

Michal Privoznik | 11 Feb 13:18 2016
Picon

[libvirt] [PATCH] syntax-check: Allow plain close in virportallocatortest

After a03cbfe0fb9 we switched to a plain close() instead of
VIR_FORCE_CLOSE(). This makes sense because it's a mocking
library and thus should not require anything from libvirt.
However, we forgot add an exemption to our 'forbid close' rule.

Signed-off-by: Michal Privoznik <mprivozn <at> redhat.com>
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 3f78842..dbd22a7 100644
--- a/cfg.mk
+++ b/cfg.mk
 <at>  <at>  -1158,7 +1158,7  <at>  <at>  exclude_file_name_regexp--sc_prohibit_strdup = \
   ^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c$$)

 exclude_file_name_regexp--sc_prohibit_close = \
-  (\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir(cgroup|pci)mock\.c)$$)
+  (\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir((cgroup|pci)mock|portallocatortest)\.c)$$)

 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
   (^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff$$)
--

-- 
2.4.10

Ján Tomko | 11 Feb 13:07 2016
Picon

[libvirt] [PATCH] Error out on missing machine type in machine configs

Commit f1a89a8 allowed parsing configs from /etc/libvirt
without validating the emulator capabilities.

Check for the presence of os->type.machine even if the
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS flag is set,
otherwise the daemon can crash on carelessly crafted input
in the config directory.

https://bugzilla.redhat.com/show_bug.cgi?id=1267256
---
 src/conf/domain_conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 67415fa..5d3fed0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
 <at>  <at>  -14841,6 +14841,12  <at>  <at>  virDomainDefParseXML(xmlDocPtr xml,
             goto error;
         }
         VIR_FREE(capsdata);
+    } else {
+        if (!def->os.machine) {
+            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                           _("Missing machine type"));
+            goto error;
+        }
     }

     /* Extract domain name */
(Continue reading)


Gmane