[libvirt RFC PATCH] util: vireventglibwatch: watch for G_IO_HUP and G_IO_ERR
by Ján Tomko
To more closely match the previous usage in virEventPollDispatchHandles,
where called the handle callback for any revents returned by poll.
This should fix the virtlogd error on subsequent domain startup:
error: can't connect to virtlogd: Cannot open log file:
'/var/log/libvirt/qemu/f28live.log': Device or resource busy
as well as virtlogd spinning caused by virLogHandlerDomainLogFileEvent
never being called on hangup.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: f8ab47cb4491dd72d866c1a96a9d94b8c3341de9
Fixes: 946a25274c46ffff46323c62f567ae7e753aa921
---
src/util/vireventglibwatch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/vireventglibwatch.c b/src/util/vireventglibwatch.c
index 7694e74f23..178707f6b7 100644
--- a/src/util/vireventglibwatch.c
+++ b/src/util/vireventglibwatch.c
@@ -89,11 +89,11 @@ GSource *virEventGLibCreateSocketWatch(int fd,
sizeof(virEventGLibFDSource));
ssource = (virEventGLibFDSource *)source;
- ssource->condition = condition;
+ ssource->condition = condition | G_IO_HUP | G_IO_ERR;
ssource->fd = fd;
ssource->pollfd.fd = fd;
- ssource->pollfd.events = condition;
+ ssource->pollfd.events = condition | G_IO_HUP | G_IO_ERR;
g_source_add_poll(source, &ssource->pollfd);
--
2.24.1
5 years, 1 month
[libvirt-dockerfiles PATCH 0/2] Update for MinGW changes
by Andrea Bolognani
Pushed under the Dockerfile refresh rule.
As usual, these patches cannot be applied to the git repository and
are posted to the list for humans' convenience only.
Andrea Bolognani (2):
Refresh after turning MinGW into a cross-building target
Add Dockerfiles for MinGW cross-compilation
buildenv-libosinfo-fedora-30-cross-mingw32.zip | Bin 0 -> 687 bytes
buildenv-libosinfo-fedora-30-cross-mingw64.zip | Bin 0 -> 689 bytes
buildenv-libosinfo-fedora-30.zip | Bin 605 -> 544 bytes
buildenv-libvirt-fedora-30-cross-mingw32.zip | Bin 0 -> 958 bytes
buildenv-libvirt-fedora-30-cross-mingw64.zip | Bin 0 -> 960 bytes
buildenv-libvirt-fedora-30.zip | Bin 897 -> 776 bytes
6 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 buildenv-libosinfo-fedora-30-cross-mingw32.zip
create mode 100644 buildenv-libosinfo-fedora-30-cross-mingw64.zip
create mode 100644 buildenv-libvirt-fedora-30-cross-mingw32.zip
create mode 100644 buildenv-libvirt-fedora-30-cross-mingw64.zip
--
2.24.1
5 years, 1 month
[dockerfiles PATCH] refresh: Drop MinGW hacks
by Andrea Bolognani
Up until now we have had to hardcode some information in our
refresh script, but with the recent improvements to lcitool that's
no longer necessary.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
This patch needs
https://www.redhat.com/archives/libvir-list/2020-February/msg00409.html
to be merged into libvirt-jenkins-ci.
refresh | 37 ++++++++++++-------------------------
1 file changed, 12 insertions(+), 25 deletions(-)
diff --git a/refresh b/refresh
index 5f3f5e3..6b644de 100755
--- a/refresh
+++ b/refresh
@@ -31,22 +31,19 @@ class Dockerfile:
CROSS = "-cross-"
SUFFIX = ".zip"
- # PROJECTS is a dictionary of dictionaries.
+ # PROJECTS is a dictionary of lists.
# The key is the project name, as present in the Dockerfile name and
- # the value is a dictionary containing the subprojects which the
- # dependencies should be installed together as the key and their value
- # being whether they support mingw builds or not.
- # This hack is needed till the moment libvirt-jenkins-ci treats mingw
- # builds in the very same way as cross-builds are treated.
+ # the value is a list containing the subprojects which the
+ # dependencies should be installed together as.
PROJECTS = {
- "libvirt" : {
- "libvirt" : True
- },
- "libosinfo" : {
- "libosinfo" : True,
- "osinfo-db" : False,
- "osinfo-db-tools" : True
- },
+ "libvirt" : [
+ "libvirt"
+ ],
+ "libosinfo" : [
+ "libosinfo",
+ "osinfo-db",
+ "osinfo-db-tools",
+ ],
}
def __init__(self, path):
@@ -91,17 +88,7 @@ class Dockerfile:
self.os = stem
self.cross_arch = None
- self.projects = []
-
- for project in Dockerfile.PROJECTS[project_name]:
- self.projects += [project]
- # Fedora 30 is special in that we use it to perform MinGW
- # builds, so we need to add the corresponding projects as well.
- # If a specific project needs to have the MinGW variant included,
- # the corresponding value in the dictionary will be True
- if (self.os == "fedora-30" and
- Dockerfile.PROJECTS[project_name][project]):
- self.projects += [project + "+mingw*"]
+ self.projects = Dockerfile.PROJECTS[project_name]
def refresh(self, lcitool):
--
2.24.1
5 years, 1 month
[libvirt PATCH 00/11] qemu: introduce a per-VM event loop thread
by Daniel P. Berrangé
This series changes the way we manage the QEMU monitor and
QEMU agent, such that all I/O is processed by a dedicated
event loop thread.
Many times in the past years people are reported issues
where long running monitor event callbacks block the main
libvirtd event loop for an unacceptably long period of
time. In the best case, this delays other work being
completed, but in bad cases it leads to mgmt app failures
when keepalive times trigger a client disconnect.
With this series, when we spawn QEMU, we also spawn a
dedicated thread running a GMainLoop instance. Then QEMU
monitor and QEMU agent UNIX sockets are switched to use
GMainContext for events instead of the traditional libvirt
event loop APIs. We kill off the event thread when we see
EOF on the QEMU monitor during shutdown.
The cost of this approach is one extra thread per VM,
which incurs a new OS process and a new stack allocation.
The QEMU driver already delegates some QMP event handling
to a thread pool for certain types of event. This was a
previous hack to mitigate the impact on the main event
loop. It is likely that we can remove this thread pool
from the QEMU driver & rely on the per-VM event threads
to do all the work. This will, however, require careful
analysis of each handler we pushed into the thread pool
to make sure its work doesn't have a dependency on the
event loop running in parallel.
This should also eliminate the need to have the libvirt
event loop registered when using the embedded QEMU driver.
This has not yet been validated, however, so it is left
for a future patch to relax the constraint.
Daniel P. Berrangé (11):
qemu: drop support for agent connections on PTYs
qemu: drop ability to open monitor from FD
src: set the OS level thread name
src: improve thread naming with human targetted names
src: introduce an abstraction for running event loops
qemu: start/stop an event loop thread for domains
qemu: start/stop an event thread for QMP probing
tests: start/stop an event thread for QEMU monitor/agent tests
qemu: convert monitor to use the per-VM event loop
qemu: fix variable naming in agent code
qemu: convert agent to use the per-VM event loop
po/POTFILES.in | 1 +
src/libvirt_private.syms | 6 +
src/libxl/libxl_domain.c | 10 +-
src/libxl/libxl_migration.c | 23 +-
src/lxc/lxc_fuse.c | 4 +-
src/node_device/node_device_udev.c | 7 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 11 +-
src/nwfilter/nwfilter_learnipaddr.c | 10 +-
src/qemu/qemu_agent.c | 634 ++++++++++++++--------------
src/qemu/qemu_agent.h | 1 +
src/qemu/qemu_domain.c | 33 ++
src/qemu/qemu_domain.h | 6 +
src/qemu/qemu_driver.c | 3 +-
src/qemu/qemu_migration.c | 8 +-
src/qemu/qemu_monitor.c | 155 +++----
src/qemu/qemu_monitor.h | 8 +-
src/qemu/qemu_process.c | 61 ++-
src/qemu/qemu_process.h | 2 +
src/remote/remote_daemon.c | 9 +-
src/rpc/virnetserver.c | 9 +-
src/storage/storage_backend_scsi.c | 4 +-
src/storage/storage_driver.c | 4 +-
src/util/Makefile.inc.am | 2 +
src/util/vircommand.c | 5 +-
src/util/vireventthread.c | 175 ++++++++
src/util/vireventthread.h | 31 ++
src/util/virfdstream.c | 10 +-
src/util/virnodesuspend.c | 8 +-
src/util/virthread.c | 44 +-
src/util/virthread.h | 4 +-
src/util/virthreadpool.c | 14 +-
src/util/virthreadpool.h | 2 +-
tests/qemumonitortestutils.c | 15 +
33 files changed, 832 insertions(+), 487 deletions(-)
create mode 100644 src/util/vireventthread.c
create mode 100644 src/util/vireventthread.h
--
2.24.1
5 years, 1 month
[libvirt PATCH] vz: Fix return value in error path
by Rikard Falkeborn
If PrlVmDev_GetType(), PrlVmDev_GetIndex() or PrlVmCfg_GetBootDevCount()
fails, return false to indicate error. Returning -1 would be interpreted
as true when used in an if-statement.
Fixes: 8c9252aa6d95247537da0939b54fdd2f31695e32
Signed-off-by: Rikard Falkeborn <rikard.falkeborn(a)gmail.com>
---
src/vz/vz_sdk.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 877692aeba..2c68c7cb27 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1609,13 +1609,13 @@ prlsdkInBootList(PRL_HANDLE sdkdom,
size_t i;
pret = PrlVmDev_GetType(sdktargetdev, &targetType);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
pret = PrlVmDev_GetIndex(sdktargetdev, &targetIndex);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
pret = PrlVmCfg_GetBootDevCount(sdkdom, &bootNum);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
for (i = 0; i < bootNum; ++i) {
pret = PrlVmCfg_GetBootDev(sdkdom, i, &bootDev);
--
2.25.1
5 years, 1 month
[libvirt PATCH] esx: Same order of arguments in definition and declaration
by Rikard Falkeborn
The order of arguments were not the same in the definition and
declaration. All callers use the same order as the definition, so there
is no bug, but change the function declaration to match the
implementation to avoid confusion.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn(a)gmail.com>
---
src/esx/esx_vi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h
index 5c60fd58f4..b960c0900a 100644
--- a/src/esx/esx_vi.h
+++ b/src/esx/esx_vi.h
@@ -204,8 +204,8 @@ struct _esxVI_Context {
int esxVI_Context_Alloc(esxVI_Context **ctx);
void esxVI_Context_Free(esxVI_Context **ctx);
-int esxVI_Context_Connect(esxVI_Context *ctx, const char *ipAddress,
- const char *url, const char *username,
+int esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
+ const char *ipAddress, const char *username,
const char *password, esxUtil_ParsedUri *parsedUri);
int esxVI_Context_LookupManagedObjects(esxVI_Context *ctx);
int esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path);
--
2.25.1
5 years, 1 month
Requesting Guidance
by Ritish kr singh
Hello, Sir
My name is Ritish Singh. I am currently pursuing my Bachelor of Technology
in Computer Science.
After going through a lot of GSoC Projects I found Libvirt project to be
quite interesting and challenging for me and I want to contribute to this
project this summer in GSoC. I want to contribute to
Test driver API coverage.
I would be grateful to you if you could guide me in the project and help me
to get started on the project.
Thanks
5 years, 1 month
[PATCH 00/16] Bhyve driver improvements
by Ryan Moeller
Ryan Moeller (16):
Fix build errors on FreeBSD
Simplify bhyve driver caps helpers
Remove redundant parameter to virBhyveProcessStart()
Fix indentation
Eliminate rc variable
Factor out conn
Don't bother seeking to the end of a file opened O_APPEND
Make bhyveMonitor a virClass
Refactor bhyve monitor register/unregister
Add hooks for bhyve backend
Add reboot support for bhyve backend
Refactor virBhyveProcessBuildBhyveCmd a bit
Reorder slot,bus,func -> bus,slot,func in parsers
Add hostdev handling for bhyve
Enable booting from hostdevs with bhyve
Allow PCI functions up to 255 for PCI ARI
docs/schemas/basictypes.rng | 10 +-
docs/schemas/domaincommon.rng | 30 ++
src/bhyve/bhyve_capabilities.c | 14 +
src/bhyve/bhyve_capabilities.h | 1 +
src/bhyve/bhyve_command.c | 285 +++++++++++++-----
src/bhyve/bhyve_command.h | 4 +-
src/bhyve/bhyve_driver.c | 67 ++--
src/bhyve/bhyve_driver.h | 4 +-
src/bhyve/bhyve_monitor.c | 165 ++++++----
src/bhyve/bhyve_monitor.h | 2 +
src/bhyve/bhyve_parse_command.c | 124 ++++++--
src/bhyve/bhyve_process.c | 107 +++++--
src/bhyve/bhyve_process.h | 4 +-
src/conf/domain_audit.c | 5 +
src/conf/domain_conf.c | 131 ++++++++
src/conf/domain_conf.h | 29 +-
src/conf/virconftypes.h | 3 +
src/conf/virnetworkobj.c | 5 +-
src/qemu/qemu_command.c | 2 +
src/qemu/qemu_domain.c | 5 +
src/qemu/qemu_hostdev.c | 1 +
src/qemu/qemu_hotplug.c | 2 +
src/qemu/qemu_migration.c | 1 +
src/security/security_apparmor.c | 1 +
src/security/security_dac.c | 28 ++
src/security/security_selinux.c | 8 +
src/util/virhook.c | 15 +
src/util/virhook.h | 11 +
src/util/virpci.c | 4 +-
.../bhyveargv2xml-passthru.args | 8 +
.../bhyveargv2xml-passthru.xml | 26 ++
.../bhyveargv2xml-virtio-scsi.args | 9 +
.../bhyveargv2xml-virtio-scsi.xml | 20 ++
tests/bhyveargv2xmltest.c | 2 +
.../bhyvexml2argv-passthru.args | 11 +
.../bhyvexml2argv-passthru.ldargs | 1 +
.../bhyvexml2argv-passthru.xml | 22 ++
.../bhyvexml2argv-virtio-scsi.args | 9 +
.../bhyvexml2argv-virtio-scsi.ldargs | 1 +
.../bhyvexml2argv-virtio-scsi.xml | 21 ++
tests/bhyvexml2argvtest.c | 8 +-
.../bhyvexml2xmlout-passthru.xml | 29 ++
.../bhyvexml2xmlout-virtio-scsi.xml | 23 ++
tests/bhyvexml2xmltest.c | 2 +
44 files changed, 1041 insertions(+), 219 deletions(-)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-passthru.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-passthru.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-scsi.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-scsi.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-passthru.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-passthru.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-passthru.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-scsi.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-scsi.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-scsi.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-passthru.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-virtio-scsi.xml
--
2.24.1
5 years, 1 month
[PATCH v3 0/5] lxc: Add VCPU features for LXC
by Julio Faracco
This series cover a lots of functionalities to LXC VCPUs. It enables
sharing some timer devices between host and LXC guest using `timer`
settings. It still has other improvements related to VCPU and LXC such
as virtual cpuinfo content based on VCPU settings and some better
resource limits. Each patch has the description of the problem and what
it is trying to fix.
v1-v2: Add Daniel's comments and some cleanups.
v2-v3: Remove dependency from patch 4 and 5.
Julio Faracco (5):
lxc: Add Real Time Clock device into allowed devices
lxc: Add HPET device into allowed devices
lxc: Replacing default strings definitions by g_autofree statement.
lxc: Implement virtual /proc/cpuinfo via LXC fuse
lxc: Count max VCPUs based on cpuset.cpus in native config.
docs/formatdomain.html.in | 4 +-
src/lxc/lxc_cgroup.c | 91 ++++++++-
src/lxc/lxc_container.c | 62 ++++--
src/lxc/lxc_container.h | 2 +
src/lxc/lxc_controller.c | 187 ++++++++++++------
src/lxc/lxc_fuse.c | 107 ++++++++--
src/lxc/lxc_native.c | 24 ++-
.../lxcconf2xml-cpusettune.xml | 2 +-
8 files changed, 368 insertions(+), 111 deletions(-)
--
2.20.1
5 years, 1 month
[PATCH v2 0/5] lxc: Add VCPU features for LXC
by Julio Faracco
This series cover a lots of functionalities to LXC VCPUs. It enables
sharing some timer devices between host and LXC guest using `timer`
settings. It still has other improvements related to VCPU and LXC such
as virtual cpuinfo content based on VCPU settings and some better
resource limits. Each patch has the description of the problem and what
it is trying to fix.
v1-v2: Add Daniel's comments and some cleanups.
Julio Faracco (5):
lxc: Add Real Time Clock device into allowed devices
lxc: Add HPET device into allowed devices
lxc: Replacing default strings definitions by g_autofree statement.
lxc: Implement virtual /proc/cpuinfo via LXC fuse
lxc: Count max VCPUs based on cpuset.cpus in native config.
docs/formatdomain.html.in | 4 +-
src/lxc/lxc_cgroup.c | 91 ++++++++-
src/lxc/lxc_container.c | 60 ++++--
src/lxc/lxc_container.h | 2 +
src/lxc/lxc_controller.c | 187 ++++++++++++------
src/lxc/lxc_fuse.c | 107 ++++++++--
src/lxc/lxc_native.c | 24 ++-
.../lxcconf2xml-cpusettune.xml | 2 +-
8 files changed, 367 insertions(+), 110 deletions(-)
--
2.20.1
5 years, 1 month