[PATCH-for-5.1] .travis.yml: Deprecate it in favor of GitLab CI
by Philippe Mathieu-Daudé
As of QEMU 5.2 we prefer to focus our CI development on GitLab.
Mark Travis-CI as deprecated (adding a big warning).
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)redhat.com>
---
docs/system/deprecated.rst | 11 +++++++++++
.travis.yml | 7 +++++++
2 files changed, 18 insertions(+)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 851dbdeb8a..c17a5b0896 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -17,6 +17,17 @@ they were first deprecated in the 2.10.0 release.
What follows is a list of all features currently marked as
deprecated.
+Build and test automation
+-------------------------
+
+``Travis-CI`` (Since 5.2)
+'''''''''''''''''''''''''
+
+``Travis-CI`` is deprecated in favor of GitLab-CI.
+
+The '.travis.yml' configuration should only be modified to remove jobs
+when equivalent exist on GitLab-CI. Adding new jobs is not allowed.
+
System emulator command line arguments
--------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 6695c0620f..4ad243f511 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,10 @@
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# As of QEMU 5.2, this file is now deprecated in favor of GitLab CI.
+# Do not modify, except to remove jobs ported to GitLab CI.
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
# The current Travis default is a VM based 16.04 Xenial on GCE
# Additional builds with specific requirements for a full VM need to
# be added as additional matrix: entries later on
--
2.21.3
4 years, 7 months
[libvirt PATCH] build-aux: remove some syntax-check cruft
by Daniel P. Berrangé
sc_proper_name_utf8_requires_ICONV looks for Makefile.am files, so is
not going to work correctly with meson.
The 'today' variable is not referenced anywhere.
The 'writable-files' target is not used anywhere
sc_prohibit_reversed_compare_failure only checks 'init.sh' which does
not exist in libvirt.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
build-aux/syntax-check.mk | 54 ---------------------------------------
1 file changed, 54 deletions(-)
diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 9256532ab3..6eb59cf90e 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -72,10 +72,6 @@ VC_LIST_EXCEPT = \
| $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
$(_prepend_srcdir_prefix)
-# Override this in syntax-check.mk if you are using a different format in your
-# NEWS file.
-today = $(shell date +%Y-%m-%d)
-
# Prevent programs like 'sort' from considering distinct strings to be equal.
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
export LC_ALL = C
@@ -1744,29 +1740,6 @@ sc_prohibit_test_double_equal:
halt='use "test x = x", not "test x =''= x"' \
$(_sc_search_regexp)
-# Each program that uses proper_name_utf8 must link with one of the
-# ICONV libraries. Otherwise, some ICONV library must appear in LDADD.
-# The perl -0777 invocation below extracts the possibly-multi-line
-# definition of LDADD from the appropriate Makefile.am and exits 0
-# when it contains "ICONV".
-sc_proper_name_utf8_requires_ICONV:
- @progs=$$($(VC_LIST_EXCEPT) \
- | xargs $(GREP) -l 'proper_name_utf8 ''("'); \
- if test "x$$progs" != x; then \
- fail=0; \
- for p in $$progs; do \
- dir=$$(dirname "$$p"); \
- perl -0777 \
- -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \
- $$dir/Makefile.am && continue; \
- base=$$(basename "$$p" .c); \
- $(GREP) "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
- || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
- done; \
- test $$fail = 1 && \
- { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
- exit 1; } || :; \
- fi
# Warn about "c0nst struct Foo const foo[]",
# but not about "char const *const foo" or "#define const const".
@@ -1828,33 +1801,6 @@ sc_po_check:
rm -f $@-1 $@-2; \
fi
-# Check that 'make alpha' will not fail at the end of the process,
-# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
-# and is read-only.
-writable-files:
- $(AM_V_GEN)if test -d $(release_archive_dir); then \
- for file in $(DIST_ARCHIVES); do \
- for p in ./ $(release_archive_dir)/; do \
- test -e $$p$$file || continue; \
- test -w $$p$$file \
- || { echo ERROR: $$p$$file is not writable; fail=1; }; \
- done; \
- done; \
- test "$$fail" && exit 1 || : ; \
- else :; \
- fi
-
-
-# BRE regex of file contents to identify a test script.
-_test_script_regex ?= \<init\.sh\>
-
-# In tests, use "compare expected actual", not the reverse.
-sc_prohibit_reversed_compare_failure:
- @prohibit='\<compare [^ ]+ ([^ ]*exp|/dev/null)' \
- containing='$(_test_script_regex)' \
- halt='reversed compare arguments' \
- $(_sc_search_regexp)
-
# #if HAVE_... will evaluate to false for any non numeric string.
# That would be flagged by using -Wundef, however gnulib currently
# tests many undefined macros, and so we can't enable that option.
--
2.26.2
4 years, 7 months
[libvirt PATCH] network: Use single quotes in default network configuration
by Andrea Bolognani
Whenever libvirt is upgraded on a Debian system, the user will be
prompted along the lines of
Configuration file '/etc/libvirt/qemu/networks/default.xml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** default.xml (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/libvirt/qemu/networks/default.xml 2020-08-04 12:57:25.450911143 +0200
+++ /etc/libvirt/qemu/networks/default.xml.dpkg-new 2020-08-03 22:47:15.000000000 +0200
@@ -1,19 +1,11 @@
-<!--
-WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
-OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
- virsh net-edit default
-or other application using the libvirt API.
--->
-
<network>
<name>default</name>
- <uuid>612a2cab-72fb-416d-92bc-4d9e597bfb63</uuid>
- <forward mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <mac address='52:54:00:1f:03:79'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
+ <uuid>d020b839-4379-492c-aa74-eab7365076e6</uuid>
+ <bridge name="virbr0"/>
+ <forward/>
+ <ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
+ <range start="192.168.122.2" end="192.168.122.254"/>
</dhcp>
</ip>
</network>
The UUID situation should probably be handled the same way it is
in the spec file by stripping it, and in general we could behave
much better towards users, but one part of the diff that
immediately stands out is that some lines are highlighted not
because they are semantically different, but simply because they
use different types of quotes around attributes.
Since the canonical version of all libvirt XML documents (as
returned by the various vir*GetXMLDesc() APIs) as well as the
on-disk representations use single quotes, let's use the same
for configuration files we install as well.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/network/default.xml.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/network/default.xml.in b/src/network/default.xml.in
index d7241d0c16..08a3632eb6 100644
--- a/src/network/default.xml.in
+++ b/src/network/default.xml.in
@@ -1,10 +1,10 @@
<network>
<name>default</name>
- <bridge name="virbr0"/>
+ <bridge name='virbr0'/>
<forward/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.122.2" end="192.168.122.254"/>
+ <range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
--
2.25.4
4 years, 7 months
[PATCH] mdev: fix daemon crash on reattach mdevs
by Binfeng Wu
Causing a crash when virMediatedDeviceListFindIndex because of
some pointers in mgr->activeMediatedHostdevs become dangling
pointers if goto cleanup label in virMediatedDeviceListMarkDevices.
Reproduction scenario:
1. start vm1 with mdev1
2. start vm2 with mdev2, mdev1 (the order cannot be changed)
Backtrace:
#0 0x0000ffffb8c36250 in strcmp
#1 0x0000ffffb9b80754 in virMediatedDeviceListFindIndex
#2 0x0000ffffb9b80870 in virMediatedDeviceListFind
#3 0x0000ffffb9c9e168 in virHostdevReAttachMediatedDevices
#4 0x0000ffff9949f724 in qemuHostdevReAttachMediatedDevices
#5 0x0000ffff9949f7f8 in qemuHostdevReAttachDomainDevices
#6 0x0000ffff994bcd70 in qemuProcessStop
#7 0x0000ffff994bf4e0 in qemuProcessStart
.....
Signed-off-by: Binfeng Wu <wubinfeng(a)huawei.com>
---
src/util/virmdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virmdev.c b/src/util/virmdev.c
index b8023dd991..26cb8300ff 100644
--- a/src/util/virmdev.c
+++ b/src/util/virmdev.c
@@ -439,7 +439,7 @@ virMediatedDeviceListMarkDevices(virMediatedDeviceListPtr dst,
if (virMediatedDeviceIsUsed(mdev, dst) ||
virMediatedDeviceSetUsedBy(mdev, drvname, domname) < 0)
- goto cleanup;
+ goto rollback;
/* Copy mdev references to the driver list:
* - caller is responsible for NOT freeing devices in @src on success
--
2.26.2.windows.1
4 years, 7 months
[libvirt PATCH 0/2] header fixes
by Pavel Hrdina
Pavel Hrdina (2):
remote: remove duplicated header
src/logging: no need to include log_protocol.h in log_manager.h
src/logging/log_manager.h | 2 --
src/qemu/qemu_command.c | 1 +
src/remote/remote_daemon_dispatch.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
--
2.26.2
4 years, 7 months
[PATCH 0/8] Further Debian/Ubuntu Apparmor Delta
by Christian Ehrhardt
Hi,
I don't even remember which number of submissions that is #5 maybe?
Anyway - I'm hereby continuing to bring Debian and Ubuntu apparmor
Delta into upstream libvirt.
I have kept out all patches that are either Distro-specific or we ran
into trouble/discussions in the past. But there are enough left for a
new submission.
I have kept the most-original (read the earliest - as some patches
appeared in Ubuntu and later with a different Author in Debian) patch
author that I could find intact and git-send-email should auto-cc them.
I added some more bug links and descriptions so one can understand the
case a commit tries to fix without knowing too much context.
Christian Ehrhardt (2):
apparmor: allow virt-aa-helper nameservices
apparmor: let qemu load old shared objects after upgrades
Jamie Strandboge (1):
apparmor: read only access to overcommit_memory
Sam Hartman (1):
apparmor: allow default pki path
Serge Hallyn (1):
apparmor: allow virt-aa-helper to read openvswitch sockets
Stefan Bader (3):
apparmor: allow libvirtd to call pygrub
apparmor: qemu access to @{PROC}/*/auxv for hw_cap
apparmor: allow virt-aa-helper to read from tmp
src/security/apparmor/libvirt-qemu | 9 +++++++++
src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in | 5 +++++
src/security/apparmor/usr.sbin.libvirtd.in | 1 +
3 files changed, 15 insertions(+)
--
2.27.0
4 years, 7 months
[libvirt PATCH] meson_options: change default value to auto for driver_esx
by Pavel Hrdina
Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
meson_options.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson_options.txt b/meson_options.txt
index a1bb6505b8..1313effd09 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -48,7 +48,7 @@ option('yajl', type: 'feature', value: 'auto', description: 'yajl support')
# build driver options
option('driver_bhyve', type: 'feature', value: 'auto', description: 'bhyve driver')
-option('driver_esx', type: 'feature', value: 'enabled', description: 'esx driver')
+option('driver_esx', type: 'feature', value: 'auto', description: 'esx driver')
option('driver_hyperv', type: 'feature', value: 'auto', description: 'Hyper-V driver')
option('driver_interface', type: 'feature', value: 'auto', description: 'host interface driver')
option('driver_libvirtd', type: 'feature', value: 'auto', description: 'libvirtd driver')
--
2.26.2
4 years, 7 months
[PATCH v2] conf: Add support for initiator IQN setting for iSCSI hostdevs
by Peter Krempa
We already allow controlling the initiator IQN for iSCSI based disks.
Add the same for host devices.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Rebased on top of the latest patch to convert formatdomain to rst and
fixed 'since' tag.
docs/formatdomain.rst | 4 ++++
docs/schemas/domaincommon.rng | 3 +++
src/conf/domain_conf.c | 5 +++++
.../hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 3 ++-
.../hostdev-scsi-virtio-scsi.x86_64-latest.args | 1 +
tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml | 3 +++
tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml | 3 +++
7 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index a39e0c4adf..4372b79061 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -3909,6 +3909,10 @@ or:
same ``name`` attribute and optionally using the ``auth`` element to
provide the authentication credentials to the iSCSI server.
+ :since:`Since 6.7.0`, the optional ``initiator`` sub-element controls the
+ IQN of the initiator ran by the hypervisor via it's ``<iqn name='iqn...'``
+ subelement.
+
``scsi_host``
:since:`Since 2.5.0` , multiple LUNs behind a single SCSI HBA are
described by a ``protocol`` attribute set to "vhost" and a ``wwpn``
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index c196a97511..0d0dcbc5ce 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -5058,6 +5058,9 @@
<optional>
<ref name='diskAuth'/>
</optional>
+ <optional>
+ <ref name="initiatorinfo"/>
+ </optional>
</interleave>
</group>
</choice>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 69e0439e7e..a6d23a2238 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8354,6 +8354,8 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
iscsisrc->src->auth = g_steal_pointer(&authdef);
}
+ virStorageSourceInitiatorParseXML(ctxt, &iscsisrc->src->initiator);
+
if (flags & VIR_DOMAIN_DEF_PARSE_STATUS &&
xmlopt && xmlopt->privateData.storageParse) {
if ((ctxt->node = virXPathNode("./privateData", ctxt)) &&
@@ -26164,6 +26166,9 @@ virDomainHostdevDefFormatSubsysSCSI(virBufferPtr buf,
if (iscsisrc->src->auth)
virStorageAuthDefFormat(&sourceChildBuf, iscsisrc->src->auth);
+
+ virStorageSourceInitiatorFormatXML(&iscsisrc->src->initiator,
+ &sourceChildBuf);
} else {
virBufferAsprintf(&sourceChildBuf, "<adapter name='%s'/>\n",
scsihostsrc->adapter);
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args
index de4047000e..f2591d6956 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args
@@ -60,7 +60,8 @@ data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
-drive file.driver=iscsi,file.portal=example.org:3260,\
file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\
-file.user=myname,file.password-secret=hostdev5-secret0,if=none,format=raw,\
+file.user=myname,file.password-secret=hostdev5-secret0,\
+file.initiator-name=iqn.2020-07.com.example:test,if=none,format=raw,\
id=drive-hostdev5 \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=5,\
drive=drive-hostdev5,id=hostdev5 \
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args
index 72980d58b8..f86cbd7314 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args
@@ -67,6 +67,7 @@ keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
-blockdev '{"driver":"iscsi","portal":"example.org:3260",\
"target":"iqn.1992-01.com.example:storage","lun":2,"transport":"tcp",\
"user":"myname","password-secret":"hostdev5-secret0",\
+"initiator-name":"iqn.2020-07.com.example:test",\
"node-name":"libvirt-hostdev5-backend","read-only":false}' \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=5,\
drive=libvirt-hostdev5-backend,id=hostdev5 \
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml
index 775b678b36..f1caf80644 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml
+++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml
@@ -67,6 +67,9 @@
<auth username='myname'>
<secret type='iscsi' usage='mycluster_myname'/>
</auth>
+ <initiator>
+ <iqn name='iqn.2020-07.com.example:test'/>
+ </initiator>
</source>
<address type='drive' controller='0' bus='0' target='3' unit='5'/>
</hostdev>
diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml
index 9c823809ab..6c7e22d0c3 100644
--- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml
@@ -74,6 +74,9 @@
<auth username='myname'>
<secret type='iscsi' usage='mycluster_myname'/>
</auth>
+ <initiator>
+ <iqn name='iqn.2020-07.com.example:test'/>
+ </initiator>
</source>
<address type='drive' controller='0' bus='0' target='3' unit='5'/>
</hostdev>
--
2.26.2
4 years, 7 months