[libvirt] [PATCHv2 1/2] virsh: move command cpu-baseline from domain group to host group.
by liyang
From: Li Yang <liyang.fnst(a)cn.fujitsu.com>
cpu-baseline command can compute baseline CPU for a set of given CPUs,
I think it should not belong to domain group, should belong to host
group, so I moved the related source from virsh-domain.c to virsh-host.c
Signed-off-by: Li Yang <liyang.fnst(a)cn.fujitsu.com>
---
tools/virsh-domain.c | 116 -------------------------------------------------
tools/virsh-host.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 117 insertions(+), 116 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 42c9920..8fc6c59 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6107,116 +6107,6 @@ cleanup:
}
/*
- * "cpu-baseline" command
- */
-static const vshCmdInfo info_cpu_baseline[] = {
- {.name = "help",
- .data = N_("compute baseline CPU")
- },
- {.name = "desc",
- .data = N_("Compute baseline CPU for a set of given CPUs.")
- },
- {.name = NULL}
-};
-
-static const vshCmdOptDef opts_cpu_baseline[] = {
- {.name = "file",
- .type = VSH_OT_DATA,
- .flags = VSH_OFLAG_REQ,
- .help = N_("file containing XML CPU descriptions")
- },
- {.name = "features",
- .type = VSH_OT_BOOL,
- .help = N_("Show features that are part of the CPU model type")
- },
- {.name = NULL}
-};
-
-static bool
-cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
-{
- const char *from = NULL;
- bool ret = false;
- char *buffer;
- char *result = NULL;
- char **list = NULL;
- unsigned int flags = 0;
- int count = 0;
-
- xmlDocPtr xml = NULL;
- xmlNodePtr *node_list = NULL;
- xmlXPathContextPtr ctxt = NULL;
- virBuffer buf = VIR_BUFFER_INITIALIZER;
- size_t i;
-
- if (vshCommandOptBool(cmd, "features"))
- flags |= VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES;
-
- if (vshCommandOptStringReq(ctl, cmd, "file", &from) < 0)
- return false;
-
- if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0)
- return false;
-
- /* add a separate container around the xml */
- virBufferStrcat(&buf, "<container>", buffer, "</container>", NULL);
- if (virBufferError(&buf))
- goto no_memory;
-
- VIR_FREE(buffer);
- buffer = virBufferContentAndReset(&buf);
-
-
- if (!(xml = virXMLParseStringCtxt(buffer, from, &ctxt)))
- goto cleanup;
-
- if ((count = virXPathNodeSet("//cpu[not(ancestor::cpus)]",
- ctxt, &node_list)) == -1)
- goto cleanup;
-
- if (count == 0) {
- vshError(ctl, _("No host CPU specified in '%s'"), from);
- goto cleanup;
- }
-
- list = vshCalloc(ctl, count, sizeof(const char *));
-
- for (i = 0; i < count; i++) {
- if (!(list[i] = virXMLNodeToString(xml, node_list[i]))) {
- vshSaveLibvirtError();
- goto cleanup;
- }
- }
-
- result = virConnectBaselineCPU(ctl->conn,
- (const char **)list, count, flags);
-
- if (result) {
- vshPrint(ctl, "%s", result);
- ret = true;
- }
-
-cleanup:
- xmlXPathFreeContext(ctxt);
- xmlFreeDoc(xml);
- VIR_FREE(result);
- if (list != NULL && count > 0) {
- for (i = 0; i < count; i++)
- VIR_FREE(list[i]);
- }
- VIR_FREE(list);
- VIR_FREE(buffer);
- VIR_FREE(node_list);
-
- return ret;
-
-no_memory:
- vshError(ctl, "%s", _("Out of memory"));
- ret = false;
- goto cleanup;
-}
-
-/*
* "cpu-stats" command
*/
static const vshCmdInfo info_cpu_stats[] = {
@@ -10517,12 +10407,6 @@ const vshCmdDef domManagementCmds[] = {
.flags = 0
},
#endif
- {.name = "cpu-baseline",
- .handler = cmdCPUBaseline,
- .opts = opts_cpu_baseline,
- .info = info_cpu_baseline,
- .flags = 0
- },
{.name = "cpu-compare",
.handler = cmdCPUCompare,
.opts = opts_cpu_compare,
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 1d1bb97..b69de7c 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -35,6 +35,7 @@
#include "virbuffer.h"
#include "viralloc.h"
#include "virsh-domain.h"
+#include "virfile.h"
#include "virxml.h"
#include "virtypedparam.h"
#include "virstring.h"
@@ -193,6 +194,116 @@ cleanup:
}
/*
+ * "cpu-baseline" command
+ */
+static const vshCmdInfo info_cpu_baseline[] = {
+ {.name = "help",
+ .data = N_("compute baseline CPU")
+ },
+ {.name = "desc",
+ .data = N_("Compute baseline CPU for a set of given CPUs.")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_cpu_baseline[] = {
+ {.name = "file",
+ .type = VSH_OT_DATA,
+ .flags = VSH_OFLAG_REQ,
+ .help = N_("file containing XML CPU descriptions")
+ },
+ {.name = "features",
+ .type = VSH_OT_BOOL,
+ .help = N_("Show features that are part of the CPU model type")
+ },
+ {.name = NULL}
+};
+
+static bool
+cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
+{
+ const char *from = NULL;
+ bool ret = false;
+ char *buffer;
+ char *result = NULL;
+ char **list = NULL;
+ unsigned int flags = 0;
+ int count = 0;
+
+ xmlDocPtr xml = NULL;
+ xmlNodePtr *node_list = NULL;
+ xmlXPathContextPtr ctxt = NULL;
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+ size_t i;
+
+ if (vshCommandOptBool(cmd, "features"))
+ flags |= VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES;
+
+ if (vshCommandOptStringReq(ctl, cmd, "file", &from) < 0)
+ return false;
+
+ if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0)
+ return false;
+
+ /* add a separate container around the xml */
+ virBufferStrcat(&buf, "<container>", buffer, "</container>", NULL);
+ if (virBufferError(&buf))
+ goto no_memory;
+
+ VIR_FREE(buffer);
+ buffer = virBufferContentAndReset(&buf);
+
+
+ if (!(xml = virXMLParseStringCtxt(buffer, from, &ctxt)))
+ goto cleanup;
+
+ if ((count = virXPathNodeSet("//cpu[not(ancestor::cpus)]",
+ ctxt, &node_list)) == -1)
+ goto cleanup;
+
+ if (count == 0) {
+ vshError(ctl, _("No host CPU specified in '%s'"), from);
+ goto cleanup;
+ }
+
+ list = vshCalloc(ctl, count, sizeof(const char *));
+
+ for (i = 0; i < count; i++) {
+ if (!(list[i] = virXMLNodeToString(xml, node_list[i]))) {
+ vshSaveLibvirtError();
+ goto cleanup;
+ }
+ }
+
+ result = virConnectBaselineCPU(ctl->conn,
+ (const char **)list, count, flags);
+
+ if (result) {
+ vshPrint(ctl, "%s", result);
+ ret = true;
+ }
+
+cleanup:
+ xmlXPathFreeContext(ctxt);
+ xmlFreeDoc(xml);
+ VIR_FREE(result);
+ if (list != NULL && count > 0) {
+ for (i = 0; i < count; i++)
+ VIR_FREE(list[i]);
+ }
+ VIR_FREE(list);
+ VIR_FREE(buffer);
+ VIR_FREE(node_list);
+
+ return ret;
+
+no_memory:
+ vshError(ctl, "%s", _("Out of memory"));
+ ret = false;
+ goto cleanup;
+}
+
+/*
* "maxvcpus" command
*/
static const vshCmdInfo info_maxvcpus[] = {
@@ -955,6 +1066,12 @@ const vshCmdDef hostAndHypervisorCmds[] = {
.info = info_hostname,
.flags = 0
},
+ {.name = "cpu-baseline",
+ .handler = cmdCPUBaseline,
+ .opts = opts_cpu_baseline,
+ .info = info_cpu_baseline,
+ .flags = 0
+ },
{.name = "maxvcpus",
.handler = cmdMaxvcpus,
.opts = opts_maxvcpus,
--
1.7.1
11 years, 1 month
[libvirt] [PATCH] virnetsocket: fix getsockopt on FreeBSD
by Ryota Ozaki
aa0f099 introduced a strict error checking for getsockopt and it
revealed that getting a peer credential of a socket on FreeBSD
didn't work. Libvirtd hits the error:
error : virNetSocketGetUNIXIdentity:1198 : Failed to get valid
client socket identity groups
SOL_SOCKET (0xffff) was used as a level of getsockopt for
LOCAL_PEERCRED, however, it was wrong. 0 is correct as well as
Mac OS X.
So for LOCAL_PEERCRED our options are SOL_LOCAL (if defined) or
0 on Mac OS X and FreeBSD. According to the fact, the patch
simplifies the code by removing ifdef __APPLE__.
I tested the patch on FreeBSD 8.4, 9.2 and 10.0-BETA1.
Signed-off-by: Ryota Ozaki <ozaki.ryota(a)gmail.com>
---
src/rpc/virnetsocket.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 3eb5708..04bf25a 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -1152,18 +1152,17 @@ cleanup:
/* VIR_SOL_PEERCRED - the value needed to let getsockopt() work with
* LOCAL_PEERCRED
*/
-# ifdef __APPLE__
-# ifdef SOL_LOCAL
-# define VIR_SOL_PEERCRED SOL_LOCAL
-# else
-/* Prior to Mac OS X 10.7, SOL_LOCAL was not defined and users were
- * expected to supply 0 as the second value for getsockopt() when using
- * LOCAL_PEERCRED
- */
-# define VIR_SOL_PEERCRED 0
-# endif
+
+/* Mac OS X 10.8 provides SOL_LOCAL for LOCAL_PEERCRED */
+# ifdef SOL_LOCAL
+# define VIR_SOL_PEERCRED SOL_LOCAL
# else
-# define VIR_SOL_PEERCRED SOL_SOCKET
+/* FreeBSD and Mac OS X prior to 10.7, SOL_LOCAL is not defined and
+ * users are expected to supply 0 as the second value for getsockopt()
+ * when using LOCAL_PEERCRED. NB SOL_SOCKET cannot be used instead
+ * of SOL_LOCAL
+ */
+# define VIR_SOL_PEERCRED 0
# endif
int virNetSocketGetUNIXIdentity(virNetSocketPtr sock,
--
1.8.4
11 years, 1 month
[libvirt] Entering freeze for libvirt-1.1.4
by Daniel Veillard
I finally tagged and genrated tarballs for RC1 of 1.1.4, so we have
now entered freeze. The bits are available as usual at:
ftp://libvirt.org/libvirt/
My initial testing doesn't show anything suspicious but is limited,
so please give it a try, especially for portability issues !
If all goes well i will probably make an rc2 by Thurday and release
1.1.4 for good on Monday 4th.
Give it a try !
thanks,
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 1 month
[libvirt] Erratic failure of
by Daniel Veillard
While building the release my first rpm build failed with
FAIL: securityselinuxtest
i.e. rpmbuit -ta based on libvirt-1.1.4 tarball on an up to date
Fedora release 19, it did not reproduce (subsequent builds just
worked fine) so i don't really have clues of what happened, except
I didn't caught anything in my logs either. That didn't happen for
rc1 or rc2 but that could be just pure luck .
Sorry for the lack of details,
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 1 month
[libvirt] [PATCH] MacOS: Handle changes to args in xdrproc_t
by Doug Goldstein
With Mac OS X 10.9, xdrproc_t is no longer defined as:
typedef bool_t (*xdrproc_t) (XDR *, void *, ...);
but instead as
typedef bool-t (*xdrproc_t) (XDR *, void *, unsigned int);
The rationale explained in the header is that using a vararg is
incorrect and has a potential to change the ABI slightly. They decided
to specify the exact number of parameters and for compatibility with old
code decided to make the signature require 3 arguments. The third
argument is ignored for cases that its not used and its recommended to
supply a 0.
---
configure.ac | 41 +++++++++++++++++++++++++++++++++++++++++
src/rpc/virnetmessage.c | 10 ++++++++--
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1c5b168..f2bae88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -697,6 +697,47 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then
*) XDR_CFLAGS=$lv_cv_xdr_cflags ;;
esac
AC_SUBST([XDR_CFLAGS])
+
+ dnl Mac OS X Mavericks (10.9) dropped the varargs definition that
+ dnl allowed 2 or 3 parameters to xdrproc_t callbacks and decided on
+ dnl 3 arguments being a must.
+ old_CFLAGS=$CFLAGS
+ AC_CACHE_CHECK([whether xdrproc_t callbacks take 2 or 3 args],
+ [lv_cv_xdrproc_t_args], [
+ CFLAGS="$old_CFLAGS $XDR_CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <rpc/rpc.h>
+ ]],
+ [[
+ XDR xdr;
+ xdrproc_t filter = NULL;
+
+ return (filter)(&xdr, NULL);
+ ]])],
+ [lv_cv_xdrproc_t_args=2], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <rpc/rpc.h>
+ ]],
+ [[
+ XDR xdr;
+ xdrproc_t filter = NULL;
+
+ return (filter)(&xdr, NULL, 0);
+ ]])],
+ [lv_cv_xdrproc_t_args=3],
+ [lv_cv_xdrproc_t_args=unknown])
+ ])
+ CFLAGS="$old_CFLAGS"
+ ])
+ case $lv_cv_xdrproc_t_args in
+ unknown) AC_MSG_ERROR([cannot determine arg count for xdrproc_t]) ;;
+ *)
+ AC_DEFINE_UNQUOTED([XDRPROC_T_ARG_COUNT], [$lv_cv_xdrproc_t_args],
+ [number of arguments that xdrproc_t func ptr takes])
+ ;;
+ esac
fi
diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
index d60366b..79e496f 100644
--- a/src/rpc/virnetmessage.c
+++ b/src/rpc/virnetmessage.c
@@ -33,6 +33,12 @@
#define VIR_FROM_THIS VIR_FROM_RPC
+#if XDRPROC_T_ARG_COUNT == 3
+# define VIR_XDRPROC(proc, xdr, data) ((proc)((xdr), (data), 0))
+#else
+# define VIR_XDRPROC(proc, xdr, data) ((proc)((xdr), (data)))
+#endif
+
virNetMessagePtr virNetMessageNew(bool tracked)
{
virNetMessagePtr msg;
@@ -345,7 +351,7 @@ int virNetMessageEncodePayload(virNetMessagePtr msg,
msg->bufferLength - msg->bufferOffset, XDR_ENCODE);
/* Try to encode the payload. If the buffer is too small increase it. */
- while (!(*filter)(&xdr, data)) {
+ while (!VIR_XDRPROC(*filter, &xdr, data)) {
unsigned int newlen = (msg->bufferLength - VIR_NET_MESSAGE_LEN_MAX) * 4;
if (newlen > VIR_NET_MESSAGE_MAX) {
@@ -402,7 +408,7 @@ int virNetMessageDecodePayload(virNetMessagePtr msg,
xdrmem_create(&xdr, msg->buffer + msg->bufferOffset,
msg->bufferLength - msg->bufferOffset, XDR_DECODE);
- if (!(*filter)(&xdr, data)) {
+ if (!VIR_XDRPROC(*filter, &xdr, data)) {
virReportError(VIR_ERR_RPC, "%s", _("Unable to decode message payload"));
goto error;
}
--
1.8.1.5
11 years, 1 month
[libvirt] [PATCH] MacOS: Handle changes to xdrproc_t definition
by Doug Goldstein
With Mac OS X 10.9, xdrproc_t is no longer defined as:
typedef bool_t (*xdrproc_t)(XDR *, ...);
but instead as:
typdef bool_t (*xdrproc_t)(XDR *, void *, unsigned int);
For reference, Linux systems typically define it as:
typedef bool_t (*xdrproc_t)(XDR *, void *, ...);
The rationale explained in the header is that using a vararg is
incorrect and has a potential to change the ABI slightly do to compiler
optimizations taken and the undefined behavior. They decided
to specify the exact number of parameters and for compatibility with old
code decided to make the signature require 3 arguments. The third
argument is ignored for cases that its not used and its recommended to
supply a 0.
---
src/rpc/virnetmessage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
index d60366b..af07404 100644
--- a/src/rpc/virnetmessage.c
+++ b/src/rpc/virnetmessage.c
@@ -345,7 +345,7 @@ int virNetMessageEncodePayload(virNetMessagePtr msg,
msg->bufferLength - msg->bufferOffset, XDR_ENCODE);
/* Try to encode the payload. If the buffer is too small increase it. */
- while (!(*filter)(&xdr, data)) {
+ while (!(*filter)(&xdr, data, 0)) {
unsigned int newlen = (msg->bufferLength - VIR_NET_MESSAGE_LEN_MAX) * 4;
if (newlen > VIR_NET_MESSAGE_MAX) {
@@ -402,7 +402,7 @@ int virNetMessageDecodePayload(virNetMessagePtr msg,
xdrmem_create(&xdr, msg->buffer + msg->bufferOffset,
msg->bufferLength - msg->bufferOffset, XDR_DECODE);
- if (!(*filter)(&xdr, data)) {
+ if (!(*filter)(&xdr, data, 0)) {
virReportError(VIR_ERR_RPC, "%s", _("Unable to decode message payload"));
goto error;
}
--
1.8.1.5
11 years, 1 month
[libvirt] [RFC PATCHv2 0/2] gluster pools
by Eric Blake
This addresses the review from RFCv1 for splitting the glfs checks
to be different from the storage backend checks:
https://www.redhat.com/archives/libvir-list/2013-October/msg00645.html
I'm still just in RFC stage; wanting to make sure I have the
documentation correct for sample XML prior to actually coding
up the use of <glfs.h> from storage_backend_gluster.c.
Note that qemu's block/gluster.c documents that qemu expects
that when using glfs to bypass the file system, the image will
always be specified as:
* file=gluster[+transport]://[server[:port]]/volname/image[?socket=...]
which means that there is no way to pass a direct gluster volume
as a raw block device to qemu (it is always a file embedded within
the gluster volume); hence my choice of making a single gluster
volume act as the storage pool.
Eric Blake (2):
storage: initial support for linking with libgfapi
storage: document gluster pool
configure.ac | 21 +++++++
docs/formatstorage.html.in | 11 ++--
docs/schemas/storagepool.rng | 21 +++++++
docs/storage.html.in | 90 +++++++++++++++++++++++++++-
libvirt.spec.in | 15 +++++
m4/virt-gluster.m4 | 26 ++++++++
po/POTFILES.in | 1 +
src/Makefile.am | 9 +++
src/conf/storage_conf.c | 20 +++++--
src/conf/storage_conf.h | 3 +-
src/storage/storage_backend.c | 6 ++
src/storage/storage_backend.h | 6 +-
src/storage/storage_backend_gluster.c | 46 ++++++++++++++
src/storage/storage_backend_gluster.h | 29 +++++++++
tests/storagepoolxml2xmlin/pool-gluster.xml | 8 +++
tests/storagepoolxml2xmlout/pool-gluster.xml | 11 ++++
tests/storagepoolxml2xmltest.c | 1 +
17 files changed, 311 insertions(+), 13 deletions(-)
create mode 100644 m4/virt-gluster.m4
create mode 100644 src/storage/storage_backend_gluster.c
create mode 100644 src/storage/storage_backend_gluster.h
create mode 100644 tests/storagepoolxml2xmlin/pool-gluster.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-gluster.xml
--
1.8.3.1
11 years, 1 month
[libvirt] Using external ceph.conf for RBD pools and disks
by Michael Chapman
Hi all,
At the moment, RBD storage pools in libvirt must be supplied with a list
of Ceph monitor addresses, using <host> elements in the pool's source
definition. Ceph itself has a configuration file, and this is used by
default by all Ceph command-line utilities. This file can contain the
monitor addresses for the cluster, as well as a bunch of other useful
options (e.g. for tuning and debugging).
I think it would be nice if libvirt were able to load in this file when
starting RBD storage pools. Before I send some patches through. however, I
thought I'd better check to see whether my approach is sound.
First, I am not keen on having libvirt get librados to load the
configuration file automatically. librados actually uses a search path to
find the configuration file, and that path includes silly things like the
current working directory. Since it can be told to load a single file, I
think it would be better if it were made explicit in the storage pool XML,
i.e.:
<pool type="rbd">
<name>rbd</name>
<source>
<name>rbd</name>
<config file="/etc/ceph/ceph.conf"/>
<auth username="user" type="ceph">
<secret usage="mycephcluster"/>
</auth>
</source>
</pool>
<config> would be able to be used in addition to, or as an alternative to,
a list of <host> elements. Would something along these lines this be
suitable? Would it be better to use the <config> element's text content as
the filename, rather than use an attribute? I'm not sure what style
guidelines there are for something like this.
The second part is of course to make a similar change to RBD-based domain
disk definitions, i.e.:
...
<disk type="network">
<driver name="qemu" type="raw"/>
<source protocol="rbd" name="pool/volume">
<config file="/etc/ceph/ceph.conf"/>
</source>
<target dev="vda" bus="virtio"/>
<auth username="user">
<secret type="ceph" usage="mycephcluster"/>
</auth>
</disk>
...
Again, <config> could be used instead of or alongside some <host>
elements.
This is where it gets a little tricky. At the moment, <host> in a disk's
source definition is entirely optional. Furthermore, QEMU _always_ loads a
Ceph configuration file -- either one supplied as a "conf" argument for
the block device, or one found through the search path mentioned earlier.
The only way to suppress this is to pass conf=/dev/null... but for
backwards-compatibility (users may be relying on QEMU's use of the search
path), I don't think we can do this now.
There's one final gotcha in all of this: if QEMU is given both a "conf"
argument and a "mon_addr" argument, only the latter will take effect. This
means if both <config> and <host> are supplied, then the <host> elements
will override any monitor addresses from the configuration file.
For consistency, I intend to make an RBD storage pool have the same
behaviour. However, would it perhaps be better if the user could only
choose _either_ <config> or a list of <host> elements? Personally, I don't
think it's a big deal if the behaviour is clearly documented -- being able
to load options from a config file while still defining hosts in the
libvirt XML could be useful.
Anyway, before I send my patches through I'm interested in hearing
people's thoughts on this. All sound sane? Too intrusive? A waste of time?
:-)
- Michael
11 years, 1 month
Re: [libvirt] [PATCH] network_conf.c: correct the value of the 'result' variable
by Hongwei Bi
2013/11/1 Eric Blake <eblake(a)redhat.com>:
> [off-list]
>
> On 10/31/2013 06:20 PM, Hongwei Bi wrote:
>
> Your system clock is off. From your headers:
>
> Received: from localhost ([112.23.86.63])
> by mx.google.com with ESMTPSA id q4sm5224371pba.12.2013.10.31.09.39.20
> for <multiple recipients>
> (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
> Thu, 31 Oct 2013 09:39:21 -0700 (PDT)
> Date: Fri, 1 Nov 2013 08:20:12 +0800
>
> your system claimed to have sent at 12:20 UTC on Friday, but your mail
> server received it at 16:39 UTC on Thursday. Your clock is about 8
> hours off, and it messes up mail clients that sort threads by most
> recent activity.
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
According to the following link
https://www.redhat.com/archives/libvir-list/2013-November/msg00016.html
It seems that there is no need to add this patch. But the caller
virNetworkDefFormatInternal() has a check of the return value which is
described as " if (virNetworkDNSDefFormat(buf, &def->dns) < 0) ". So I
think we should at least change one or the other.
11 years, 1 month