[libvirt] [PATCH] tools: rename 'socket' to 'sockpath'
by Daniel P. Berrange
A variable named 'socket' clashes with the function of the same
name, causing build failures due to warnings on some platforms.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as CI build fix
tools/virsh-domain.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 935ef8acd..512804ccc 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10949,7 +10949,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
char *listen_addr = NULL;
int port, tls_port = 0;
char *type_conn = NULL;
- char *socket = NULL;
+ char *sockpath = NULL;
char *passwd = NULL;
char *output = NULL;
const char *scheme[] = { "vnc", "spice", "rdp", NULL };
@@ -11030,17 +11030,17 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
VIR_FREE(xpath);
if (STREQ_NULLABLE(type_conn, "socket")) {
- if (!socket) {
+ if (!sockpath) {
if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "listen/@socket") < 0)
goto cleanup;
- socket = virXPathString(xpath, ctxt);
+ sockpath = virXPathString(xpath, ctxt);
VIR_FREE(xpath);
}
}
- if (!port && !tls_port && !socket)
+ if (!port && !tls_port && !sockpath)
continue;
if (!listen_addr) {
@@ -11098,7 +11098,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
VIR_FREE(xpath);
/* Build up the full URI, starting with the scheme */
- if (socket)
+ if (sockpath)
virBufferAsprintf(&buf, "%s+unix://", scheme[iter]);
else
virBufferAsprintf(&buf, "%s://", scheme[iter]);
@@ -11108,17 +11108,17 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
virBufferAsprintf(&buf, ":%s@", passwd);
/* Then host name or IP */
- if (!listen_addr && !socket)
+ if (!listen_addr && !sockpath)
virBufferAddLit(&buf, "localhost");
- else if (!socket && strchr(listen_addr, ':'))
+ else if (!sockpath && strchr(listen_addr, ':'))
virBufferAsprintf(&buf, "[%s]", listen_addr);
- else if (socket)
- virBufferAsprintf(&buf, "%s", socket);
+ else if (sockpath)
+ virBufferAsprintf(&buf, "%s", sockpath);
else
virBufferAsprintf(&buf, "%s", listen_addr);
/* Free socket to prepare the pointer for the next iteration */
- VIR_FREE(socket);
+ VIR_FREE(sockpath);
/* Add the port */
if (port) {
@@ -11177,7 +11177,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
cleanup:
VIR_FREE(xpath);
VIR_FREE(type_conn);
- VIR_FREE(socket);
+ VIR_FREE(sockpath);
VIR_FREE(passwd);
VIR_FREE(listen_addr);
VIR_FREE(output);
--
2.13.3
7 years, 4 months
[libvirt] Release of libvirt-3.6.0
by Daniel Veillard
As planned I tagged the release in git and generated signed tarball and rpms
for the release, they can be found at the usual place:
ftp://libvirt.org/libvirt/
I also cut a libvirt-python-3.6.0 release, it is virtually identical to
3.5.0 except for the version bump (i.e. no commits) available at
ftp://libvirt.org/libvirt/python/
Version 3.6.0 seems to be a reasonably sized release, with a lot of QEmu
related commit, and a balance of features, improvements and bug fixes:
New features:
- hyperv: Implement virDomainSetMemory and virDomainSendKey APIs
- qemu: Support multiple PHBs for pSeries guests
pSeries guests can now have multiple PHBs (PCI Host Bridges), which
show up as separate PCI domains in the guest. To create additional
PHBs, simply add PCI controllers with model pci-root to the guest
configuration.
- qemu: Isolate hostdevs on pSeries guests
To enable better error reporting and recovery, unrelated hostdevs will
now be automatically isolated on pSeries guests by placing them on
separate PHBs (PCI Host Bridges).
Improvements:
- qemu: platform serial devices can now use chardev features
QEMU VMs that depend on platform serial devices can now use QEMU's
-chardev option, which enables access to advanced features like log
file configuration. This applies to the default serial devices for arm,
aarch64, and some ppc configurations.
- Require use of GCC 4.4 or Clang compilers
We only ever test libvirt with GCC or Clang (which provides a GCC
compatible compilation environment). Between them, these compilers
cover every supported operating system platform, including Windows.
- qemu: shared disks with directsync cache should be safe for migration
At present shared disks can be migrated with either readonly or
cache=none. But cache=directsync should be safe for migration, because
both cache=directsync and cache=none don't use the host page cache, and
cache=direct write through qemu block layer cache.
- Handle hotplug change on VLAN configuration using OVS
Libvirt was taught to handle VLAN change for running OVS interface.
Bug fixes:
- qemu: Use vCPU 'node-id' property and pass it back to qemu
vCPU properties gathered from query-hotpluggable-cpus need to be passed
back to QEMU. As QEMU did not use the node-id property until now and
libvirt forgot to pass it back properly (it was parsed but not passed
around) we did not honor this.
- Miscellaneous stream fixes
After introducing sparse stream features there were still some known
bugs left. Those are fixed in this release.
- qemu: Miscellaneous domain NS fixes
Libvirt starts qemu domains in separate Linux namespaces for a while
now. However, there were still some bugs lingering. For instance
libvirt did not know how to handle file based bind mounts.
- Various CPU driver improvements
There were some minor bugs when using 'host-model' CPU.
Thanks everybody for your contributions to this release, be it with patches,
reviews, ideas, bug reports, documentation, etc ...
Enjoy the release !
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
7 years, 4 months
[libvirt] [libvirt-php PATCH 0/7] add bindings for NWFilter APIs
by Dawid Zamirski
Hello,
This series adds support for libvirt's virNWFilter* APIs. Since it
introduces new resource type, I took the opportunity to cleanup the
driver code a little:
* in patches 1-3: added macros to take care of the differences in how
PHP5 and PHP7 handle resource types.
* in patch 4: libvirt_doman_get_connect was segfaulting when called
multiple times because it was not bumping reference count on the
resource it was returning to the calling code.
* in patch 5: added a macro to take care of the differences in how PHP5
and PHP7 initialize arrays.
* patches 6 and 7: implement the missing binding to NWFilter APIs.
Dawid Zamirski (7):
move macros to header file.
add wrappers for PHP resource handling.
update code to use resource handling macros
fix libvirt_doman_get_connect implementation.
add and use VIRT_ARRAY_INIT macro
add nwfilter resource type
implement NWFilter API bindings.
src/libvirt-php.c | 923 +++++++++++++++++++++++++++++++-----------------------
src/libvirt-php.h | 150 ++++++++-
2 files changed, 672 insertions(+), 401 deletions(-)
--
2.13.0
7 years, 4 months
[libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool
by Vasiliy Tolstov
When using remote attached disks like srp/iser its useful to
auto activate volumes list and refresh its metadata because volume
may be created outside of libvirt and on different node.
Vasiliy Tolstov (1):
activate and refresh logical volumes while refreshing logical pool
src/storage/storage_backend_logical.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--
2.9.3
7 years, 4 months
[libvirt] [PATCH v2] tools: virsh: Adding unix socket support to 'domdisplay' command.
by Julio Faracco
This commit adds the unix socket URL support to 'domdisplay' command.
Before, even if an user was using unix socket to define a spice graphics,
the command 'domdisplay' showed that the settings were not supported. Now,
the command shows the proper URL: spice+unix://foo/bar.sock.
Settings:
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<graphics type='spice'>
<listen type='socket' socket='/tmp/spice.sock'/>
</graphics>
Before:
virsh # domdisplay --all Windows7
vnc://127.0.0.1:0
After:
virsh # domdisplay --all Windows7
vnc://127.0.0.1:0
spice+unix:///tmp/spice.sock
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336720
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
tools/virsh-domain.c | 52 +++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 41 insertions(+), 11 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 0684979..935ef8a 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10948,6 +10948,8 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
char *xpath = NULL;
char *listen_addr = NULL;
int port, tls_port = 0;
+ char *type_conn = NULL;
+ char *socket = NULL;
char *passwd = NULL;
char *output = NULL;
const char *scheme[] = { "vnc", "spice", "rdp", NULL };
@@ -11008,9 +11010,6 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
if (tmp)
tls_port = 0;
- if (!port && !tls_port)
- continue;
-
/* Create our XPATH lookup for the current display's address */
if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "@listen") < 0)
goto cleanup;
@@ -11021,6 +11020,29 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
listen_addr = virXPathString(xpath, ctxt);
VIR_FREE(xpath);
+ /* Create our XPATH lookup for the current spice type. */
+ if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "listen/@type") < 0)
+ goto cleanup;
+
+ /* Attempt to get the type of spice connection */
+ VIR_FREE(type_conn);
+ type_conn = virXPathString(xpath, ctxt);
+ VIR_FREE(xpath);
+
+ if (STREQ_NULLABLE(type_conn, "socket")) {
+ if (!socket) {
+ if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "listen/@socket") < 0)
+ goto cleanup;
+
+ socket = virXPathString(xpath, ctxt);
+
+ VIR_FREE(xpath);
+ }
+ }
+
+ if (!port && !tls_port && !socket)
+ continue;
+
if (!listen_addr) {
/* The subelement address - <listen address='xyz'/> -
* *should* have been automatically backfilled into its
@@ -11035,11 +11057,9 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
listen_addr = virXPathString(xpath, ctxt);
VIR_FREE(xpath);
- }
-
- /* If listen_addr is 0.0.0.0 or [::] we should try to parse URI and set
- * listen_addr based on current URI. */
- if (listen_addr) {
+ } else {
+ /* If listen_addr is 0.0.0.0 or [::] we should try to parse URI and set
+ * listen_addr based on current URI. */
if (virSocketAddrParse(&addr, listen_addr, AF_UNSPEC) > 0 &&
virSocketAddrIsWildcard(&addr)) {
@@ -11078,20 +11098,28 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
VIR_FREE(xpath);
/* Build up the full URI, starting with the scheme */
- virBufferAsprintf(&buf, "%s://", scheme[iter]);
+ if (socket)
+ virBufferAsprintf(&buf, "%s+unix://", scheme[iter]);
+ else
+ virBufferAsprintf(&buf, "%s://", scheme[iter]);
/* There is no user, so just append password if there's any */
if (STREQ(scheme[iter], "vnc") && passwd)
virBufferAsprintf(&buf, ":%s@", passwd);
/* Then host name or IP */
- if (!listen_addr)
+ if (!listen_addr && !socket)
virBufferAddLit(&buf, "localhost");
- else if (strchr(listen_addr, ':'))
+ else if (!socket && strchr(listen_addr, ':'))
virBufferAsprintf(&buf, "[%s]", listen_addr);
+ else if (socket)
+ virBufferAsprintf(&buf, "%s", socket);
else
virBufferAsprintf(&buf, "%s", listen_addr);
+ /* Free socket to prepare the pointer for the next iteration */
+ VIR_FREE(socket);
+
/* Add the port */
if (port) {
if (STREQ(scheme[iter], "vnc")) {
@@ -11148,6 +11176,8 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
cleanup:
VIR_FREE(xpath);
+ VIR_FREE(type_conn);
+ VIR_FREE(socket);
VIR_FREE(passwd);
VIR_FREE(listen_addr);
VIR_FREE(output);
--
2.7.4
7 years, 4 months
[libvirt] [PATCH 0/2] Fix two valgrind problems
by Michal Privoznik
Ideally, these would go into the release (at least 1/2 as it's a
double free). The second one is just a leak so that one can wait
if needed.
Michal Privoznik (2):
virCgroupValidateMachineGroup: Don't free @machinename
virNetDaemonCallInhibit: Call virNetDaemonGotInhibitReply properly
src/rpc/virnetdaemon.c | 17 +++++++++++------
src/util/vircgroup.c | 3 +--
2 files changed, 12 insertions(+), 8 deletions(-)
--
2.13.0
7 years, 4 months
[libvirt] [PATCH] news: Fix typo
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
docs/news.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/news.xml b/docs/news.xml
index caa0363..b25a42f 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -130,7 +130,7 @@
</change>
<change>
<summary>
- qemu: Misceleanous domain NS fixes
+ qemu: Miscellaneous domain NS fixes
</summary>
<description>
Libvirt starts qemu domains in separate Linux namespaces for a while
--
2.7.5
7 years, 4 months