[libvirt] RFC filesystem pool proposal description.
by Olga Krishtal
In this proposal description we would like to introduce a separate pool
type:fspool. Fspool provides and manages filesystems.
Below are listed possible examples of fspool, depending on source type:
volume, directory or network.
Volume fspool uses storage pool volume to reside upon.
<fspool type = 'volume'>
<name>fspool</name>
<uuid>cb07b799-8e03-485c-aaa0-7c88f60b37b0</uuid>
<allocation>0</allocation>
<capacity>0<capacity>
<source>
<pool ='pool name'/>
<volume='volume name'/>
<format type = 'ext4'/> (ext4, zfs - depending on type of volume that is used as a backend).
<source/>
<target>
<path>/path/to/fspool</path>
<permissions>
<mode>0777</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</fspool>
Directory fspool represents a host directory:
<fspool type = 'dir'>
<name>fspool</name>
<uuid>cb07b799-8e03-485c-aaa0-7c88f60b37b0</uuid>
<target>
<path>/path/to/fspool/root</path>
<permissions>
<mode>0777</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</fspool>
Network fspool is similar to previous one, except it is remote:
<fspool type='network'>
<name>fspool</name>
<uuid>b27a72b5-a92e-4e58-a172-a80ba73b30fe</uuid>
<source>
<host name='X.X.X.X'/> - if the pool is not on the host
<dir path='some/directory/exposed/to/our/host'/>
</source>
<target>
<path>/fspool</path>
</target>
</fspool>
basic API for fspool management:
fspool-define
fspool-build
fspool-start
fspool-stop
fspool-destroy
fspool-undefine
Fspools are divided into fs items. Single item is a directory inside the fspool root directory.
Fs item example is listed below:
<fs>
<name>item</name>
<allocation>0</allocation>
<capacity>0<capacity>
<source>fspool='name'</source>
<target>
<path>/fspool</path>
</target>
<permissions>
<mode>0777</mode>
<owner>0</owner>
<group>0</group>
<cgroups> Limits</cgroups>
</permissions>
</fs>
- allocation/capacity - is omitted when fspools type is directory.
- target path is a path to fs item from the fspool root. If it is not
present then the content of item is placed directly in fspool root.
- cgroups can be used in order to manipulate space usage politics.
Fs items will be manipulated via fs API:
fs-define
fs-delete
fs-list
In addition to containers use-cases, fspools are also useful for libvirt itself - they will help store and
easily manage some internal metadata, such as snapshots or internal connection driver information (logs, domain configurations, etc).
Please, take a look and share your opinion.
Olga
8 years, 6 months
[libvirt] [Ceph] blockInfo cannot work with network type disk
by ZhiQiang Fan
Hi devs & users,
The Telemetry service of OpenStack, project code name Ceilometer, is using
libvirt.domain.blockInfo() to get disk's physical, allocation and capacity
information [1]. However, when disk is network type with protocol ceph, the
blockInfo() always fail with: libvirtError: internal error: missing storage
backend for network files using rbd protocol. [2]
After reading some libvirt code, I think it might due to blockInfo() always
assume disk is file backend [3], and file backend doesn't support network
type [4].
I want to know if such limitation is by design?
- If yes, then how should I get the network type disk's physical,
allocation and capacity info?
- If not, is there any plan to implement it?
Thanks!
[1]
https://github.com/openstack/ceilometer/blob/stable/mitaka/ceilometer/com...
[2] https://bugs.launchpad.net/ceilometer/+bug/1457440
[3]
https://github.com/libvirt/libvirt/blob/d6c25c34ef682a69f73f6ec200129e61b...
[4]
https://github.com/libvirt/libvirt/blob/d6c25c34ef682a69f73f6ec200129e61b...
8 years, 6 months
[libvirt] [PATCH] libvirt.spec: remove duplicate files from -docs package
by Daniel P. Berrange
Previous commit moved some lists out of the -devel package
and into the -docs package
commit feffcc03a0d3690dcffd860682dcbaa61d726b39
Author: Cole Robinson <crobinso(a)redhat.com>
Date: Wed Apr 13 10:37:42 2016 -0400
spec: Only pull in API docs with -devel package
What was not realized is that the rule 'libvirt-docs/*'
and ' docs/*.html docs/html docs/*.gif' actually point
to the exact same content. ie, we had previously included
the website HTML in *both* the -docs and -devel packages.
So this change ended up listing the files twice, which
caused RPM to print a load of warnings:
warning: File listed twice: /usr/share/doc/libvirt-docs/html
warning: File listed twice: /usr/share/doc/libvirt-docs/html/32favicon.png
warning: File listed twice: /usr/share/doc/libvirt-docs/html/404.html
warning: File listed twice: /usr/share/doc/libvirt-docs/html/acl.html
warning: File listed twice: /usr/share/doc/libvirt-docs/html/aclpolkit.html
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt.spec.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index f441c51..a24be32 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1956,7 +1956,6 @@ exit 0
%defattr(-, root, root)
%doc AUTHORS ChangeLog.gz NEWS README TODO
%doc libvirt-docs/*
-%doc docs/*.html docs/html docs/*.gif
# API docs
%dir %{_datadir}/gtk-doc/html/libvirt/
--
2.5.5
8 years, 6 months
[libvirt] [libvirt-perl][PATCH] Add VIR_ERR_NO_CLIENT constant
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Changes | 1 +
Virt.xs | 1 +
lib/Sys/Virt/Error.pm | 4 ++++
3 files changed, 6 insertions(+)
diff --git a/Changes b/Changes
index 106b812..5303c0e 100644
--- a/Changes
+++ b/Changes
@@ -8,6 +8,7 @@ Revision history for perl module Sys::Virt
- Add VIR_STORAGE_VOL_PLOOP constant
- Add VIR_MIGRATE_PARAM_COMPRESSION* constants
- Add VIR_MIGRATE_PARAM_PERSIST_XML constant
+ - Add VIR_ERR_NO_CLIENT constant
1.3.3 2016-04-07
diff --git a/Virt.xs b/Virt.xs
index b0c3282..d069abd 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -8530,4 +8530,5 @@ BOOT:
REGISTER_CONSTANT(VIR_ERR_MIGRATE_FINISH_OK, ERR_MIGRATE_FINISH_OK);
REGISTER_CONSTANT(VIR_ERR_AUTH_UNAVAILABLE, ERR_AUTH_UNAVAILABLE);
REGISTER_CONSTANT(VIR_ERR_NO_SERVER, ERR_NO_SERVER);
+ REGISTER_CONSTANT(VIR_ERR_NO_CLIENT, ERR_NO_CLIENT);
}
diff --git a/lib/Sys/Virt/Error.pm b/lib/Sys/Virt/Error.pm
index b54f876..db23f1e 100644
--- a/lib/Sys/Virt/Error.pm
+++ b/lib/Sys/Virt/Error.pm
@@ -792,6 +792,10 @@ Authentication services were not available
Libvirt server was not found
+=item Sys::Virt::Error::ERR_NO_CLIENT
+
+Libvirt client was not found
+
=back
=head1 AUTHORS
--
2.8.1
8 years, 6 months
[libvirt] [PATCH 0/7] Admin API: Add support for client identity info retrieval
by Erik Skultety
This series adds support for client identity retrieval, i.e. information like
remote IP (if connected remotely), uid,gid,pid, as well as username if
connected locally and also information regarding authentication (if used).
The series is rebased on the listing clients series, because it relies on the
gendispatch stuff, so for testing purposes checkout my remote branch
https://github.com/eskultety/libvirt/tree/list-clients-info-disconnect which
also covers the next series about client disconnect.
Erik Skultety (7):
admin: Introduce virAdmServerLookupClient
admin: include: Introduce some client's identity related typed params
macros
virnetsocket: Provide socket address format in a more standard form
virneserverclient: Introduce virNetServerClientHasSASLSession
virnetserverclient: Add an internal method to retrieve client's
identity
admin: Introduce virAdmClientGetInfo API
virt-admin: Introduce command client-info
daemon/admin.c | 59 ++++++++++++++++++
daemon/admin_server.c | 102 +++++++++++++++++++++++++++++++
daemon/admin_server.h | 9 +++
daemon/remote.c | 13 +++-
include/libvirt/libvirt-admin.h | 130 ++++++++++++++++++++++++++++++++++++++++
include/libvirt/virterror.h | 1 +
src/admin/admin_protocol.x | 34 ++++++++++-
src/admin/admin_remote.c | 47 +++++++++++++++
src/admin_protocol-structs | 20 +++++++
src/libvirt-admin.c | 75 +++++++++++++++++++++++
src/libvirt_admin_private.syms | 4 ++
src/libvirt_admin_public.syms | 2 +
src/remote/remote_driver.c | 7 +++
src/rpc/virnetclient.c | 10 ++++
src/rpc/virnetclient.h | 2 +
src/rpc/virnetserver.c | 23 +++++++
src/rpc/virnetserver.h | 3 +
src/rpc/virnetserverclient.c | 48 +++++++++++++++
src/rpc/virnetserverclient.h | 6 ++
src/rpc/virnetsocket.c | 17 +++++-
src/rpc/virnetsocket.h | 2 +
src/util/virerror.c | 6 ++
src/util/virsocketaddr.c | 24 ++++++--
tests/virnetsockettest.c | 10 ++--
tools/virt-admin.c | 91 ++++++++++++++++++++++++++++
25 files changed, 731 insertions(+), 14 deletions(-)
--
2.4.11
8 years, 6 months
[libvirt] [PATCH] daemon: Add VIR_ERR_NO_SERVER and VIR_ERR_NO_CLIENT to daemonErrorLogFilter
by Erik Skultety
Commits 52a2eef9 and 62be5486 forgot to add these errors to daemon's error
whitelist, i.e. in order to avoid log file pollution with errors like "Domain
not found" or "Server not found" in this case, since these events are valid
and expected to occur.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Pushed under trivial rule.
daemon/libvirtd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index f0fdaed..cc5190f 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -333,6 +333,8 @@ static int daemonErrorLogFilter(virErrorPtr err, int priority)
case VIR_ERR_NO_DOMAIN_SNAPSHOT:
case VIR_ERR_OPERATION_INVALID:
case VIR_ERR_NO_DOMAIN_METADATA:
+ case VIR_ERR_NO_SERVER:
+ case VIR_ERR_NO_CLIENT:
return VIR_LOG_DEBUG;
}
--
2.4.11
8 years, 6 months
[libvirt] [PATCH v2] send default USB controller in xml to destination during migration
by Shivaprasad G Bhat
The default USB controller is not sent to destination as the older versions
of libvirt(0.9.4 or earlier as I see in commit log of 409b5f54) didn't
support them. For some archs where the support started much later can
safely send the USB controllers without this worry. So, send the controller
to destination for all archs except x86. Moreover this is not very applicable
to x86 as the USB controller has model ich9_ehci1 on q35 and for pc-i440fx,
there cant be any slots before USB as it is fixed on slot 1.
The patch fixes a bug that, if the USB controller happens to occupy
a slot after disks/interfaces and one of them is hot-unplugged, then
the default USB controller added on destination takes the smallest slot
number and that would lead to savestate mismatch and migration
failure. Seen and verified on PPC64.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_domain.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6262bfe..963ff35 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2599,7 +2599,11 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
usb = def->controllers[i];
}
}
- if (usb && usb->idx == 0 && usb->model == -1) {
+ /* The original purpose of the check was the migration compatibility
+ * with libvirt <= 0.9.4. Limitation doesn't apply to other archs
+ * and can cause problems on PPC64.
+ */
+ if (ARCH_IS_X86(def->os.arch) && usb && usb->idx == 0 && usb->model == -1) {
VIR_DEBUG("Removing default USB controller from domain '%s'"
" for migration compatibility", def->name);
toremove++;
8 years, 6 months
[libvirt] [PATCH] dist: ln(1) is not guaranteed to have a '-f' option
by Andrea Bolognani
According to the autoconf manual, using '$(LN_S) -f' is not
portable; remove the target explicitly beforehand to work around
this limitation.
Adjust some slightly awkward indentation while at it.
---
src/Makefile.am | 3 ++-
tools/Makefile.am | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index c639e37..b71e694 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3079,7 +3079,8 @@ if WITH_NETWORK
$(DESTDIR)$(confdir)/qemu/networks/default.xml && \
rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \
- $(LN_S) -f ../default.xml default.xml )
+ rm -f default.xml && \
+ $(LN_S) ../default.xml default.xml )
endif WITH_NETWORK
uninstall-local:: uninstall-init uninstall-systemd
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e963b91..c5a6a0d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -424,7 +424,8 @@ NSS_SO_VER = 1
install-exec-hook:
( cd $(DESTDIR)$(libdir) && \
- $(LN_S) -f libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER) )
+ rm -f nss_libvirt.so.$(NSS_SO_VER) && \
+ $(LN_S) libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER) )
uninstall-local:
-rm -f $(DESTDIR)$(libdir)/nss_libvirt.so.$(NSS_SO_VER)
--
2.5.5
8 years, 6 months
[libvirt] [PATCH v2 0/3] Add support for virtio-scsi-{pci, ccw} iothread support
by John Ferlan
v1 here:
http://www.redhat.com/archives/libvir-list/2016-May/msg00077.html
(patches 1-4 were pushed already, the following are patches 5-7)
Changes:
Patch 1:
- Clean up docs, use 1.3.5 as the version instead of 1.3.4.
- Use post parse callback virDomainDeviceDefPostParseInternal
to handle the controller check if iothread's are set on a
controller (rather than during Controller Def parsing
Patch 2:
- Clean up commit message
- Use the _() for message
- Use 'target' not 'dst' in message (more specific)
Patch 3:
- No changes
John Ferlan (3):
conf: Add support for virtio-scsi iothreads
qemu: Use switch for qemuCheckIOThreads
qemu: Add 'iothread' to command line for supported controller
docs/formatdomain.html.in | 21 ++++
docs/schemas/domaincommon.rng | 3 +
src/conf/domain_conf.c | 32 +++++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 115 ++++++++++++++++++---
.../qemuxml2argv-iothreads-virtio-scsi-ccw.args | 28 +++++
.../qemuxml2argv-iothreads-virtio-scsi-ccw.xml | 39 +++++++
.../qemuxml2argv-iothreads-virtio-scsi-pci.args | 32 ++++++
.../qemuxml2argv-iothreads-virtio-scsi-pci.xml | 47 +++++++++
tests/qemuxml2argvtest.c | 6 ++
.../qemuxml2xmlout-iothreads-virtio-scsi-ccw.xml | 40 +++++++
.../qemuxml2xmlout-iothreads-virtio-scsi-pci.xml | 51 +++++++++
tests/qemuxml2xmltest.c | 7 ++
13 files changed, 409 insertions(+), 13 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-pci.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-pci.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-virtio-scsi-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-virtio-scsi-pci.xml
--
2.5.5
8 years, 6 months
[libvirt] [PATCH REPOST 0/7] Add support for virtio-scsi-{pci, ccw} iothread support
by John Ferlan
Repost of :
http://www.redhat.com/archives/libvir-list/2016-April/msg01539.html
Essentially the same patches as previous, but refreshed to current HEAD
of '6620cd1ef'. I did remove patch 5 since it's not necessary. Also
had to adjust one test to add the new default panic device for ccw.
John Ferlan (7):
qemu: Add capability for virtio-scsi iothreads
docs: clarify disk iothread support
docs: Reformat the Controllers description
conf: Move virDomainControllerModelTypeToString
conf: Add support for virtio-scsi iothreads
qemu: Use switch for qemuCheckIOThreads
qemu: Add 'iothread' to command line for supported controller
docs/formatdomain.html.in | 87 ++++++---
docs/schemas/domaincommon.rng | 3 +
src/conf/domain_conf.c | 54 ++++--
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 9 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 115 ++++++++++--
tests/qemucapabilitiesdata/caps_1.2.2-1.replies | 80 +++++----
tests/qemucapabilitiesdata/caps_1.3.1-1.replies | 80 +++++----
tests/qemucapabilitiesdata/caps_1.4.2-1.replies | 88 +++++----
tests/qemucapabilitiesdata/caps_1.5.3-1.replies | 88 +++++----
tests/qemucapabilitiesdata/caps_1.6.0-1.replies | 88 +++++----
tests/qemucapabilitiesdata/caps_1.6.50-1.replies | 88 +++++----
tests/qemucapabilitiesdata/caps_2.1.1-1.replies | 88 +++++----
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.4.0-1.replies | 177 ++++++++++++++----
tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.5.0-1.replies | 197 +++++++++++++++++----
tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-1.replies | 192 ++++++++++++++++----
.../qemuxml2argv-iothreads-virtio-scsi-ccw.args | 28 +++
.../qemuxml2argv-iothreads-virtio-scsi-ccw.xml | 39 ++++
.../qemuxml2argv-iothreads-virtio-scsi-pci.args | 32 ++++
.../qemuxml2argv-iothreads-virtio-scsi-pci.xml | 47 +++++
tests/qemuxml2argvtest.c | 6 +
.../qemuxml2xmlout-iothreads-virtio-scsi-ccw.xml | 40 +++++
.../qemuxml2xmlout-iothreads-virtio-scsi-pci.xml | 51 ++++++
tests/qemuxml2xmltest.c | 7 +
28 files changed, 1308 insertions(+), 381 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-pci.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-pci.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-virtio-scsi-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-virtio-scsi-pci.xml
--
2.5.5
8 years, 6 months