[libvirt] [PATCH] util: Fix missing initializer for agent
by John Ferlan
In virPolkitAgentCreate neglected to initialize agent to NULL. If
there was an error in the pipe, then we jump to error and would have
an issue. Found by coverity.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushing as trivial
src/util/virpolkit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 3d2be61..44f2328 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -166,7 +166,7 @@ virPolkitAgentDestroy(virPolkitAgentPtr agent)
virPolkitAgentPtr
virPolkitAgentCreate(void)
{
- virPolkitAgentPtr agent;
+ virPolkitAgentPtr agent = NULL;
virCommandPtr cmd = virCommandNewArgList(PKTTYAGENT, "--process", NULL);
int pipe_fd[2] = {-1, -1};
struct pollfd pollfd;
--
2.5.0
8 years, 8 months
[libvirt] Libvirt accepted to GSoC
by Michal Privoznik
Dear community,
let me announce great news: Libvirt applied for this year's Google
Summer of Code and got accepted [1]!
You may recall that in previous years we created a joint organisation
with QEMU/KVM folks and participated that way. However, since the number
of libvirt students was growing and usually exceeded number of QEMU or
KVM students combined it started to become more and more obvious that
libvirt should no longer misuse hospitality of QEMU/KVM volunteers and
try on its own. And it worked. In addition, QEMU/KVM organisation has
been accepted too - join me in congratulating them and saying big thank
you for all of the work that they have done for us in those previous
years! The idea of splitting has been discussed here too [2].
What to do next?
You can still propose ideas, and ideally add them to the list [3]. Or if
you don't feel confident enough, drop me an e-mail and I'll take care of
that.
It's until 14th March that students are able to start filling in their
proposals. And this is where this year differs from the previous ones -
the deadline for proposals is 25th March. Without proposal no student
can be accepted to the program. So you may help by spreading the word too.
Happy coding!
Michal
1: https://summerofcode.withgoogle.com/organizations/5982501017223168/
2: https://www.redhat.com/archives/libvir-list/2016-January/msg01076.html
3: http://wiki.libvirt.org/page/Google_Summer_of_Code_2016
8 years, 9 months
[libvirt] [PATCH] Libvirt: Add missing default value for config option max_queued_clients
by Jason J. Herne
Commit 1199edb1d4e3 added config option max_queued_clients and documented the
default value as 1000 but never actually set that value. This patch sets the
default value.
This addresses an issue whereby the following error message is reported if too
many migrations are started simultaneously:
error: End of file while reading data: Ncat: Invalid argument.: Input/output error
The problem is that too many ncat processes are spawned on the destination
system. They all attempt to connect to the libvirt socket. Because the
destination libvirtd cannot respond to the connect requests quickly enough we
overrun the socket's pending connections queue.
Signed-off-by: Jason J. Herne <jjherne(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
daemon/libvirtd-config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemon/libvirtd-config.c b/daemon/libvirtd-config.c
index c31c8b2..7a448f9 100644
--- a/daemon/libvirtd-config.c
+++ b/daemon/libvirtd-config.c
@@ -280,6 +280,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->min_workers = 5;
data->max_workers = 20;
data->max_clients = 5000;
+ data->max_queued_clients = 1000;
data->max_anonymous_clients = 20;
data->prio_workers = 5;
--
1.9.1
8 years, 9 months
[libvirt] [PATCH] docs: Clarify interface/target/@dev docs
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1313314
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
docs/formatdomain.html.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index c54b308..df8c06c 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4507,10 +4507,10 @@ qemu-kvm -net nic,model=? /dev/null
<p>
If no target is specified, certain hypervisors will
automatically generate a name for the created tun device. This
- name can be manually specified, however the name <i>must not
+ name can be manually specified, however the name <i>should not
start with either 'vnet' or 'vif'</i>, which are prefixes
reserved by libvirt and certain hypervisors. Manually specified
- targets using these prefixes will be ignored.
+ targets using these prefixes may be ignored.
</p>
<p>
--
2.7.2
8 years, 9 months
[libvirt] [PATCH v7 0/6] Global domain cpu.cfs_period_us and cpu.cfs_quota_us setup
by Alexander Burluka
This patchset implements an ability to specify values for domain top level
cpu.cfs_period_us and cpu.cfs_quota_us cgroups. These parameters are opt-in
and named "global_period" and "global_quota".
Introduction of these settings gives management applications further
choice of controlling CPU usage.
Changes in v2: add XML validation test
Changes in v3: remove unneccessary cgroup copying
Changes in v4: fix little rebase error
Changes in v5: rebase to version 1.3.1
Changes in v6: remove unnecessary check
Changes in v7: rebase to current master
Alexander Burluka (6):
Add global period definitions
Add global quota parameter necessary definitions
Add error checking on global quota and period
Add global_period and global_quota XML validation test
Implement qemuSetupGlobalCpuCgroup
Implement handling of per-domain bandwidth settings
docs/schemas/domaincommon.rng | 10 +++
include/libvirt/libvirt-domain.h | 32 +++++++
src/conf/domain_conf.c | 37 +++++++++
src/conf/domain_conf.h | 2 +
src/qemu/qemu_cgroup.c | 49 +++++++++++
src/qemu/qemu_cgroup.h | 1 +
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_driver.c | 97 +++++++++++++++++++++-
src/qemu/qemu_process.c | 4 +
tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 +
.../qemuxml2xmloutdata/qemuxml2xmlout-cputune.xml | 2 +
11 files changed, 236 insertions(+), 3 deletions(-)
--
1.8.3.1
8 years, 9 months
[libvirt] [PATCH] qemu: Don't always wait for SPICE to finish migration
by Jiri Denemark
When SPICE graphics is configured for a domain but we did not ask the
client to switch to the destination, we should not wait for
SPICE_MIGRATE_COMPLETED event (which will never come).
https://bugzilla.redhat.com/show_bug.cgi?id=1151723
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_domain.h | 2 ++
src/qemu/qemu_migration.c | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 8359b1a..0144792 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -137,6 +137,8 @@ struct qemuDomainJobObj {
qemuDomainJobInfoPtr current; /* async job progress data */
qemuDomainJobInfoPtr completed; /* statistics data of a recently completed job */
bool abortJob; /* abort of the job requested */
+ bool spiceMigration; /* we asked for spice migration and we
+ * should wait for it to finish */
bool spiceMigrated; /* spice migration completed */
};
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 704e182..64cbffa 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2415,7 +2415,8 @@ qemuMigrationWaitForSpice(virDomainObjPtr vm)
bool wait_for_spice = false;
size_t i = 0;
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION))
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION) ||
+ !priv->job.spiceMigration)
return 0;
for (i = 0; i < vm->def->ngraphics; i++) {
@@ -2789,6 +2790,7 @@ qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver,
QEMU_ASYNC_JOB_MIGRATION_OUT) == 0) {
ret = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress,
port, tlsPort, tlsSubject);
+ priv->job.spiceMigration = !ret;
if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1;
}
--
2.7.2
8 years, 9 months
[libvirt] [PATCH] qemu: Don't try to fetch migration stats on destination
by Jiri Denemark
Migration statistics are not available on the destination host and
starting a query job during incoming migration is not allowed. Trying to
do that would result in
Timed out during operation: cannot acquire state change lock (held
by remoteDispatchDomainMigratePrepare3Params)
error. We should not even try to start the job.
https://bugzilla.redhat.com/show_bug.cgi?id=1278727
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_driver.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 45ff3c0..241de67 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12901,9 +12901,16 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
if (!priv->job.current || !priv->job.current->stats.status)
fetch = false;
- if (fetch &&
- qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
- return -1;
+ if (fetch) {
+ if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("migration statistics are available only on "
+ "the source host"));
+ return -1;
+ }
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ return -1;
+ }
if (!completed &&
!virDomainObjIsActive(vm)) {
--
2.7.2
8 years, 9 months
[libvirt] [PATCH] Fix formatting in remote_protocol-structs
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/remote_protocol-structs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 11048b7..6c1cf5d 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2503,7 +2503,7 @@ struct remote_domain_event_callback_device_added_msg {
remote_nonnull_string devAlias;
};
struct remote_connect_event_connection_closed_msg {
- int reason;
+ int reason;
};
struct remote_connect_get_cpu_model_names_args {
remote_nonnull_string arch;
--
2.7.2
8 years, 9 months
[libvirt] [PATCH] util: Fix build without polkit
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/util/virpolkit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 3bb60a5..3d2be61 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -329,13 +329,13 @@ int virPolkitCheckAuth(const char *actionid ATTRIBUTE_UNUSED,
void
-virPolkitAgentDestroy(virCommandPtr cmd ATTRIBUTE_UNUSED)
+virPolkitAgentDestroy(virPolkitAgentPtr agent ATTRIBUTE_UNUSED)
{
return; /* do nothing */
}
-virCommandPtr
+virPolkitAgentPtr
virPolkitAgentCreate(void)
{
virReportError(VIR_ERR_AUTH_FAILED, "%s",
--
2.7.2
8 years, 9 months