[libvirt] [jenkins-ci PATCH] guests: Fix ~/.ccache ownership
by Andrea Bolognani
The directory and the files contained within need to be owned
by the user or compilation will fail, either loudly or silently
depending on the OS, due to missing write permissions.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/tasks/users.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml
index 6134228..87693e0 100644
--- a/guests/tasks/users.yml
+++ b/guests/tasks/users.yml
@@ -55,8 +55,12 @@
file:
path: /home/{{ flavor }}/.ccache
state: directory
+ owner: '{{ flavor }}'
+ group: '{{ flavor }}'
- name: '{{ flavor }}: Configure ccache'
copy:
src: files/ccache.conf
dest: /home/{{ flavor }}/.ccache/ccache.conf
+ owner: '{{ flavor }}'
+ group: '{{ flavor }}'
--
2.14.3
6 years, 9 months
[libvirt] PCI passthrough/SR-IOV on Cavium cn889x
by Ciprian Barbu
Hello,
In the context of running Openstack on a cluster of Cavium ThunderX cn8890 aarch64 servers, we are trying to attach virtual functions to a VM.
First some introduction. This Cavium SoC has a different approach to Virtual Functions than on x86 NICs, in which VFs are always enabled and there are two types of VFs and *one single* PF, as follows:
- primary VFs - these are in fact assigned by the system to the physical ports of the server, e.g em2p1s0f1, em2p1s0f3 etc below.
- secondary VFs - the main purpose of these is to provide additional HW queues under SW control (usually DPDK applications) by automatically binding them to the needed physical port.
- one single "physical" function, device 0002:01:00.0 below, which to the best of my knowledge acts merely as a stub and cannot be assigned an interface name.
Below is the output of "dpdk-devbind.py -s" which provides some useful information.
Network devices using DPDK-compatible driver ============================================
0002:01:00.2 'Device a034' drv=vfio-pci unused=nicvf
Network devices using kernel driver
===================================
0000:01:10.0 'THUNDERX BGX (Common Ethernet Interface)' if= drv=thunder-BGX unused=thunder_bgx,vfio-pci
0000:01:10.1 'THUNDERX BGX (Common Ethernet Interface)' if= drv=thunder-BGX unused=thunder_bgx,vfio-pci
0002:01:00.0 'THUNDERX Network Interface Controller' if= drv=thunder-nic unused=nicpf,vfio-pci
0002:01:00.1 'Device a034' if=em2p1s0f1 drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:00.3 'Device a034' if=em2p1s0f3 drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:00.4 'Device a034' if=em2p1s0f4 drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:00.5 'Device a034' if=em2p1s0f5 drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:00.6 'Device a034' if= drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:00.7 'Device a034' if= drv=thunder-nicvf unused=nicvf,vfio-pci
0002:01:01.0 'Device a034' if= drv=thunder-nicvf unused=nicvf,vfio-pci
Now for the problem. I don't have a domain definition because libvirt fails to start a domain, but I might be able to find what nova generates. But what it tries to do is passthrough em2p1s0f3, address 0002:01:00.3:
<interface type='hostdev' managed='yes'>
<source>
<address type='pci' domain='0x0002' bus='0x1' slot='0x0' function='0x3'/>
</source>
</interface>
You can find attached a trimmed libvirtd.log where the main error is:
43236: error : virPCIGetVirtualFunctionInfo:2927 : internal error: The PF device for VF /sys/bus/pci/devices/0002:01:00.3 has no network device name
I have actually spent a few days trying to do some hacks and learn some more. The main idea is that virPCIGetVirtualFunctionInfo fails to find the physical name for the virtual device at address 0002:01:00.3, which as I explained in the introduction is something that this Cavium SoC does not do.
Looking further down the stream, almost all of the helper functions need a linkdev for the physical function, which means that making libvirt work on this system means some heavy refactoring, a solution being to use the sysfs path rather than the interface name.
This will not work 100% from what I've seen, at least virNetDevGetVfConfig uses netlink to save the admin MAC (part of virNetDevSaveNetConfig), and netlink needs the ifname.
So I'm quite stuck on finding a workaround/fix for this platform which would potentially be something upstreamable, so that we, ENEA, don't burden with maintaining an ugly hack. Right now we are using libvirt 3.5.0 but we can upgrade to something newer if need.
The question(s) thus, are
1. is this problem known in the libvirt community?
2. Is there any plan to make it work?
3. Can you give some pointers on an approach to adapt libvirt to this system?
4. Maybe it's worth changing the kernel to assign a sort of dummy interface to the physical function?
Thanks and sorry for the long email,
/Ciprian
6 years, 9 months
[libvirt] [dbus PATCH] m4: disable gcc8 -Wcast-function-type warnings from -Wextra
by Pavel Hrdina
GLib uses macros to create cleanup functions that are used by
g_auto or g_autoptr macros. They expect a function defined as
"void (*)(void *)" which is usually not that case.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under build-breaker rule.
m4/virt-compile-warnings.m4 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index f6ab795..6ece136 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -160,6 +160,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# Need -fipa-pure-const in order to make -Wsuggest-attribute=pure
# fire even without -O.
wantwarn="$wantwarn -fipa-pure-const"
+ # We do "bad" function cast to define glib auto cleanup functions
+ wantwarn="$wantwarn -Wno-cast-function-type"
if test "$enable_werror" = "yes"
then
--
2.14.3
6 years, 9 months
[libvirt] [PATCHv2 00/25] Python tweaks
by Radostin Stoyanov
Changes since v1 (https://www.redhat.com/archives/libvir-list/2018-March/msg01001.html)
01 - Fixed typo.
03 - Added whitespace after comma in: value = value + re.sub("^(\d+)U$","\\1", token[1])
05 and 06 - Use printf style format and break strings everywhere there is a newline.
07 - Use try-except instead of an explicit check.
10 - Use isalnum() instead of a regex match, and a few more simplifications were added.
20 - Use try-except instead of an explicit check.
23 - Don't slice `line` in the loop condition.
New patches: 9, 24, 25
The patches have been tested with `make check`, `make syntax-check`.
The output of apibuild.py was tested with `cd docs/` followed by:
srcdir=. builddir=. /usr/bin/python2 ./apibuild.py; sha1sum *.xml | sha1sum
and
srcdir=. builddir=. /usr/bin/python3 ./apibuild.py; sha1sum *.xml | sha1sum
before and after the patches were applied.
Radostin Stoyanov (25):
apibuild: Use isinstance for type checking
apibuild: Split imports on separate lines
apibuild: Remove whitespace before ',' and ':'
python: Add whitespace around = and % operators
esx_vi_generator: Simplify generate_helper_source
esx_vi_generator: Simplify generate_helper_header
esx_vi_generator: Simplify get_occurrence_comment
esx_vi_generator: Simplify alignment function
cfg.mk: check ctype_macros only on *.[c|h] files
apibuild: Simplify conditional statements
python: Remove space around = in keyword args
WmiClass: Don't share "versions" between instances
apibuild: Simplify uniq function
apibuild: Avoid double sorting of ids
python3: cpu-reformat: Use the print() function
apibuild: Drop backslash between brackets
apibuild: Fix indentation not multiple of 4
apibuild: Simplify strip_lead_star()
apibuild: Simplify parseTypeComment()
apibuild: Simplify type checking of literals
apibuild: Use list comprehension insteand of map
apibuild: Simplify merging of preproc tokens
apibuild: Simplify parsing string tokens
apibuild: Remove redundant parentheses
apibuild: Simplify getline()
cfg.mk | 1 +
docs/apibuild.py | 734 +++++++++++++++++--------------------
docs/index.py | 54 +--
src/esx/esx_vi_generator.py | 183 ++++-----
src/hyperv/hyperv_wmi_generator.py | 36 +-
tests/cputestdata/cpu-cpuid.py | 6 +-
tests/cputestdata/cpu-reformat.py | 6 +-
7 files changed, 472 insertions(+), 548 deletions(-)
--
2.14.3
6 years, 9 months
[libvirt] [dbus PATCH] run.in: fix typo in abs_top_builddir variable
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under trivial rule. Thanks Katerina!
run.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run.in b/run.in
index 1e48dc8..e98edaf 100644
--- a/run.in
+++ b/run.in
@@ -15,7 +15,7 @@
#
# Find this script
-b=@abs_tob_builddir@
+b=@abs_top_builddir@
export VIRT_DBUS_INTERFACES_DIR="$b/data"
--
2.14.3
6 years, 9 months
[libvirt] [dbus PATCH v3 0/5] rewrite to GDBus
by Pavel Hrdina
Changes in v3:
- introduced run script to help running libvirt-dbus without
installing it
- improved README and HACKING
Changes in v2:
- removed patch that set the required libvirt version to
libvirt-dbus version
Pavel Hrdina (5):
introduce support for GDBus implementation
introduce run script to execute libvirt-dbus daemon
switch from sd-bus to GDBus implementation
main: introduce thread pool to process D-Bus messages
docs: rewrite HACKING and README into markdown format and improve it
.gitignore | 1 +
HACKING | 199 ------------
HACKING.md | 191 +++++++++++
Makefile.am | 2 +
README | 80 -----
README.md | 72 +++++
configure.ac | 17 +-
data/Makefile.am | 7 +
data/org.libvirt.Connect.xml | 56 ++++
data/org.libvirt.Domain.xml | 51 +++
libvirt-dbus.spec.in | 10 +-
run.in | 22 ++
src/Makefile.am | 20 +-
src/connect.c | 324 ++++++++-----------
src/connect.h | 37 +--
src/domain.c | 748 ++++++++++++++++++++-----------------------
src/domain.h | 6 +-
src/events.c | 177 +++++-----
src/gdbus.c | 453 ++++++++++++++++++++++++++
src/gdbus.h | 112 +++++++
src/main.c | 315 ++++++++----------
src/util.c | 167 ++++------
src/util.h | 53 ++-
test/Makefile.am | 3 +-
test/travis-run | 2 +-
25 files changed, 1796 insertions(+), 1329 deletions(-)
delete mode 100644 HACKING
create mode 100644 HACKING.md
delete mode 100644 README
create mode 100644 README.md
create mode 100644 data/org.libvirt.Connect.xml
create mode 100644 data/org.libvirt.Domain.xml
create mode 100644 run.in
create mode 100644 src/gdbus.c
create mode 100644 src/gdbus.h
--
2.14.3
6 years, 9 months
[libvirt] [jenkins-ci PATCH] guests: Drop Ubuntu 12.04 support
by Andrea Bolognani
As of commit d4ea32e85f9e, libvirt no longer performs Ubuntu 12.04
builds on Travis, and reproducing locally issues that would hit
those CI jobs was the only reason introduced support in the first
place.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/host_vars/libvirt-ubuntu-12/install.yml | 3 ---
guests/host_vars/libvirt-ubuntu-12/main.yml | 3 ---
guests/vars/mappings.yml | 11 -----------
3 files changed, 17 deletions(-)
delete mode 100644 guests/host_vars/libvirt-ubuntu-12/install.yml
delete mode 100644 guests/host_vars/libvirt-ubuntu-12/main.yml
diff --git a/guests/host_vars/libvirt-ubuntu-12/install.yml b/guests/host_vars/libvirt-ubuntu-12/install.yml
deleted file mode 100644
index 997304f..0000000
--- a/guests/host_vars/libvirt-ubuntu-12/install.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-install_url: http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/
-install_config: preseed.cfg
diff --git a/guests/host_vars/libvirt-ubuntu-12/main.yml b/guests/host_vars/libvirt-ubuntu-12/main.yml
deleted file mode 100644
index 2d21f14..0000000
--- a/guests/host_vars/libvirt-ubuntu-12/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-projects:
- - libvirt
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index deae69d..d94d648 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -137,14 +137,12 @@ mappings:
deb: libgnutls28-dev
pkg: gnutls
rpm: gnutls-devel
- Ubuntu12: libgnutls-dev
Ubuntu14: libgnutls-dev
go:
default: golang
FreeBSD: go
CentOS6:
- Ubuntu12:
Ubuntu14:
gobject-introspection:
@@ -171,7 +169,6 @@ mappings:
hal:
FreeBSD: hal
- Ubuntu12: libhal-dev
intltool:
default: intltool
@@ -411,7 +408,6 @@ mappings:
default: numad
FreeBSD:
Debian8:
- Ubuntu12:
Ubuntu14:
openwsman:
@@ -455,7 +451,6 @@ mappings:
pkg: p5-Digest-MD5
rpm: perl-Digest-MD5
CentOS6:
- Ubuntu12:
Ubuntu14:
perl-ExtUtils-MakeMaker:
@@ -510,7 +505,6 @@ mappings:
deb: libtest-lwp-useragent-perl
pkg: p5-Test-LWP-UserAgent
Fedora: perl-Test-LWP-UserAgent
- Ubuntu12:
perl-Test-Pod:
deb: libtest-pod-perl
@@ -526,7 +520,6 @@ mappings:
deb: libtime-hr-perl
pkg: p5-Time-HiRes
rpm: perl-Time-HiRes
- Ubuntu12: perl
Ubuntu14: perl
perl-XML-Twig:
@@ -552,7 +545,6 @@ mappings:
pkg-config:
default: pkgconf
rpm: pkgconfig
- Ubuntu12: pkg-config
polkit:
default: polkit
@@ -614,7 +606,6 @@ mappings:
default: python3-requests
FreeBSD: py36-requests
CentOS:
- Ubuntu12:
qemu-img:
default: qemu-utils
@@ -642,7 +633,6 @@ mappings:
sanlock:
deb: libsanlock-dev
rpm: sanlock-devel
- Ubuntu12:
screen:
default: screen
@@ -692,7 +682,6 @@ mappings:
deb: wireshark-dev
Fedora: wireshark-devel
Debian8:
- Ubuntu12:
Ubuntu14:
xen:
--
2.14.3
6 years, 9 months
[libvirt] [jenkins-ci PATCH 0/3] guests: Various cleanups
by Andrea Bolognani
Applies on top of
https://www.redhat.com/archives/libvir-list/2018-March/msg01093.html
Andrea Bolognani (3):
guests: Configure Jenkins agent based on secret availability
guests: Don't expose 'jenkins' pseudo-package
guests: Don't expose 'base' pseudo-package
guests/host_vars/libvirt-centos-6/main.yml | 2 --
guests/host_vars/libvirt-centos-7/main.yml | 2 --
guests/host_vars/libvirt-debian-8/main.yml | 2 --
guests/host_vars/libvirt-debian-9/main.yml | 2 --
guests/host_vars/libvirt-debian-sid/main.yml | 1 -
guests/host_vars/libvirt-fedora-26/main.yml | 2 --
guests/host_vars/libvirt-fedora-27/main.yml | 2 --
guests/host_vars/libvirt-fedora-rawhide/main.yml | 2 --
guests/host_vars/libvirt-freebsd-10/main.yml | 2 --
guests/host_vars/libvirt-freebsd-11/main.yml | 2 --
guests/host_vars/libvirt-freebsd-current/main.yml | 1 -
guests/host_vars/libvirt-ubuntu-12/main.yml | 1 -
guests/host_vars/libvirt-ubuntu-14/main.yml | 1 -
guests/host_vars/libvirt-ubuntu-16/main.yml | 1 -
guests/site.yml | 15 ++++++++++++---
guests/tasks/jenkins.yml | 7 +++++++
16 files changed, 19 insertions(+), 26 deletions(-)
--
2.14.3
6 years, 9 months
[libvirt] [PATCH v3 00/12] Basic implementation of persistent reservations
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2018-February/msg01021.html
Diff to v2:
- John's review worked in
The event on pr-helper process dying is still not implemented as qemu
has no implementation yet.
Michal Privoznik (12):
virstoragefile: Introduce virStoragePRDef
qemuDomainDiskChangeSupported: Deny changing reservations
qemu: Introduce pr-manager-helper capability
qemu: Generate alias and socket path for pr-helper
qemu: Store pr runtime data in status XML
qemu: Generate cmd line at startup
qemu: Introduce pr_helper to qemu.conf
qemu_domain: Track pr-helper PID in status XML
qemu: Start PR daemon on domain startup
qemu_hotplug: Hotplug of reservations
qemu_hotplug: Hotunplug of reservations
qemu: Detect pr-manager-helper capability
docs/formatdomain.html.in | 25 ++-
docs/schemas/domaincommon.rng | 34 +--
docs/schemas/storagecommon.rng | 50 +++++
m4/virt-driver-qemu.m4 | 5 +
src/conf/domain_conf.c | 36 ++++
src/libvirt_private.syms | 6 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 4 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 48 +++++
src/qemu/qemu_conf.c | 7 +-
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_domain.c | 238 ++++++++++++++++++---
src/qemu/qemu_domain.h | 15 ++
src/qemu/qemu_hotplug.c | 94 ++++++++
src/qemu/qemu_process.c | 193 +++++++++++++++++
src/qemu/qemu_process.h | 7 +
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/util/virstoragefile.c | 181 ++++++++++++++++
src/util/virstoragefile.h | 19 ++
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
.../disk-virtio-scsi-reservations-not-managed.args | 29 +++
.../disk-virtio-scsi-reservations-not-managed.xml | 41 ++++
.../disk-virtio-scsi-reservations.args | 29 +++
.../disk-virtio-scsi-reservations.xml | 39 ++++
tests/qemuxml2argvtest.c | 8 +
.../disk-virtio-scsi-reservations-not-managed.xml | 1 +
.../disk-virtio-scsi-reservations.xml | 1 +
tests/qemuxml2xmltest.c | 4 +
30 files changed, 1064 insertions(+), 57 deletions(-)
create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations-not-managed.args
create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations-not-managed.xml
create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations.args
create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations.xml
create mode 120000 tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations-not-managed.xml
create mode 120000 tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations.xml
--
2.16.1
6 years, 9 months
[libvirt] [PATCH 0/2] virCommand: Two trivial fixes
by Michal Privoznik
Although not pushed, so review appreciated.
Michal Privoznik (2):
virCommandPassFD: Give name to flags
virCommandFDIsSet: Update documentation
src/util/vircommand.c | 13 ++++++-------
src/util/vircommand.h | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
--
2.16.1
6 years, 9 months