[libvirt] Availability of patchchecker
by Daniel Veillard
As some may have noticed, I'm often behind on patch review and it
happens I notice patches way too late i.e. just before a release.
For some time I though that having something automatic to remind
me about unreviewed/unapplied patches would be a good way to fight
this. I know that Eric, Matthias, Dan ... scans mostly everything
but well are all getting quite busy and sometime things get forgotten
and that's bad for the person who spent time on it and it's bad for
the community. Asking to resend old patches tend to inflate the problem
it's not a solution and humanly it's poor taste.
So I spent most part of the week writing patchchecker, it's an
automated tool, working out of the public mail archives and a git
checkout, and was tested only with libvirt but should work also with
other projects using MHonarc for mail archives and git (or could be
made more flexible, yadda yadda ...)
http://www.libvirt.org/git/?p=patchchecker.git
git clone git://libvirt.org/patchchecker.git
Check the README, there is an indexer to run regulary to extract from
the mail archives, and a command to try to show intereting things,
right now it reports only patches which didn't get any comments or
acks. It detects patchset but doesn't fully use them yet. It's crude
but it's automatic !
Next step is to so a bit of XML output and XSLT to export the output
as a web page on libvirt.org , I will also need to add support for
patch versioning i.e. being able to obsolete an older version with
a newer mail (or patch set).
I guess discussion and patches should be held and sent to this list,
which already raises a limitation of this tool: it currently support
only one git checkout, and if you send a patch for it it will complain
if it doesn't get applied after being ACK'ed :-)
BTW one of the results is that we should try to use the formal ACK
keyword all the time (capital) when accepting and commiting a patch and
I may occasionally send reply mail to threads with ACK or something
like COMMITED if the algorithm of the checker get stuck on one patch.
I really expect the amount of manual intervention to be limited to this
I want the tool to help me, not give me/us more work :-)
Hopefully it may prove useful to a few of us, and possibly be
adapted to other projects (as usual I take patches :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 5 months
[libvirt] [PATCH] remote: Generate virDomainGetBlockPullInfo
by Matthias Bolte
It was already generatable but skipped.
---
daemon/remote.c | 36 ------------------------------------
src/remote/remote_driver.c | 32 --------------------------------
src/remote/remote_protocol.x | 4 ++--
3 files changed, 2 insertions(+), 70 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 1914b25..8e0f47d 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1737,42 +1737,6 @@ cleanup:
return rv;
}
-static int
-remoteDispatchDomainGetBlockPullInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error * rerr,
- remote_domain_get_block_pull_info_args *args,
- remote_domain_get_block_pull_info_ret *ret)
-{
- virDomainPtr dom = NULL;
- virDomainBlockPullInfo tmp;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
- goto cleanup;
- }
-
- if (!(dom = get_nonnull_domain(conn, args->dom)))
- goto cleanup;
-
- if (virDomainGetBlockPullInfo(dom, args->path, &tmp, args->flags) < 0)
- goto cleanup;
- ret->cur = tmp.cur;
- ret->end = tmp.end;
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (dom)
- virDomainFree(dom);
- return rv;
-}
-
-
/*-------------------------------------------------------------*/
static int
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index f4b43e0..5db1064 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2671,38 +2671,6 @@ done:
return rv;
}
-static int remoteDomainGetBlockPullInfo(virDomainPtr domain,
- const char *path,
- virDomainBlockPullInfoPtr info,
- unsigned int flags)
-{
- int rv = -1;
- remote_domain_get_block_pull_info_args args;
- remote_domain_get_block_pull_info_ret ret;
- struct private_data *priv = domain->conn->privateData;
-
- remoteDriverLock(priv);
-
- make_nonnull_domain(&args.dom, domain);
- args.path = (char *)path;
- args.flags = flags;
-
- if (call(domain->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_BLOCK_PULL_INFO,
- (xdrproc_t)xdr_remote_domain_get_block_pull_info_args,
- (char *)&args,
- (xdrproc_t)xdr_remote_domain_get_block_pull_info_ret,
- (char *)&ret) == -1)
- goto done;
-
- info->cur = ret.cur;
- info->end = ret.end;
- rv = 0;
-
-done:
- remoteDriverUnlock(priv);
- return rv;
-}
-
/*----------------------------------------------------------------------*/
static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 2b9784b..b136e41 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1003,7 +1003,7 @@ struct remote_domain_get_block_pull_info_args {
unsigned int flags;
};
-struct remote_domain_get_block_pull_info_ret {
+struct remote_domain_get_block_pull_info_ret { /* insert@2 */
unsigned hyper cur;
unsigned hyper end;
};
@@ -2409,7 +2409,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_BLOCK_PULL_ALL = 230, /* autogen autogen */
REMOTE_PROC_DOMAIN_BLOCK_PULL_ABORT = 231, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_BLOCK_PULL_INFO = 232, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_GET_BLOCK_PULL_INFO = 232, /* autogen autogen */
REMOTE_PROC_DOMAIN_EVENT_BLOCK_PULL = 233 /* skipgen skipgen */
/*
--
1.7.0.4
13 years, 5 months
[libvirt] [PATCH] remote: Handle functions thar return optional strings
by Matthias Bolte
---
daemon/remote.c | 64 ------------------------------------------
daemon/remote_generator.pl | 28 ++++++++++++++++++
src/remote/remote_protocol.x | 2 +-
3 files changed, 29 insertions(+), 65 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 8e0f47d..f2e193d 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1485,70 +1485,6 @@ cleanup:
}
static int
-remoteDispatchDomainScreenshot(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr,
- remote_error *rerr,
- remote_domain_screenshot_args *args,
- remote_domain_screenshot_ret *ret)
-{
- int rv = -1;
- struct qemud_client_stream *stream = NULL;
- virDomainPtr dom = NULL;
- char *mime, **mime_p;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
- goto cleanup;
- }
-
- ret->mime = NULL;
-
- if (!(dom = get_nonnull_domain (conn, args->dom)))
- goto cleanup;
-
- if (!(stream = remoteCreateClientStream(conn, hdr)))
- goto cleanup;
-
- if (!(mime = virDomainScreenshot(dom, stream->st, args->screen, args->flags)))
- goto cleanup;
-
- if (remoteAddClientStream(client, stream, 1) < 0) {
- virStreamAbort(stream->st);
- goto cleanup;
- }
-
- if (VIR_ALLOC(mime_p) < 0) {
- virReportOOMError();
- goto cleanup;
- }
-
- *mime_p = strdup(mime);
- if (*mime_p == NULL) {
- virReportOOMError();
- VIR_FREE(mime_p);
- goto cleanup;
- }
-
- ret->mime = mime_p;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- VIR_FREE(mime);
- if (dom)
- virDomainFree(dom);
- if (stream && rv != 0) {
- virStreamAbort(stream->st);
- remoteFreeClientStream(client, stream);
- }
- return rv;
-}
-
-static int
remoteDispatchNodeGetCPUStats (struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index bcf5fd4..d9d9ded 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -351,6 +351,7 @@ elsif ($opt_b) {
my @optionals_list = ();
my @getters_list = ();
my @args_list = ();
+ my @prepare_ret_list = ();
my @ret_list = ();
my @free_list = ();
my @free_list_on_error = ("remoteDispatchError(rerr);");
@@ -551,6 +552,27 @@ elsif ($opt_b) {
$single_ret_var = $1;
$single_ret_by_ref = 0;
$single_ret_check = " == NULL";
+ } elsif ($ret_member =~ m/^remote_string (\S+);/) {
+ push(@vars_list, "char *$1 = NULL");
+ push(@vars_list, "char **$1_p = NULL");
+ push(@ret_list, "ret->$1 = $1_p;");
+ push(@free_list, " VIR_FREE($1);");
+ push(@free_list_on_error, "VIR_FREE($1_p);");
+ push(@prepare_ret_list,
+ "if (VIR_ALLOC($1_p) < 0) {\n" .
+ " virReportOOMError();\n" .
+ " goto cleanup;\n" .
+ " }\n" .
+ " \n" .
+ " *$1_p = strdup($1);\n" .
+ " if (*$1_p == NULL) {\n" .
+ " virReportOOMError();\n" .
+ " goto cleanup;\n" .
+ " }\n");
+
+ $single_ret_var = $1;
+ $single_ret_by_ref = 0;
+ $single_ret_check = " == NULL";
} elsif ($ret_member =~ m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|node_device|secret|nwfilter|domain_snapshot) (\S+);/) {
my $type_name = name_to_ProcName($1);
@@ -864,6 +886,12 @@ elsif ($opt_b) {
print "\n";
}
+ if (@prepare_ret_list) {
+ print " ";
+ print join("\n ", @prepare_ret_list);
+ print "\n";
+ }
+
if (@ret_list) {
print " ";
print join("\n ", @ret_list);
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index b136e41..0aa3dfb 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2386,7 +2386,7 @@ enum remote_procedure {
REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* autogen autogen | readstream@1 */
REMOTE_PROC_DOMAIN_INJECT_NMI = 210, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* skipgen autogen | readstream@1 */
+ REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* autogen autogen | readstream@1 */
REMOTE_PROC_DOMAIN_GET_STATE = 212, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214, /* skipgen skipgen */
--
1.7.0.4
13 years, 5 months
[libvirt] [PATCH] remote generator: Allow to annotate arrays with typecasts
by Matthias Bolte
Removes special case code from the generator and handle additional
methods.
The generated version of remoteDispatchDomainPinVcpu(Flags) has no
length check, but this check was useless anyway as it was applied to
data that was already deserialized from its XDR form.
---
daemon/remote.c | 82 --------------------------------------
daemon/remote_generator.pl | 90 ++++++++++++++++++++++++++++++------------
src/remote/remote_protocol.x | 17 +++++---
3 files changed, 74 insertions(+), 115 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index f2e193d..37fbed0 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1269,88 +1269,6 @@ cleanup:
}
static int
-remoteDispatchDomainPinVcpu(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_pin_vcpu_args *args,
- void *ret ATTRIBUTE_UNUSED)
-{
- virDomainPtr dom = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
- goto cleanup;
- }
-
- if (!(dom = get_nonnull_domain(conn, args->dom)))
- goto cleanup;
-
- if (args->cpumap.cpumap_len > REMOTE_CPUMAP_MAX) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("cpumap_len > REMOTE_CPUMAP_MAX"));
- goto cleanup;
- }
-
- if (virDomainPinVcpu(dom, args->vcpu,
- (unsigned char *) args->cpumap.cpumap_val,
- args->cpumap.cpumap_len) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (dom)
- virDomainFree(dom);
- return rv;
-}
-
-static int
-remoteDispatchDomainPinVcpuFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_pin_vcpu_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
-{
- virDomainPtr dom = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
- goto cleanup;
- }
-
- if (!(dom = get_nonnull_domain(conn, args->dom)))
- goto cleanup;
-
- if (args->cpumap.cpumap_len > REMOTE_CPUMAP_MAX) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("cpumap_len > REMOTE_CPUMAP_MAX"));
- goto cleanup;
- }
-
- if (virDomainPinVcpuFlags(dom,
- args->vcpu,
- (unsigned char *) args->cpumap.cpumap_val,
- args->cpumap.cpumap_len,
- args->flags) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (dom)
- virDomainFree(dom);
- return rv;
-}
-
-static int
remoteDispatchDomainGetMemoryParameters(struct qemud_server *server
ATTRIBUTE_UNUSED,
struct qemud_client *client
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index d9d9ded..146c56b 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -403,20 +403,32 @@ elsif ($opt_b) {
" virDomainSnapshotFree(snapshot);\n" .
" if (dom)\n" .
" virDomainFree(dom);");
- } elsif ($args_member =~ m/^(remote_string|remote_nonnull_string|remote_uuid|opaque) (\S+)<\S+>;/) {
+ } elsif ($args_member =~ m/^(?:remote_string|remote_uuid) (\S+)<\S+>;/) {
if (! @args_list) {
push(@args_list, "conn");
}
- if ($call->{ProcName} eq "SecretSetValue") {
- push(@args_list, "(const unsigned char *)args->$2.$2_val");
- } elsif ($call->{ProcName} eq "CPUBaseline") {
- push(@args_list, "(const char **)args->$2.$2_val");
- } else {
- push(@args_list, "args->$2.$2_val");
+ push(@args_list, "args->$1.$1_val");
+ push(@args_list, "args->$1.$1_len");
+ } elsif ($args_member =~ m/^(?:opaque|remote_nonnull_string) (\S+)<\S+>;(.*)$/) {
+ if (! @args_list) {
+ push(@args_list, "conn");
+ }
+
+ my $cast = "";
+ my $arg_name = $1;
+ my $annotation = $2;
+
+ if ($annotation ne "") {
+ if ($annotation =~ m/\s*\/\*\s*(.*)\s*\*\//) {
+ $cast = $1;
+ } else {
+ die "malformed cast annotation for argument: $args_member";
+ }
}
- push(@args_list, "args->$2.$2_len");
+ push(@args_list, "${cast}args->$arg_name.${arg_name}_val");
+ push(@args_list, "args->$arg_name.${arg_name}_len");
} elsif ($args_member =~ m/^(?:unsigned )?int (\S+)<\S+>;/) {
if (! @args_list) {
push(@args_list, "conn");
@@ -998,37 +1010,63 @@ elsif ($opt_k) {
} elsif ($args_member =~ m/^remote_string (\S+);/) {
push(@args_list, "const char *$1");
push(@setters_list, "args.$1 = $1 ? (char **)&$1 : NULL;");
- } elsif ($args_member =~ m/^remote_nonnull_string (\S+)<(\S+)>;/) {
- push(@args_list, "const char **$1");
- push(@args_list, "unsigned int ${1}len");
- push(@setters_list, "args.$1.${1}_val = (char **)$1;");
- push(@setters_list, "args.$1.${1}_len = ${1}len;");
- push(@args_check_list, { name => "\"$1\"", arg => "${1}len", limit => $2 });
+ } elsif ($args_member =~ m/^remote_nonnull_string (\S+)<(\S+)>;(.*)$/) {
+ my $type_name = "const char **";
+ my $arg_name = $1;
+ my $limit = $2;
+ my $annotation = $3;
+
+ if ($annotation ne "") {
+ if ($annotation =~ m/\s*\/\*\s*\((.*)\)\s*\*\//) {
+ $type_name = $1;
+ } else {
+ die "malformed cast annotation for argument: $args_member";
+ }
+ }
+
+ push(@args_list, "$type_name$arg_name");
+ push(@args_list, "unsigned int ${arg_name}len");
+ push(@setters_list, "args.$arg_name.${arg_name}_val = (char **)$arg_name;");
+ push(@setters_list, "args.$arg_name.${arg_name}_len = ${arg_name}len;");
+ push(@args_check_list, { name => "\"$arg_name\"", arg => "${arg_name}len", limit => $2 });
} elsif ($args_member =~ m/^remote_nonnull_string (\S+);/) {
push(@args_list, "const char *$1");
push(@setters_list, "args.$1 = (char *)$1;");
- } elsif ($args_member =~ m/^(remote_string|opaque) (\S+)<(\S+)>;/) {
- my $type_name = $1;
- my $arg_name = $2;
- my $limit = $3;
+ } elsif ($args_member =~ m/^opaque (\S+)<(\S+)>;(.*)$/) {
+ my $type_name = "const char *";
+ my $arg_name = $1;
+ my $limit = $2;
+ my $annotation = $3;
+
+ if ($annotation ne "") {
+ if ($annotation =~ m/\s*\/\*\s*\((.*)\)\s*\*\//) {
+ $type_name = $1;
+ } else {
+ die "malformed cast annotation for argument: $args_member";
+ }
+ }
+
+ push(@args_list, "$type_name$arg_name");
if ($call->{ProcName} eq "SecretSetValue") {
- push(@args_list, "const unsigned char *$arg_name");
+ # SPECIAL: virSecretSetValue uses size_t instead of int
push(@args_list, "size_t ${arg_name}len");
- } elsif ($call->{ProcName} eq "DomainPinVcpu") {
- push(@args_list, "unsigned char *$arg_name");
- push(@args_list, "int ${arg_name}len");
- } elsif ($call->{ProcName} eq "DomainPinVcpuFlags") {
- push(@args_list, "unsigned char *$arg_name");
- push(@args_list, "int ${arg_name}len");
} else {
- push(@args_list, "const char *$arg_name");
push(@args_list, "int ${arg_name}len");
}
push(@setters_list, "args.$arg_name.${arg_name}_val = (char *)$arg_name;");
push(@setters_list, "args.$arg_name.${arg_name}_len = ${arg_name}len;");
push(@args_check_list, { name => "\"$arg_name\"", arg => "${arg_name}len", limit => $limit });
+ } elsif ($args_member =~ m/^remote_string (\S+)<(\S+)>;/) {
+ my $arg_name = $1;
+ my $limit = $2;
+
+ push(@args_list, "const char *$arg_name");
+ push(@args_list, "int ${arg_name}len");
+ push(@setters_list, "args.$arg_name.${arg_name}_val = (char *)$arg_name;");
+ push(@setters_list, "args.$arg_name.${arg_name}_len = ${arg_name}len;");
+ push(@args_check_list, { name => "\"$arg_name\"", arg => "${arg_name}len", limit => $limit });
} elsif ($args_member =~ m/^((?:unsigned )?int) (\S+)<(\S+)>;/) {
my $type_name = $1;
my $arg_name = $2;
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 0aa3dfb..a77fd81 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -357,7 +357,10 @@ struct remote_node_get_memory_stats {
* If the 'remote_CALL_ret' maps to a struct in the public API then it is
* also filled via call-by-reference and must be annotated with a
* insert@<offset> comment to indicate the offset in the parameter list of
- * the function to be called. */
+ * the function to be called.
+ *
+ * Dynamic opaque and remote_nonnull_string arrays can be annotated with an
+ * optional typecast */
struct remote_open_args {
/* NB. "name" might be NULL although in practice you can't
@@ -890,13 +893,13 @@ struct remote_domain_get_vcpus_flags_ret {
struct remote_domain_pin_vcpu_args {
remote_nonnull_domain dom;
unsigned int vcpu;
- opaque cpumap<REMOTE_CPUMAP_MAX>;
+ opaque cpumap<REMOTE_CPUMAP_MAX>; /* (unsigned char *) */
};
struct remote_domain_pin_vcpu_flags_args {
remote_nonnull_domain dom;
unsigned int vcpu;
- opaque cpumap<REMOTE_CPUMAP_MAX>;
+ opaque cpumap<REMOTE_CPUMAP_MAX>; /* (unsigned char *) */
unsigned int flags;
};
@@ -1701,7 +1704,7 @@ struct remote_secret_get_xml_desc_ret {
struct remote_secret_set_value_args {
remote_nonnull_secret secret;
- opaque value<REMOTE_SECRET_VALUE_MAX>;
+ opaque value<REMOTE_SECRET_VALUE_MAX>; /* (const unsigned char *) */
unsigned int flags;
};
@@ -1819,7 +1822,7 @@ struct remote_cpu_compare_ret {
struct remote_cpu_baseline_args {
- remote_nonnull_string xmlCPUs<REMOTE_CPU_BASELINE_MAX>;
+ remote_nonnull_string xmlCPUs<REMOTE_CPU_BASELINE_MAX>; /* (const char **) */
unsigned int flags;
};
@@ -2182,7 +2185,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23, /* autogen autogen */
REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24, /* autogen autogen */
REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25, /* autogen autogen */
- REMOTE_PROC_DOMAIN_PIN_VCPU = 26, /* skipgen autogen */
+ REMOTE_PROC_DOMAIN_PIN_VCPU = 26, /* autogen autogen */
REMOTE_PROC_DOMAIN_REBOOT = 27, /* autogen autogen */
REMOTE_PROC_DOMAIN_RESUME = 28, /* autogen autogen */
REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29, /* autogen autogen */
@@ -2401,7 +2404,7 @@ enum remote_procedure {
REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222, /* autogen autogen */
REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223, /* skipgen autogen */
REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225, /* skipgen autogen */
+ REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225, /* autogen autogen */
REMOTE_PROC_DOMAIN_SEND_KEY = 226, /* autogen autogen */
REMOTE_PROC_NODE_GET_CPU_STATS = 227, /* skipgen skipgen */
REMOTE_PROC_NODE_GET_MEMORY_STATS = 228, /* skipgen skipgen */
--
1.7.0.4
13 years, 5 months
[libvirt] [PATCH] Fix preprocessor indentation in nodeinfo.c
by Matthias Bolte
---
I'm pushing this under the build breaker rule.
src/nodeinfo.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index c6dbb84..9e0f906 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -685,23 +685,23 @@ int nodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
return -1;
}
} else {
-#if HAVE_NUMACTL
+# if HAVE_NUMACTL
if (numa_available() < 0) {
-#endif
+# endif
nodeReportError(VIR_ERR_NO_SUPPORT,
"%s", _("NUMA not supported on this host"));
return -1;
-#if HAVE_NUMACTL
+# if HAVE_NUMACTL
}
-#endif
+# endif
-#if HAVE_NUMACTL
+# if HAVE_NUMACTL
if (cellNum > numa_max_node()) {
nodeReportError(VIR_ERR_INVALID_ARG, "%s",
_("Invalid cell number"));
return -1;
}
-#endif
+# endif
if (virAsprintf(&meminfo_path, "%s/node%d/meminfo",
NODE_SYS_PATH, cellNum) < 0) {
--
1.7.0.4
13 years, 5 months
Re: [libvirt] [libvirt-php] - zend_mm_heap corrupted
by Michal Novotny
Hi Henrik,
what exactly did you to do to get the error page? I never run into those
in any version I'm having in libvirt-php git repository since I always
check but it may be Apache & PHP version connected and I'm running it as
a module. Could you please provide me more information about this or at
least provide me the results of `make check` command in the libvirt-php
directory as cloned from git?
Please note that to try to `make check` you need to install it first so
you need to do `make`, then `(sudo) make install` and then `make check`.
The `make check` command is running the tests and you shouldn't be
seeing any segmentation fault there otherwise there's some bug in the
code which obviously seems to be reproducible only on your environment
since it's not reproducible on my environment at all.
All the tests pass in my case:
$ make check
...
Making check in tests
make[1]: Entering directory `tests'
./runtests.sh
Test test-connect.phpt has been completed successfully
Test test-version-check.phpt has been completed successfully
Test test-version-get.phpt has been completed successfully
Test test-domain-define-undefine.phpt has been completed successfully
Test test-domain-define-create-destroy.phpt has been completed successfully
Test test-domain-create.phpt has been completed successfully
Test test-domain-create-and-get-xpath.phpt has been completed successfully
Test test-domain-create-and-coredump.phpt has been completed successfully
Test test-domain-snapshot.phpt has been completed successfully
All tests passed successfully
...
$
Could you please provide me with the Apache logs as well and also the
Apache and PHP version numbers?
You mention Drupal, did you integrate libvirt-php functionality into
Drupal? The backtraces using xdebug should be sufficient. Please provide
me with them.
Thanks,
Michal
On 06/18/2011 06:51 PM, Henrik Jönsson wrote:
>
> I basicly just got an erronous page load and checked the apache logs.
> After some further testing it seems the problem only occurs when ran
> within Drupal and not when ran as a standalone script. I will do some
> further testing in a different cms to see if it is Drupal specific. I
> can also do backtraces with xdebug and coredump apache if that will help.
>
> Best Regards
>
> /Henrik
> Den 15 jun 2011 09:03 skrev "Michal Novotny" <minovotn(a)redhat.com
> <mailto:minovotn@redhat.com>>:
> >
> > Hi Henrik,
> > thanks a lot for your observations. How did you find out about the PHP
> > memory usage and about zend_mm_heap corrupted at the first place?
> >
> > This could help me debug this issue.
> >
> > Thanks,
> > Michal
> >
> > On 06/12/2011 06:05 PM, Henrik Jönsson wrote:
> > > [libvirt-php]
> > >
> > > Hello!
> > >
> > > I am using Libvirt-php for a private project, i do however have a
> > > problem that seems to occur when i call any function that returns a
> > > domain resource. I have gotten 3 different errors so far. First i had
> > > a problem with php memory usage going extreme(2gb), then i have had
> > > some apache segmentation fault ending up in apache killing the
> > > process. I have also had zend_mm_heap corrupted which i think is the
> > > most common one.
> > >
> > > I have tried with Ubuntu 10.04, 10.10 and 11.04 repository versions of
> > > Apache. Other than that i am using libvirt version 0.9.1 and
> > > libvirt-php version 0.4.1. This is within the contexts of Drupal as i
> > > am using the code in a Drupal module.
> > >
> > > I have checked out the source code for libvirt-php but since i am no
> > > C/C++ developer i have a hard time figuring out what the issue might
> > > be. Some help would be greatly appreciated. :)
> > >
> > > Best Regards!
> > >
> > > /Henrik
> > >
> > >
> > > --
> > > libvir-list mailing list
> > > libvir-list(a)redhat.com <mailto:libvir-list@redhat.com>
> > > https://www.redhat.com/mailman/listinfo/libvir-list
> >
> >
> > --
> > Michal Novotny <minovotn(a)redhat.com <mailto:minovotn@redhat.com>>, RHCE
> > Virtualization Team (xen userspace), Red Hat
> >
>
--
Michal Novotny <minovotn(a)redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat
13 years, 5 months
[libvirt] [PATCH] Move XenAPI driver to correct spec file section
by Matthias Bolte
The XenAPI driver works like the ESX and PHyp driver by using its
own HTTPS based remote protocol.
---
libvirt.spec.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 97ebd65..75b145a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -44,13 +44,13 @@
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
%define with_uml 0%{!?_without_uml:%{server_drivers}}
-%define with_xenapi 0%{!?_without_xenapi:%{server_drivers}}
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
# Then the hypervisor drivers that talk a native remote protocol
%define with_phyp 0%{!?_without_phyp:1}
%define with_esx 0%{!?_without_esx:1}
+%define with_xenapi 0%{!?_without_xenapi:1}
# Then the secondary host drivers
%define with_network 0%{!?_without_network:%{server_drivers}}
--
1.7.0.4
13 years, 5 months
[libvirt] [PATCH v4 RESEND 0/3] Add filesystem pool formatting
by Osier Yang
Hi,
The following patches add the ability to format filesystem pools when
the appropriate flags are passed to pool build. This patch set introduces
two new flags:
VIR_STORAGE_POOL_BUILD_NO_OVERWRITE causes the build to probe for an
existing pool of the requested type. The build operation formats the
filesystem if it does not find an existing filesystem of that type.
VIR_STORAGE_POOL_BUILD_OVERWRITE causes the build to format unconditionally.
[PATCH 1/3] storage: Add mkfs and libblkid to build system
[PATCH 2/3] storage: Add fs pool formatting
[PATCH 3/3] storage: Add virsh support for fs pool formating
Regards
Osier
13 years, 5 months
[libvirt] [PATCH] build: fix building error when building without libvirtd
by Wen Congyang
When building libvirt without libvirtd, we will receive the following error
message:
make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/tools'
CC virsh-virsh.o
CC virsh-console.o
GEN virt-xml-validate
GEN virt-pki-validate
CCLD virsh
../src/.libs/libvirt.so: undefined reference to `numa_available'
../src/.libs/libvirt.so: undefined reference to `numa_max_node'
collect2: ld returned 1 exit status
The reason is that: we check numactl only when building qemu driver, and qemu
driver will not be built when bulding without libvirtd. So with_numactl's
value is check and we will not link libnuma.so.
In the other function, we call numa_available() and numa_max_node() only
when HAVE_NUMACTL is 1. We should do the same check in the function nodeGetMemoryStats().
---
src/nodeinfo.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 647cb1e..c6dbb84 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -685,17 +685,23 @@ int nodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
return -1;
}
} else {
+#if HAVE_NUMACTL
if (numa_available() < 0) {
+#endif
nodeReportError(VIR_ERR_NO_SUPPORT,
"%s", _("NUMA not supported on this host"));
return -1;
+#if HAVE_NUMACTL
}
+#endif
+#if HAVE_NUMACTL
if (cellNum > numa_max_node()) {
nodeReportError(VIR_ERR_INVALID_ARG, "%s",
_("Invalid cell number"));
return -1;
}
+#endif
if (virAsprintf(&meminfo_path, "%s/node%d/meminfo",
NODE_SYS_PATH, cellNum) < 0) {
--
1.7.1
13 years, 5 months
[libvirt] [PATCH v3 0/3] add support for changing blkio parameters for inactive domains
by Hu Tao
This series enables user to change blkio parameters for inactive
domains from virsh command line.
CHANGES:
v2-v3:
- based on new macros VIR_DOMAIN_AFFECT_XXX
Hu Tao (3):
Add new parameters for blkiotune
update qemuDomainGetBlkioParameters to use flags
Update qemuDomainSetBlkioParameters to use flags
src/qemu/qemu_driver.c | 250 ++++++++++++++++++++++++++++++++++--------------
tools/virsh.c | 26 +++++-
tools/virsh.pod | 7 ++
3 files changed, 206 insertions(+), 77 deletions(-)
--
1.7.3.1
13 years, 5 months