[libvirt] [PATCH] util: remove some no-op thread functions
by Daniel P. Berrangé
Neither virThreadInitialize or virThreadOnExit do anything since we
dropped the Win32 threads impl, in favour of win-pthreads.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/libvirt-admin.c | 3 +--
src/libvirt.c | 6 ++----
src/libvirt_private.syms | 1 -
src/locking/lock_daemon.c | 1 -
src/logging/log_daemon.c | 1 -
src/lxc/lxc_controller.c | 1 -
src/network/leaseshelper.c | 1 -
src/security/virt-aa-helper.c | 1 -
src/util/iohelper.c | 1 -
src/util/virthread.c | 10 ----------
src/util/virthread.h | 3 ---
tests/commandtest.c | 3 ---
tests/eventtest.c | 2 --
tests/qemuagenttest.c | 3 +--
tests/qemucapabilitiestest.c | 3 ---
tests/qemucaps2xmltest.c | 3 ---
tests/qemucapsprobe.c | 3 +--
tests/qemuhotplugtest.c | 3 +--
tests/qemumigparamstest.c | 3 +--
tests/qemumonitorjsontest.c | 3 +--
tests/seclabeltest.c | 3 ---
tests/testutils.c | 3 +--
tests/viratomictest.c | 3 ---
23 files changed, 9 insertions(+), 55 deletions(-)
diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
index 9d5c5b1b7b..091473e698 100644
--- a/src/libvirt-admin.c
+++ b/src/libvirt-admin.c
@@ -52,8 +52,7 @@ virAdmGlobalInit(void)
* virAdmConnectOpen first. But we can't rely on VIR_DEBUG working
* until after initialization is complete, and since this is
* one-shot, we never get here again. */
- if (virThreadInitialize() < 0 ||
- virErrorInitialize() < 0)
+ if (virErrorInitialize() < 0)
goto error;
virLogSetFromEnv();
diff --git a/src/libvirt.c b/src/libvirt.c
index 15917cba6f..ca172beb71 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -243,8 +243,7 @@ virGlobalInit(void)
* virConnectOpen first. But we can't rely on VIR_DEBUG working
* until after initialization is complete, and since this is
* one-shot, we never get here again. */
- if (virThreadInitialize() < 0 ||
- virErrorInitialize() < 0)
+ if (virErrorInitialize() < 0)
goto error;
virFileActivateDirOverrideForLib();
@@ -369,8 +368,7 @@ DllMain(HINSTANCE instance ATTRIBUTE_UNUSED,
break;
case DLL_THREAD_DETACH:
- /* Release per-thread local data */
- virThreadOnExit();
+ /* Nothing todo in libvirt yet */
break;
case DLL_PROCESS_DETACH:
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 6619dbc2e9..da915876ff 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -3173,7 +3173,6 @@ virRWLockWrite;
virThreadCancel;
virThreadCreateFull;
virThreadID;
-virThreadInitialize;
virThreadIsSelf;
virThreadJoin;
virThreadSelf;
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index edb61d74c0..a5a3a97e99 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -1124,7 +1124,6 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index 85c58aaa7b..9621702138 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -896,7 +896,6 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index c677eb8f6d..37851bf284 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -2505,7 +2505,6 @@ int main(int argc, char *argv[])
ns_fd[i] = -1;
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index 5e04e16171..46482ad3ce 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -104,7 +104,6 @@ main(int argc, char **argv)
program_name = argv[0];
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), program_name);
exit(EXIT_FAILURE);
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 326cfaf52a..ead4eaa236 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1421,7 +1421,6 @@ main(int argc, char **argv)
char *include_file = NULL;
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/util/iohelper.c b/src/util/iohelper.c
index ddc338b7c7..f3d45b9c03 100644
--- a/src/util/iohelper.c
+++ b/src/util/iohelper.c
@@ -196,7 +196,6 @@ main(int argc, char **argv)
program_name = argv[0];
if (virGettextInitialize() < 0 ||
- virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed"), program_name);
exit(EXIT_FAILURE);
diff --git a/src/util/virthread.c b/src/util/virthread.c
index 05b5572f5f..cdc5cab604 100644
--- a/src/util/virthread.c
+++ b/src/util/virthread.c
@@ -33,16 +33,6 @@
#include "virthreadjob.h"
-/* Nothing special required for pthreads */
-int virThreadInitialize(void)
-{
- return 0;
-}
-
-void virThreadOnExit(void)
-{
-}
-
int virOnce(virOnceControlPtr once, virOnceFunc init)
{
return pthread_once(&once->once, init);
diff --git a/src/util/virthread.h b/src/util/virthread.h
index 7870340c47..6bbc09fa13 100644
--- a/src/util/virthread.h
+++ b/src/util/virthread.h
@@ -82,9 +82,6 @@ struct virOnceControl {
typedef void (*virOnceFunc)(void);
-int virThreadInitialize(void) ATTRIBUTE_RETURN_CHECK;
-void virThreadOnExit(void);
-
typedef void (*virThreadFunc)(void *opaque);
#define virThreadCreate(thread, joinable, func, opaque) \
diff --git a/tests/commandtest.c b/tests/commandtest.c
index a382bb6dd2..c6fd826003 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -1292,9 +1292,6 @@ mymain(void)
int timer = -1;
int virinitret;
- if (virThreadInitialize() < 0)
- return EXIT_FAILURE;
-
if (chdir("/tmp") < 0)
return EXIT_FAILURE;
diff --git a/tests/eventtest.c b/tests/eventtest.c
index df7570bac6..f426469d21 100644
--- a/tests/eventtest.c
+++ b/tests/eventtest.c
@@ -321,8 +321,6 @@ mymain(void)
}
}
- if (virThreadInitialize() < 0)
- return EXIT_FAILURE;
char *debugEnv = getenv("LIBVIRT_DEBUG");
if (debugEnv && *debugEnv &&
(virLogSetDefaultPriority(virLogParseDefaultPriority(debugEnv)) < 0)) {
diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c
index 91f19644d5..5ae098efa9 100644
--- a/tests/qemuagenttest.c
+++ b/tests/qemuagenttest.c
@@ -1431,8 +1431,7 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0 ||
- qemuTestDriverInit(&driver) < 0)
+ if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index 67f57a4fdc..1a785d8e39 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -214,9 +214,6 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0)
- return EXIT_FAILURE;
-
virEventRegisterDefaultImpl();
if (testQemuDataInit(&data) < 0)
diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c
index 3b381251a0..e36ba06eeb 100644
--- a/tests/qemucaps2xmltest.c
+++ b/tests/qemucaps2xmltest.c
@@ -203,9 +203,6 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0)
- return EXIT_FAILURE;
-
virEventRegisterDefaultImpl();
if (testQemuDataInit(&data) < 0)
diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c
index ae016c47c2..36af01d561 100644
--- a/tests/qemucapsprobe.c
+++ b/tests/qemucapsprobe.c
@@ -54,8 +54,7 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
- if (virThreadInitialize() < 0 ||
- virInitialize() < 0) {
+ if (virInitialize() < 0) {
fprintf(stderr, "Failed to initialize libvirt");
return EXIT_FAILURE;
}
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 3c177c6622..76b131295a 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -614,8 +614,7 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0 ||
- qemuTestDriverInit(&driver) < 0)
+ if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c
index dcefde2dbc..aacb905639 100644
--- a/tests/qemumigparamstest.c
+++ b/tests/qemumigparamstest.c
@@ -209,8 +209,7 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0 ||
- qemuTestDriverInit(&driver) < 0)
+ if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index af84e0ba04..d0bbb1f674 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -3019,8 +3019,7 @@ mymain(void)
return EXIT_AM_SKIP;
#endif
- if (virThreadInitialize() < 0 ||
- qemuTestDriverInit(&driver) < 0)
+ if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
diff --git a/tests/seclabeltest.c b/tests/seclabeltest.c
index a0296c787e..42dcb8c97f 100644
--- a/tests/seclabeltest.c
+++ b/tests/seclabeltest.c
@@ -11,9 +11,6 @@ mymain(void)
virSecurityManagerPtr mgr;
const char *doi, *model;
- if (virThreadInitialize() < 0)
- return EXIT_FAILURE;
-
mgr = virSecurityManagerNew(NULL, "QEMU", VIR_SECURITY_MANAGER_DEFAULT_CONFINED);
if (mgr == NULL) {
fprintf(stderr, "Failed to start security driver");
diff --git a/tests/testutils.c b/tests/testutils.c
index 064460b4dc..1b663f9d5d 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -877,8 +877,7 @@ int virTestMain(int argc,
}
fprintf(stderr, "TEST: %s\n", progname);
- if (virThreadInitialize() < 0 ||
- virErrorInitialize() < 0)
+ if (virErrorInitialize() < 0)
return EXIT_FAILURE;
virLogSetFromEnv();
diff --git a/tests/viratomictest.c b/tests/viratomictest.c
index 52f17154e9..a933ab1cbd 100644
--- a/tests/viratomictest.c
+++ b/tests/viratomictest.c
@@ -164,9 +164,6 @@ mymain(void)
{
int ret = 0;
- if (virThreadInitialize() < 0)
- return -1;
-
if (virTestRun("types", testTypes, NULL) < 0)
ret = -1;
if (virTestRun("threads", testThreads, NULL) < 0)
--
2.21.0
5 years, 2 months
[libvirt] [PATCHv2] maint: Use flake8 to check python code
by Shi Lei
Replace 'sc_prohibit_semicolon_at_eol_in_python' with generic 'sc_flake8' rule
to check python code style.
Now 'sc_flake8' just check the error E703: 'statement ends with a semicolon'.
In future, we could use '--select' to introduce more rules.
Signed-off-by: Shi Lei <shi_lei(a)massclouds.com>
---
v1: https://www.redhat.com/archives/libvir-list/2019-September/msg00501.html
since v1:
- Use the return-value from flake8 directly for 'sc_flake8'.
- Add the option '--show-source' to be more helpful for developers.
- Set checking for 'flake8' as a soft requirement.
cfg.mk | 17 ++++++++++++-----
configure.ac | 4 ++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 42e1abf0..a7c88383 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -812,11 +812,13 @@ sc_require_enum_last_marker:
exit 1; } || :
# In Python files we don't want to end lines with a semicolon like in C
-sc_prohibit_semicolon_at_eol_in_python:
- @prohibit='^[^#].*\;$$' \
- in_vc_files='\.py$$' \
- halt='python does not require to end lines with a semicolon' \
- $(_sc_search_regexp)
+sc_flake8:
+ @if [ -n "$(FLAKE8)" ]; then \
+ $(VC_LIST_EXCEPT) | $(GREP) '\.py$$' | xargs \
+ $(FLAKE8) --select E703 --show-source; \
+ else \
+ echo '$(ME): skipping test $@: flake8 not installed' 1>&2; \
+ fi
# mymain() in test files should use return, not exit, for nicer output
sc_prohibit_exit_in_tests:
@@ -1140,6 +1142,11 @@ syntax-check: spacing-check test-wrap-argv \
echo "*****************************************************" >&2; \
echo "* cppi not installed, some checks have been skipped *" >&2; \
echo "*****************************************************" >&2; \
+ fi; \
+ if [ -z "$(FLAKE8)" ]; then \
+ echo "*****************************************************" >&2; \
+ echo "* flake8 not installed, sc_flake8 has been skipped *" >&2; \
+ echo "*****************************************************" >&2; \
fi
endif
diff --git a/configure.ac b/configure.ac
index 41d3da3e..286b9f7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -704,6 +704,10 @@ AC_PATH_PROGS([PYTHON], [python3 python2 python])
if test -z "$PYTHON"; then
AC_MSG_ERROR(['python3', 'python2' or 'python' binary is required to build libvirt])
fi
+AC_PATH_PROG([FLAKE8], [flake8])
+if test -z "$FLAKE8"; then
+ AC_MSG_WARN(['flake8' binary is required to check python code style])
+fi
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
AC_MSG_ERROR(['perl' binary is required to build libvirt])
--
2.17.1
5 years, 2 months
[libvirt] Call for volunteers: LWN.net articles about KVM Forum talks
by Stefan Hajnoczi
Hi,
LWN.net is a popular open source news site that covers Linux and other
open source communities (Python, GNOME, Debian, etc). It has published
a few KVM articles in the past too.
Let's raise awareness of QEMU, KVM, and libvirt by submitting articles covering
KVM Forum.
I am looking for ~5 volunteers who are attending KVM Forum to write an article
about a talk they find interesting.
Please pick a talk you'd like to cover and reply to this email thread.
I will then send an email to LWN with a heads-up so they can let us know
if they are interested in publishing a KVM Forum special. I will not
ask LWN.net for money.
KVM Forum schedule:
https://events.linuxfoundation.org/events/kvm-forum-2019/program/schedule/
LWN.net guidelines:
https://lwn.net/op/AuthorGuide.lwn
"Our general guideline is for articles to be around 1500 words in
length, though somewhat longer or shorter can work too. The best
articles cover a fairly narrow topic completely, without any big
omissions or any extra padding."
I volunteer to cover Michael Tsirkin's "VirtIO without the Virt -
Towards Implementations in Hardware" talk.
Thanks,
Stefan
5 years, 2 months
[libvirt] [PATCH 0/2] vz: build fixes for passing qemuCaps down the stack
by Nikolay Shirokovskiy
Pushed as trivial and build breaker.
Nikolay Shirokovskiy (2):
vz: build fix for passing qemuCaps to virDomainDeviceDefPostParse
vz: build fix for passing qemuCaps to virDomainDefParseNode
src/vz/vz_driver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
1.8.3.1
5 years, 2 months
[libvirt] [PATCH v2 0/2] qemu: Enable slirp-helper iff dbus-vmstate present
by Michal Privoznik
This is technically a v2 of:
https://www.redhat.com/archives/libvir-list/2019-September/msg00281.html
It implements what Jano suggested - use dbus-vmstate capability to
decide if slirp-helper is used.
Michal Prívozník (2):
qemu: Enable slirp-helper iff dbus-vmstate present
Revert "qemu: add socket datagram capability"
src/qemu/qemu_capabilities.c | 5 -----
src/qemu/qemu_capabilities.h | 1 -
src/qemu/qemu_hotplug.c | 2 +-
src/qemu/qemu_process.c | 2 +-
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 -
tests/qemuxml2argvdata/net-user.x86_64-4.0.0.args | 2 +-
tests/qemuxml2argvtest.c | 2 +-
13 files changed, 4 insertions(+), 17 deletions(-)
--
2.21.0
5 years, 2 months
[libvirt] [PATCH] maint: Use flake8 to check python code
by Shi Lei
Replace 'sc_prohibit_semicolon_at_eol_in_python' with generic 'sc_flake8' rule
to check python code style.
Now 'sc_flake8' just check the error E703: 'statement ends with a semicolon'.
In future, we could use '--select' to introduce more rules.
Signed-off-by: Shi Lei <shi_lei(a)massclouds.com>
---
cfg.mk | 8 +++-----
configure.ac | 4 ++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 42e1abf0..8acc45ac 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -812,11 +812,9 @@ sc_require_enum_last_marker:
exit 1; } || :
# In Python files we don't want to end lines with a semicolon like in C
-sc_prohibit_semicolon_at_eol_in_python:
- @prohibit='^[^#].*\;$$' \
- in_vc_files='\.py$$' \
- halt='python does not require to end lines with a semicolon' \
- $(_sc_search_regexp)
+sc_flake8:
+ @$(VC_LIST_EXCEPT) | $(GREP) '\.py$$' | xargs $(FLAKE8) --select E703 \
+ | $(GREP) . && { exit 1; } || :
# mymain() in test files should use return, not exit, for nicer output
sc_prohibit_exit_in_tests:
diff --git a/configure.ac b/configure.ac
index a8f8b051..93212ca7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -704,6 +704,10 @@ AC_PATH_PROGS([PYTHON], [python3 python2 python])
if test -z "$PYTHON"; then
AC_MSG_ERROR(['python3', 'python2' or 'python' binary is required to build libvirt])
fi
+AC_PATH_PROG([FLAKE8], [flake8])
+if test -z "$FLAKE8"; then
+ AC_MSG_ERROR(['flake8' binary is required to check python code style])
+fi
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
AC_MSG_ERROR(['perl' binary is required to build libvirt])
--
2.17.1
5 years, 2 months
[libvirt] [PATCH 0/6] test_driver: implement device attach/detach APIs
by Ilias Stamatis
Ilias Stamatis (6):
test_driver: implement virDomainAttachDeviceFlags
test_driver: implement virDomainAttachDevice
test_driver: implement virDomainDetachDeviceFlags
test_driver: implement virDomainDetachDevice
test_driver: implement virDomainDetachDeviceAlias
test_driver: implement virDomainUpdateDeviceFlags
src/test/test_driver.c | 570 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 570 insertions(+)
--
2.22.0
5 years, 2 months
[libvirt] [virttools-planet PATCH] README: add instructions for adding a new blog
by Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha(a)gmail.com>
---
README | 22 ++++++++++++++++++++++
updater/virt-tools/basic/index.html.tmpl | 1 +
2 files changed, 23 insertions(+)
diff --git a/README b/README
index 1013e71..ad388f8 100644
--- a/README
+++ b/README
@@ -6,6 +6,28 @@ This directory contains content / configuration for managing
http(s)://planet.virttools.org
http(s)://planet.virt-tools.org
+How to add your blog
+--------------------
+Add a config.ini section for your blog to updater/virt-tools/config.ini:
+
+ [https://example.org/my/blog/feed/]
+ name = John Doe
+ face = jdoe.png
+ facewidth = 96
+ faceheight = 96
+
+Where face (logo image filename), facewidth (logo image width in pixels), and
+faceheight (logo image height in pixels) are optional attributes that describe
+the logo image associated with your blog. Remember to add your image file into
+the updater/virt-tools/images/ directory if you wish to use an image.
+
+Please send a patch email to libvir-list(a)redhat.com:
+
+ $ git commit -as
+ $ git send-email --to libvir-list(a)redhat.com --cc berrange(a)redhat.com HEAD^..
+
+How to run the site
+-------------------
The site is setup to run under OpenShift
Initial load can be done with
diff --git a/updater/virt-tools/basic/index.html.tmpl b/updater/virt-tools/basic/index.html.tmpl
index d8d239e..d26aba0 100644
--- a/updater/virt-tools/basic/index.html.tmpl
+++ b/updater/virt-tools/basic/index.html.tmpl
@@ -23,6 +23,7 @@
<TMPL_LOOP Channels>
<li><a href="<TMPL_VAR link ESCAPE="HTML">" title="<TMPL_VAR title ESCAPE="HTML">"><TMPL_VAR name></a> <a href="<TMPL_VAR url ESCAPE="HTML">">(feed)</a></li>
</TMPL_LOOP>
+ <li><a href="https://libvirt.org/git/?p=virttools-planet.git;a=blob;f=README">Add your blog!</a></li>
</ul>
</div>
--
2.21.0
5 years, 2 months
[libvirt] [RFC] quirks of interface target device name
by Nikolay Shirokovskiy
Hi, all
I recently discovered that <target dev=''/> input is allowed[*]
by qemu driver's defineXML for <interface> element. On start it will
turn into 'tap<N>'. At the same time empty value is not allowed by
schema. This name is generated by kernel on linux.
I wonder how to deal with this.
1. Fix schema to allow empty value for dev attribute. Additionally fix
migrating to clear out this autogenerated name. This way we have 2
options to autogenerate dev name. First as described above. Second
is by ommiting target element. The naming will be 'vnet<N>' in the
latter case. Having these 2 options looks redundant.
2. Don't allow to start domains with such configuration. We can not
fail definition because disappearing VMs on libvirt update looks
too unpleasant. This way we don't have two different set of
autogenerated names. This can even go unnoticed given we fail
such starts anyway after [1] (which is fixed by [*]). [1] is
commited on 2018 Jul 23 and released in 4.6.0. However Centos 7
is based on 4.5.0 and virNetDevTapCreate has logic to copy
generated tap name from kernel like since the beginning (I managed
to follow the history to 2011).
Nikolay
[*] at least with recent "virStrncpy: fix to successfully copy empty string" applied
[1] 7d70a63b util: Improve virStrncpy() implementation
5 years, 2 months
[libvirt] [PATCH 0/2] Fix systemd socket activation for systemd < v227
by Michael Chapman
A couple of bugs were encountered using socket activated libvirtd on
CentOS 7:
- When resolving a tls_port/tcp_port from the config file (needed even
when using socket activation on systemd < v227), the port endianness
was incorrect.
- The wrong name was used when checking whether libvirtd-tls.socket
was passed to libvirtd, leading to this socket not being properly
registered.
Michael Chapman (2):
util: fix byte order of port in virSocketAddrResolveService
remote: fix registration of TLS socket
src/remote/remote_daemon.c | 2 +-
src/util/virsocketaddr.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.20.1
5 years, 2 months