[libvirt] [RFC] proposal for libiscsi storage pool
by Clementine Hayat
Hi everybody!
I am starting this thread to discuss a new storage pool backend for
iSCSI using libiSCSI.
There already is an iSCSI backend, however, it uses iscsiadm binary to
execute the desired operation. The binary can be spawned multiple
times during single execution of an API. This is suboptimal.
Moreover the iscsi storage pool is mapped by the kernel into a block
device in /dev/. Iscsiadm makes operations directly on that block
device. Libiscsi on the other hand is sending the commands directly to
a remote iscsi portal. According to that, to be able to use a storage
pool using libiscsi we have to implement the storage pool backend
entirely.
What we would have:
Pool XML using iscsiadm:
<pool type="iscsi" mode="host">
<name>virtimages</name>
<source>
<host name="iscsi.example.com"/>
<device path="iqn.2013-06.com.example:iscsi-pool"/>
<auth type='chap' username='myuser'>
<secret usage='libvirtiscsi'/>
</auth>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
Pool XML using libiscsi:
<pool type="iscsi" mode="direct">
<name>virtimages</name>
<source>
<host name="iscsi.example.com"/>
<device path="iqn.2013-06.com.example:iscsi-pool"/>
<auth type='chap' username='myuser'>
<secret usage='libvirtiscsi'/>
</auth>
</source>
</pool>
The change that occurs is having a direct mode that will lead to the
libiscsi backend and the host mode that will lead to the actual
backend using iscsiadm.
To tie the backend to the front was thinking about adding something
like VIR_STORAGE_POOL_LIBISCSI to storage_conf.
About the domain XML only accept:
<disk type='volume' device='disk'>
<driver name='qemu' type='raw'/>
<source pool='iscsi-pool' volume='unit:0:0:2' mode='direct'/>
<target dev='vdc' bus='virtio'/>
</disk>
would be great using a switch case on VIR_STORAGE_POOL_LIBISCSI inside
domain_conf.
Best regards,
--
Clementine Hayat
6 years, 5 months
[libvirt] [PATCH] run: Fix LIBVIRTD_PATH
by Cole Robinson
It wasn't updated when libvirt was moved from daemon/ to src/
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
run.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run.in b/run.in
index cbef61a674..06ad54b62b 100644
--- a/run.in
+++ b/run.in
@@ -63,7 +63,7 @@ export PKG_CONFIG_PATH
export LIBVIRT_DRIVER_DIR="$b/src/.libs"
export LIBVIRT_LOCK_MANAGER_PLUGIN_DIR="$b/src/.libs"
export VIRTLOCKD_PATH="$b/src"
-export LIBVIRTD_PATH="$b/daemon"
+export LIBVIRTD_PATH="$b/src"
# This is a cheap way to find some use-after-free and uninitialized
# read problems when using glibc.
--
2.17.1
6 years, 5 months
[libvirt] [PATCH 0/2] Make it easier to track feature deprecation
by Markus Armbruster
Markus Armbruster (2):
qemu-doc: Move appendix "Deprecated features" to its own file
MAINTAINERS: New section "Incompatible changes", copy libvir-list
MAINTAINERS | 4 +
qemu-deprecated.texi | 234 ++++++++++++++++++++++++++++++++++++++++++
qemu-doc.texi | 235 +------------------------------------------
3 files changed, 239 insertions(+), 234 deletions(-)
create mode 100644 qemu-deprecated.texi
--
2.17.1
6 years, 5 months
[libvirt] [dbus PATCH] connect: fix calls to virtDBusConnectOpen
by Anya Harter
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
src/domain.c | 2 +-
src/interface.c | 2 +-
src/network.c | 2 +-
src/nodedev.c | 2 +-
src/nwfilter.c | 2 +-
src/secret.c | 2 +-
src/storagepool.c | 2 +-
src/storagevol.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/domain.c b/src/domain.c
index 5c5e6da..e8b1a0e 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -152,7 +152,7 @@ virtDBusDomainGetVirDomain(virtDBusConnect *connect,
{
virDomainPtr domain;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
domain = virtDBusUtilVirDomainFromBusPath(connect->connection,
diff --git a/src/interface.c b/src/interface.c
index 191b8be..6c24885 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -10,7 +10,7 @@ virtDBusInterfaceGetVirInterface(virtDBusConnect *connect,
{
virInterfacePtr interface;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
interface = virtDBusUtilVirInterfaceFromBusPath(connect->connection,
diff --git a/src/network.c b/src/network.c
index 3957ee6..f3d5472 100644
--- a/src/network.c
+++ b/src/network.c
@@ -21,7 +21,7 @@ virtDBusNetworkGetVirNetwork(virtDBusConnect *connect,
{
virNetworkPtr network;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
network = virtDBusUtilVirNetworkFromBusPath(connect->connection,
diff --git a/src/nodedev.c b/src/nodedev.c
index aa649c6..04fe29c 100644
--- a/src/nodedev.c
+++ b/src/nodedev.c
@@ -10,7 +10,7 @@ virtDBusNodeDeviceGetVirNodeDevice(virtDBusConnect *connect,
{
virNodeDevicePtr dev;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
dev = virtDBusUtilVirNodeDeviceFromBusPath(connect->connection,
diff --git a/src/nwfilter.c b/src/nwfilter.c
index 3fc6e12..d101778 100644
--- a/src/nwfilter.c
+++ b/src/nwfilter.c
@@ -10,7 +10,7 @@ virtDBusNWFilterGetVirNWFilter(virtDBusConnect *connect,
{
virNWFilterPtr nwfilter;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
nwfilter = virtDBusUtilVirNWFilterFromBusPath(connect->connection,
diff --git a/src/secret.c b/src/secret.c
index 903cfc2..85982f1 100644
--- a/src/secret.c
+++ b/src/secret.c
@@ -10,7 +10,7 @@ virtDBusSecretGetVirSecret(virtDBusConnect *connect,
{
virSecretPtr secret;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
secret = virtDBusUtilVirSecretFromBusPath(connect->connection,
diff --git a/src/storagepool.c b/src/storagepool.c
index 6eb6f27..b4d4f93 100644
--- a/src/storagepool.c
+++ b/src/storagepool.c
@@ -10,7 +10,7 @@ virtDBusStoragePoolGetVirStoragePool(virtDBusConnect *connect,
{
virStoragePoolPtr storagePool;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
storagePool = virtDBusUtilVirStoragePoolFromBusPath(connect->connection,
diff --git a/src/storagevol.c b/src/storagevol.c
index e5d1686..6ddff47 100644
--- a/src/storagevol.c
+++ b/src/storagevol.c
@@ -10,7 +10,7 @@ virtDBusStorageVolGetVirStorageVol(virtDBusConnect *connect,
{
virStorageVolPtr storageVol;
- if (virtDBusConnectOpen(connect, error) < 0)
+ if (!virtDBusConnectOpen(connect, error))
return NULL;
storageVol = virtDBusUtilVirStorageVolFromBusPath(connect->connection,
--
2.17.1
6 years, 5 months
[libvirt] [PATCH v2 0/3] qemu: Support vhost-vsock-ccw
by Boris Fiuczynski
Support the vhost-vsock-ccw device on S390.
Since v1
- adjusted vsock command line generation (Ján Tomko)
- added CAPS_LATEST test coverage to s390 (Ján Tomko)
- adjusted new vsock tests to use CAPS_LATEST
Bjoern Walk (1):
tests: qemuxml2argv: make CAPS_LATEST arch generic
Boris Fiuczynski (2):
qemu: Add ccw support for vhost-vsock
news: Update for vhost-vsock-ccw support
docs/news.xml | 8 ++
src/qemu/qemu_command.c | 8 +-
src/qemu/qemu_domain.c | 10 +-
src/qemu/qemu_domain_address.c | 7 +-
.../vhost-vsock-ccw-auto.s390x-latest.args | 32 ++++++
.../qemuxml2argvdata/vhost-vsock-ccw-auto.xml | 25 +++++
.../vhost-vsock-ccw.s390x-latest.args | 32 ++++++
tests/qemuxml2argvdata/vhost-vsock-ccw.xml | 32 ++++++
tests/qemuxml2argvtest.c | 98 +++++++++++--------
.../vhost-vsock-ccw-auto.xml | 32 ++++++
tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml | 1 +
tests/qemuxml2xmltest.c | 5 +
12 files changed, 243 insertions(+), 47 deletions(-)
create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw-auto.xml
create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.xml
create mode 120000 tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml
--
2.17.0
6 years, 5 months
[libvirt] [dbus PATCH v2 00/17] Implement and Test Interface APIs
by Anya Harter
original patch series cover letter:
https://www.redhat.com/archives/libvir-list/2018-July/msg00364.html
changes since v1:
* all commits "make" and "make check"
* MACString property => MAC property
* various corrections
* add tests for all but virConnectListAllInterfaces,
virInterfaceChangeBegin,
virInterfaceChangeCommit,
and virInterfaceChangeRollback
* commits were reordered to introduce functions before they are
needed by the test suite
https://libvirt.org/html/libvirt-libvirt-interface.html
The following functions have been implemented:
- virConnectListAllInterfaces (connect method)
- virInterfaceChangeBegin (connect method)
- virInterfaceChangeCommit (connect method)
- virInterfaceChangeRollback (connect method)
- virInterfaceCreate (interface method)
- virInterfaceDefineXML (connect method)
- virInterfaceDestroy (interface method)
- virInterfaceGetMACString (property)
- virInterfaceGetName (property)
- virInterfaceGetXMLDesc (interface method)
- virInterfaceIsActive (property)
- virInterfaceLookupByMACString (connect method)
- virInterfaceLookupByName (connect method)
- virInterfaceUndefine (interface method)
Anya Harter (17):
Introduce Interface Interface
Implement InterfaceDefineXML method for Connect Interface
Implement Create method for Interface Interface
Implement Destroy method for Interface Interface
Introduce Interface Tests & Test Create method for Interface Interface
Test Destroy method for Interface Interface
Implement Undefine method for Interface Interface
Implement GetXMLDesc method for Interface Interface
Implement Name property for Interface Interface
Implement MAC property for Interface Interface
Implement Active property for Interface Interface
Implement ListInterfaces method for Connect Interface
Implement InterfaceChangeBegin method for Connect Interface
Implement InterfaceChangeCommit method for Connect Interface
Implement InterfaceChangeRollback method for Connect Interface
Implement InterfaceLookupByName method for Connect Interface
Implement InterfaceLookupByMAC method for Connect Interface
data/Makefile.am | 1 +
data/org.libvirt.Connect.xml | 40 ++++++
data/org.libvirt.Interface.xml | 42 ++++++
src/Makefile.am | 2 +
src/connect.c | 198 ++++++++++++++++++++++++++
src/connect.h | 1 +
src/interface.c | 249 +++++++++++++++++++++++++++++++++
src/interface.h | 9 ++
src/util.c | 35 +++++
src/util.h | 15 ++
tests/Makefile.am | 1 +
tests/libvirttest.py | 12 ++
tests/test_connect.py | 17 +++
tests/test_interface.py | 39 ++++++
tests/xmldata.py | 12 ++
15 files changed, 673 insertions(+)
create mode 100644 data/org.libvirt.Interface.xml
create mode 100644 src/interface.c
create mode 100644 src/interface.h
create mode 100755 tests/test_interface.py
--
2.17.1
6 years, 5 months
[libvirt] [PATCH v2] conf: virDomainDefValidateInternal prohibit some characters in shmem name
by Simon Kobyda
XML shmem name will not include character '/', and will not be equal to strings
"." or "..", as shmem name is used in a path.
https://bugzilla.redhat.com/show_bug.cgi?id=1192400
---
Changes in V2
- Added error reports
- Error situation will happen only if shmem name is equal to
"." or "..", however their occurence in a name compromised of more
characters is allowed.
src/conf/domain_conf.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7ab2953d83..6b34c17de4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6107,6 +6107,8 @@ virDomainDefLifecycleActionValidate(const virDomainDef *def)
static int
virDomainDefValidateInternal(const virDomainDef *def)
{
+ size_t i;
+
if (virDomainDefCheckDuplicateDiskInfo(def) < 0)
return -1;
@@ -6136,6 +6138,26 @@ virDomainDefValidateInternal(const virDomainDef *def)
return -1;
}
+ for (i = 0; i < def->nshmems; i++) {
+ if (strchr(def->shmems[i]->name, '/')) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("shmem name cannot include '/' character"));
+ return -1;
+ }
+
+ if (STREQ(def->shmems[i]->name, ".")) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("shmem name cannot be equal to '.'"));
+ return -1;
+ }
+
+ if (STREQ(def->shmems[i]->name, "..")) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("shmem name cannot be equal to '..'"));
+ return -1;
+ }
+ }
+
if (virDomainDefLifecycleActionValidate(def) < 0)
return -1;
--
2.17.1
6 years, 5 months
[libvirt] [PATCH v2 0/5] Don't touch user data from tests
by Michal Privoznik
This is a v2 of:
https://www.redhat.com/archives/libvir-list/2018-July/msg00425.html
diff to v1:
- Patch 1/6 from original series was ACKed and thus pushed,
- Patch 2/6 from original series is replaced with 1/5,
- The rest of the patches remained unreviewed, therefore I'm resending
them.
Michal Prívozník (5):
qemuxml2argvtest: Set more fake drivers
Forget last daemon/ dir artefacts
virtestmock: Track connect() too
check-file-access: Allow specifying action
virtestmock: Track action
Makefile.am | 2 +-
run.in | 2 +-
tests/check-file-access.pl | 32 ++++++++++++++++++----
tests/file_access_whitelist.txt | 15 +++++++----
tests/libvirtd-fail | 4 +--
tests/qemuxml2argvtest.c | 6 +++++
tests/virtestmock.c | 59 ++++++++++++++++++++++++++++++-----------
7 files changed, 90 insertions(+), 30 deletions(-)
--
2.16.4
6 years, 5 months
[libvirt] [PATCH v2 0/2] Minor fixes for virTypedParams(De)Serialize
by Marc Hartmayer
Changelog:
+ v1->v2:
- Removed the the allocation change in virTypedParams(De)Serialize
(John's comment)
Marc Hartmayer (2):
virTypedParamsSerialize: set remote_params_len at the end
virTypedParamsDeserialize: set nparams to 0 in case of an error
src/util/virtypedparam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
2.13.4
6 years, 5 months