[libvirt] [dockerfiles PATCH] Refresh after switch from jansson to yajl
by Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is f188ff6a7ceb.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the Dockerfile refresh rule.
buildenv-centos-7.Dockerfile | 4 ++--
buildenv-debian-8.Dockerfile | 2 +-
buildenv-debian-9.Dockerfile | 2 +-
buildenv-debian-sid.Dockerfile | 2 +-
buildenv-fedora-27.Dockerfile | 2 +-
buildenv-fedora-28.Dockerfile | 2 +-
buildenv-fedora-rawhide.Dockerfile | 2 +-
buildenv-ubuntu-16.Dockerfile | 2 +-
buildenv-ubuntu-18.Dockerfile | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/buildenv-centos-7.Dockerfile b/buildenv-centos-7.Dockerfile
index 896bf68..cce63fc 100644
--- a/buildenv-centos-7.Dockerfile
+++ b/buildenv-centos-7.Dockerfile
@@ -23,7 +23,6 @@ ENV PACKAGES audit-libs-devel \
gnutls-devel \
iproute \
iscsi-initiator-utils \
- jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -64,7 +63,8 @@ ENV PACKAGES audit-libs-devel \
scrub \
sudo \
systemtap-sdt-devel \
- vim
+ vim \
+ yajl-devel
RUN yum update -y && \
yum install -y ${PACKAGES} && \
yum autoremove -y && \
diff --git a/buildenv-debian-8.Dockerfile b/buildenv-debian-8.Dockerfile
index 8877528..cdf38d3 100644
--- a/buildenv-debian-8.Dockerfile
+++ b/buildenv-debian-8.Dockerfile
@@ -29,7 +29,6 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
- libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -51,6 +50,7 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
+ libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-debian-9.Dockerfile b/buildenv-debian-9.Dockerfile
index 0592c97..ff8de7c 100644
--- a/buildenv-debian-9.Dockerfile
+++ b/buildenv-debian-9.Dockerfile
@@ -29,7 +29,6 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
- libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -51,6 +50,7 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
+ libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-debian-sid.Dockerfile b/buildenv-debian-sid.Dockerfile
index 2d0310d..d06c1e0 100644
--- a/buildenv-debian-sid.Dockerfile
+++ b/buildenv-debian-sid.Dockerfile
@@ -29,7 +29,6 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
- libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -51,6 +50,7 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
+ libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-fedora-27.Dockerfile b/buildenv-fedora-27.Dockerfile
index 09ec721..9953e1c 100644
--- a/buildenv-fedora-27.Dockerfile
+++ b/buildenv-fedora-27.Dockerfile
@@ -27,7 +27,6 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
- jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -72,6 +71,7 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
+ yajl-devel \
zfs-fuse
RUN yum update -y && \
yum install -y ${PACKAGES} && \
diff --git a/buildenv-fedora-28.Dockerfile b/buildenv-fedora-28.Dockerfile
index 60afba5..6e3587f 100644
--- a/buildenv-fedora-28.Dockerfile
+++ b/buildenv-fedora-28.Dockerfile
@@ -26,7 +26,6 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
- jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -72,6 +71,7 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
+ yajl-devel \
zfs-fuse
RUN yum update -y && \
yum install -y ${PACKAGES} && \
diff --git a/buildenv-fedora-rawhide.Dockerfile b/buildenv-fedora-rawhide.Dockerfile
index 33b47e1..e7d1fd3 100644
--- a/buildenv-fedora-rawhide.Dockerfile
+++ b/buildenv-fedora-rawhide.Dockerfile
@@ -26,7 +26,6 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
- jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -96,6 +95,7 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
+ yajl-devel \
zfs-fuse
RUN yum update -y && \
yum install -y ${PACKAGES} && \
diff --git a/buildenv-ubuntu-16.Dockerfile b/buildenv-ubuntu-16.Dockerfile
index c904c6e..d28b9aa 100644
--- a/buildenv-ubuntu-16.Dockerfile
+++ b/buildenv-ubuntu-16.Dockerfile
@@ -29,7 +29,6 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
- libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -52,6 +51,7 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
+ libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-ubuntu-18.Dockerfile b/buildenv-ubuntu-18.Dockerfile
index bbd32c1..14abd98 100644
--- a/buildenv-ubuntu-18.Dockerfile
+++ b/buildenv-ubuntu-18.Dockerfile
@@ -29,7 +29,6 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
- libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -52,6 +51,7 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
+ libyajl-dev \
lvm2 \
make \
nfs-common \
--
2.17.1
6 years, 3 months
[libvirt] [jenkins-ci PATCH 0/4] Switch back from jansson to yajl
by Andrea Bolognani
A straighforward revert of e1575b08511f..d2bbe1eee61a.
Andrea Bolognani (4):
guests: Re-introduce yajl kludge
guests: Add yajl mapping
guests: Install yajl for libvirt
guests: Don't install jansson for libvirt
guests/playbooks/update/tasks/kludges.yml | 2 ++
guests/vars/mappings.yml | 10 +++++-----
guests/vars/projects/libvirt.yml | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH] Fix build on non-linux platforms after another VIR_AUTOPTR patches
by Erik Skultety
Caused by commit f7d0663d49. The problem is missing libnl library on
these platforms, so the VIR_DEFINE_AUTOPTR_FUNC has to be compiled in
conditionally.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Checked with Travis CI, local fedora with MinGW and FreeBSD, thus pushed under
the build breaker rule.
src/util/virnetlink.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h
index 136b42b995..1e1e616b41 100644
--- a/src/util/virnetlink.h
+++ b/src/util/virnetlink.h
@@ -36,6 +36,9 @@
# undef inline
# endif
+typedef struct nl_msg virNetlinkMsg;
+VIR_DEFINE_AUTOPTR_FUNC(virNetlinkMsg, nlmsg_free)
+
# else
struct nl_msg;
@@ -45,8 +48,6 @@ struct nlmsghdr;
# endif /* __linux__ */
-typedef struct nl_msg virNetlinkMsg;
-
int virNetlinkStartup(void);
void virNetlinkShutdown(void);
@@ -126,6 +127,4 @@ int virNetlinkEventAddClient(virNetlinkEventHandleCallback handleCB,
int virNetlinkEventRemoveClient(int watch, const virMacAddr *macaddr,
unsigned int protocol);
-VIR_DEFINE_AUTOPTR_FUNC(virNetlinkMsg, nlmsg_free)
-
#endif /* __VIR_NETLINK_H__ */
--
2.14.4
6 years, 3 months
[libvirt] [PATCH v2 0/3] conf: standardize naming
by Anya Harter
on vir*ObjListExport call stack
Anya Harter (3):
conf: rename structs used by Export function
conf: rename Export Callback functions
conf: rename Match functions
src/conf/virinterfaceobj.c | 16 +++++++++-------
src/conf/virnetworkobj.c | 24 ++++++++++++-----------
src/conf/virnodedeviceobj.c | 14 ++++++++------
src/conf/virsecretobj.c | 14 ++++++++------
src/conf/virstorageobj.c | 38 ++++++++++++++++++++-----------------
5 files changed, 59 insertions(+), 47 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH 0/4] Extend apparmor rules for libvirt 4.6
by Christian Ehrhardt
Hi,
this is a summary of things I had to touch recently when working on 4.6.
The first two patches are re-submissions and modifications of last
year which were never totally challenged, but also not pushed yet (I had
no permissions yet back then).
The first was lost in a discussion about virt-aa-helper, whicih eventually
turned out to be clear that it could not help in that case.
- https://www.redhat.com/archives/libvir-list/2017-February/msg01598.html
- https://www.redhat.com/archives/libvir-list/2017-March/msg00052.html
The second even got a few Acks, but neither made it into upstream yet.
Parts of it where introduced already, in
7edcbd02 apparmor: allow libvirt to send term signal to unconfined
b482925c apparmor: support ptrace checks
But there are still signals blocked with those rules, so I resubmit the
remaining bit. Also I added the Acks to the resubmission.
The third change came in recently via various bug reports which I finally
wanted to adress - e.g. for ceph lib or smb. If we later on spot more
cases that have predictable safe paths under /tmp we can add those.
Finally the forth change was triggered by me testing libvirt 4.6 in
various conditions. Some of them were in containers, and the new libvirt
behavior to carry more mount points into the qemu namespace triggers the
need to rewrite the existing mount-moving rules that we added last year.
Christian Ehrhardt (4):
apparmor: allow openGraphicsFD for virt manager >1.4
apparmor: add mediation rules for unconfined guests
apparmor: allow expected /tmp access patterns
apparmor: allow to preserve /dev mountpoints into qemu namespaces
examples/apparmor/libvirt-qemu | 13 +++++++++++++
examples/apparmor/usr.sbin.libvirtd | 24 +++++++++++++-----------
2 files changed, 26 insertions(+), 11 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH v2 RESEND 00/17] Introduce RDT memory bandwidth allocation support
by bing.niu@intel.com
From: Bing Niu <bing.niu(a)intel.com>
This series is to introduce RDT memory bandwidth allocation support by extending
current virresctrl implementation.
The Memory Bandwidth Allocation (MBA) feature provides indirect and approximate
control over memory bandwidth available per-core. This feature provides a method to
control applications which may be over-utilizing bandwidth relative to their priority
in environments such as the data-center. The details can be found in Intel's SDM 17.19.7.
Kernel supports MBA through resctrl file system same as CAT. Each resctrl group have a
MB parameter to control how much memory bandwidth it can utilize in unit of percentage.
In this series, MBA is enabled by enhancing existing virresctrl implementation. The
policy employed for MBA is similar with CAT: The sum of each MBA group's bandwidth
dose not exceed 100%.
The enhancement of virresctrl include two main parts:
Part 1: Add two new structures virResctrlInfoMemMB and virResctrlAllocMemBW for collecting
host system MBA capability and domain memory bandwidth allocation. Those two
structures are the extension of existing virResctrlInfo and virResctrlAlloc. With
them, virresctrl framework can support MBA and CAT concurrently. Each virResctrlAlloc
represent a resource allocation including CAT, or MBA, or CAT&MBA. The policy of MBA is
that: total memory bandwidth of each resctrl group, created by virresctrl, does not
exceed to 100%.
Part 2: On XML part, add new elements to host capabilities query and domain allocation to support
memory bandwidth allocation.
---------------------------------------------------------------------------------------------
For host capabilities XML, new XML format like below example,
<host>
.....
<memory_bandwidth>
<node id='0' cpus='0-19'>
<control granularity='10' min ='10' maxAllocs='8'/>
</node>
</memory_bandwidth>
</host>
granularity --- memory bandwidth granularity
min --- minimum memory bandwidth allowed
maxAllocs --- maximum concurrent memory bandwidth allocation allowed.
---------------------------------------------------------------------------------------------
For domain XML, new format as below example
<domain type='kvm' id='2'>
......
<cputune>
......
<shares>1024</shares>
<memorytune vcpus='0-1'>
<node id='0' bandwidth='20'/>
</memorytune>
</cputune>
......
</domain>
id --- node where memory bandwidth allocation will happen
bandwidth --- bandwidth allocated in percentage
----------------------------------------------------------------------------------------------
With this extension of the virresctrl, the overall working follow of CAT and MBA is described by below
picture. XML parser will aggregate MBA and CAT configuration and represents it in one virresctrl object.
The methods of virresctrl class will manipulate resctrl interface to allocate corresponding resources.
<memorytune cpus='0-3'>
+---------+
| <cachetune vcpus='0-3'>
XML | +
parser +-----------+
|
|
+------------------------------+
|
|
internal object +------v--------------+
virResctrlAlloc | backing object |
+------+--------------+
|
|
+------------------------------+
|
+--v-------+
| |
| schemata |
/sys/fs/resctrl | tasks |
| . |
| . |
| |
+----------+
---------------------------------------------------------------------
previous versions and discussion can be found at
v1: https://www.redhat.com/archives/libvir-list/2018-July/msg01144.html
RFC v2: https://www.redhat.com/archives/libvir-list/2018-June/msg01268.html
RFC v1: https://www.redhat.com/archives/libvir-list/2018-May/msg02101.html
Changelog:
v1 -> this: John's comment: 1. Split calculation of number of memory bandwidth control
to one patch.
2. Split virResctrlAllocMemBW relating methods to 5 patch, each
provides one kind of function, eg: schemata processing, memory
bandwidth calculation.....
3. Use resctrl to replace cachetune in domain conf.
4. Split refactor virDomainCachetuneDefParse into 3 patches. And
adjust some logic, eg: use %s format error log, renaming
functions.....
5. Complete doc description. eg: update cachetune part about vcpus
overlapping with memorytune, update libvirt version info for memory
bandwidth control availability.
6. Some coding style fix.
RFC_v2->v1: John's comment: 1. use name MemBW to replace MB for a more clear description.
2. split rename patch and put refactor function part separately.
3. split virResctrlInfoMemMB and virResctrlAllocMemBW to different
patches.
4. add docs/schemas/*.rng for XML related patches.
5. some cleanup for coding conventions.
RFC_ v1->RFC_v2:
Jano's comment: 1. put renaming parts into separated patches.
2. set the initial return value as -1.
3. using full name in structure definition.
4. do not use VIR_CACHE_TYPE_LAST for memory bandwidth allocation formatting.
Pavel's comment: 1. add host capabilities XML for memory bandwidth allocation.
2. do not mix use cachetune section in XML for memory bandwidth allocation in
domain XML. define a dedicated one for memory bandwidth allocation.
Bing Niu (17):
util: Rename some functions of virresctrl
util: Refactor virResctrlGetInfo in virresctrl
util: Refactor virResctrlAllocFormat of virresctrl
util: Add MBA capability information query to resctrl
util: Add MBA check to virResctrlInfoGetCache
util: Add MBA allocation to virresctrl
util: Add MBA schemata parse and format methods
util: Add support to calculate MBA utilization
util: Introduce virResctrlAllocForeachMemory
util: Introduce virResctrlAllocSetMemoryBandwidth
conf: Rename cachetune to resctrl
conf: Factor out vcpus parsing part from virDomainCachetuneDefParse
conf: Factor out vcpus overlapping from virDomainCachetuneDefParse
conf: Factor out virDomainResctrlDef update from
virDomainCachetuneDefParse
conf: Add support for memorytune XML processing for resctrl MBA
conf: Add return value check to virResctrlAllocForeachCache
conf: Add memory bandwidth allocation capability of host
docs/formatdomain.html.in | 39 +-
docs/schemas/capability.rng | 33 ++
docs/schemas/domaincommon.rng | 17 +
src/conf/capabilities.c | 107 ++++
src/conf/capabilities.h | 11 +
src/conf/domain_conf.c | 428 ++++++++++++---
src/conf/domain_conf.h | 10 +-
src/libvirt_private.syms | 6 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_process.c | 18 +-
src/util/virresctrl.c | 611 +++++++++++++++++++--
src/util/virresctrl.h | 55 +-
.../memorytune-colliding-allocs.xml | 30 +
.../memorytune-colliding-cachetune.xml | 32 ++
tests/genericxml2xmlindata/memorytune.xml | 33 ++
tests/genericxml2xmltest.c | 5 +
.../linux-resctrl/resctrl/info/MB/bandwidth_gran | 1 +
.../linux-resctrl/resctrl/info/MB/min_bandwidth | 1 +
.../linux-resctrl/resctrl/info/MB/num_closids | 1 +
tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 8 +
tests/virresctrldata/resctrl.schemata | 1 +
21 files changed, 1280 insertions(+), 169 deletions(-)
create mode 100644 tests/genericxml2xmlindata/memorytune-colliding-allocs.xml
create mode 100644 tests/genericxml2xmlindata/memorytune-colliding-cachetune.xml
create mode 100644 tests/genericxml2xmlindata/memorytune.xml
create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/MB/bandwidth_gran
create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/MB/min_bandwidth
create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/MB/num_closids
--
2.7.4
6 years, 3 months
[libvirt] [PATCH 0/1] bhyve: Make LPC slot number configurable
by Ivan Mishonov
Windows UEFI guests didn't have working keyboard input through VNC
when LPC is on slot 1. The FreeBSD Handbook examples use slot 31
for UEFI guests. Borrowed most of the code from the qemu:commandline
implementation and made LPC slot number configurable e.g.
<domain type='bhyve' xmlns:bhyve='http://libvirt.org/schemas/domain/bhyve/1.0'>
<bhyve:lpcslotnumber value='31'/>
Ivan Mishonov (1):
bhyve: Make LPC slot number configurable
docs/schemas/domaincommon.rng | 15 ++++++
src/bhyve/bhyve_command.c | 7 ++-
src/bhyve/bhyve_conf.c | 12 +++++
src/bhyve/bhyve_conf.h | 9 ++++
src/bhyve/bhyve_device.c | 16 ++++---
src/bhyve/bhyve_domain.c | 86 ++++++++++++++++++++++++++++++++++-
src/bhyve/bhyve_domain.h | 1 +
7 files changed, 138 insertions(+), 8 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH] esx: Fix build when libcurl debug is enabled
by Marcos Paulo de Souza
When building libvirt with libcurl debug enabled (with
ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:
make[3]: Entering directory '/mnt/data/gitroot/libvirt/src'
CC esx/libvirt_driver_esx_la-esx_vi.lo
esx/esx_vi.c: In function 'esxVI_CURL_Debug':
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_IN' not handled in switch [-Werror=switch-enum]
switch (type) {
^~~~~~
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_OUT' not handled in switch [-Werror=switch-enum]
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_END' not handled in switch [-Werror=switch-enum]
Our build requires at least libcurl 7.18.0, which is pretty stable since
it was release in 2008. Fix this problem by handling the mentioned enums
in the code.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org(a)gmail.com>
---
src/esx/esx_vi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index a816c3a4f9..588670e137 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -163,7 +163,7 @@ esxVI_CURL_WriteBuffer(char *data, size_t size, size_t nmemb, void *userdata)
return 0;
}
-#define ESX_VI__CURL__ENABLE_DEBUG_OUTPUT 0
+#define ESX_VI__CURL__ENABLE_DEBUG_OUTPUT 1
#if ESX_VI__CURL__ENABLE_DEBUG_OUTPUT
static int
@@ -205,13 +205,19 @@ esxVI_CURL_Debug(CURL *curl ATTRIBUTE_UNUSED, curl_infotype type,
break;
case CURLINFO_DATA_IN:
+ case CURLINFO_SSL_DATA_IN:
VIR_DEBUG("CURLINFO_DATA_IN [[[[%s]]]]", buffer);
break;
case CURLINFO_DATA_OUT:
+ case CURLINFO_SSL_DATA_OUT:
VIR_DEBUG("CURLINFO_DATA_OUT [[[[%s]]]]", buffer);
break;
+ case CURLINFO_END:
+ VIR_DEBUG("CURLINFO_END [[[[%s]]]]", buffer);
+ break;
+
default:
VIR_DEBUG("unknown");
break;
--
2.17.1
6 years, 3 months
[libvirt] [PATCH] rpm: simplify applying of patches
by Daniel P. Berrangé
The distros we support for RPM builds all have %autosetup support so we
can ditch the convoluted code for running git manually and use the RPM
defaults.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 19ae55cdaf..a2f3112a0b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -993,43 +993,7 @@ Libvirt plugin for NSS for translating domain names into IP addresses.
%prep
-%setup -q
-
-# Patches have to be stored in a temporary file because RPM has
-# a limit on the length of the result of any macro expansion;
-# if the string is longer, it's silently cropped
-%{lua:
- tmp = os.tmpname();
- f = io.open(tmp, "w+");
- count = 0;
- for i, p in ipairs(patches) do
- f:write(p.."\n");
- count = count + 1;
- end;
- f:close();
- print("PATCHCOUNT="..count.."\n")
- print("PATCHLIST="..tmp.."\n")
-}
-
-git init -q
-git config user.name rpm-build
-git config user.email rpm-build
-git config gc.auto 0
-git add .
-git commit -q -a --author 'rpm-build <rpm-build>' \
- -m '%{name}-%{version} base'
-
-COUNT=$(grep '\.patch$' $PATCHLIST | wc -l)
-if [ $COUNT -ne $PATCHCOUNT ]; then
- echo "Found $COUNT patches in $PATCHLIST, expected $PATCHCOUNT"
- exit 1
-fi
-if [ $COUNT -gt 0 ]; then
- xargs git am <$PATCHLIST || exit 1
-fi
-echo "Applied $COUNT patches"
-rm -f $PATCHLIST
-rm -rf .git
+%autosetup -S git_am
%build
%if ! %{supported_platform}
--
2.17.1
6 years, 3 months
[libvirt] [PATCH] qemu_migration: Avoid writing to freed memory
by Jiri Denemark
When a domain is killed on the source host while it is being migrated
and libvirtd is waiting for the migration to finish (waiting for the
domain condition in qemuMigrationSrcWaitForCompletion), the run-time
state including priv->job.current may already be freed once
virDomainObjWait returns with -1. Thus the priv->job.current pointer
cached in jobInfo is no longer valid and setting jobInfo->status may
crash the daemon.
https://bugzilla.redhat.com/show_bug.cgi?id=1593137
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 435cd174af..825a9d399b 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1584,7 +1584,8 @@ qemuMigrationSrcWaitForCompletion(virQEMUDriverPtr driver,
if (events) {
if (virDomainObjWait(vm) < 0) {
- jobInfo->status = QEMU_DOMAIN_JOB_STATUS_FAILED;
+ if (virDomainObjIsActive(vm))
+ jobInfo->status = QEMU_DOMAIN_JOB_STATUS_FAILED;
return -2;
}
} else {
--
2.18.0
6 years, 3 months