[libvirt] [PATCH jenkins-ci] Fix workspace for python check/rpm jobs
by Daniel P. Berrangé
The check/rpm jobs were using a different workspace to the build job, so
never saw the correct content.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a build fix for virt-manager CI
jobs/python-distutils.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml
index 510769e..16eca1c 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -58,7 +58,7 @@
name: '{name}-{branch}-py{pyver}-check'
project-type: matrix
description: '{title} Check (Python {pyver})'
- workspace: '{name}-{branch}'
+ workspace: '{name}-{branch}-py{pyver}'
child-workspace: '.'
block-downstream: true
block-upstream: true
@@ -97,7 +97,7 @@
name: '{name}-{branch}-py{pyver}-rpm'
project-type: matrix
description: '{title} RPM (Python {pyver})'
- workspace: '{name}-{branch}'
+ workspace: '{name}-{branch}-py{pyver}'
child-workspace: '.'
block-downstream: true
block-upstream: true
--
2.14.3
6 years, 10 months
[libvirt] [PATCH] tools: avoid text spilling into variables
by Dariusz Gadomski
From: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
While libvirt-guests.sh is running cases can let guest_is_on fail which
causes check_guests_shutdown to print output.
That output shall not spill into the users of function
check_guests_shutdown which is therefore now returning values in a
variable like guest_is_on already did.
Original-Author: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Modified-By: Jorge Niedbalski <niedbalski(a)ubuntu.com>
---
tools/libvirt-guests.sh.in | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
index 8a158cca4..91a2f3283 100644
--- a/tools/libvirt-guests.sh.in
+++ b/tools/libvirt-guests.sh.in
@@ -329,12 +329,13 @@ guest_count()
# check_guests_shutdown URI GUESTS
# check if shutdown is complete on guests in "GUESTS" and returns only
# guests that are still shutting down
+# Result is returned in "guests_shutting_down"
check_guests_shutdown()
{
uri=$1
guests=$2
- guests_up=
+ guests_shutting_down=
for guest in $guests; do
if ! guest_is_on "$uri" "$guest" >/dev/null 2>&1; then
eval_gettext "Failed to determine state of guest: \$guest. Not tracking it anymore."
@@ -342,10 +343,9 @@ check_guests_shutdown()
continue
fi
if "$guest_running"; then
- guests_up="$guests_up $guest"
+ guests_shutting_down="$guests_shutting_down $guest"
fi
done
- echo "$guests_up"
}
# print_guests_shutdown URI BEFORE AFTER
@@ -392,8 +392,10 @@ shutdown_guests_parallel()
guest=$1
shift
guests=$*
- shutdown_guest_async "$uri" "$guest"
- on_shutdown="$on_shutdown $guest"
+ if [ -z "$(echo $on_shutdown | grep $guest)" -a -n "$(guest_name "$uri" "$guest")" ]; then
+ shutdown_guest_async "$uri" "$guest"
+ on_shutdown="$on_shutdown $guest"
+ fi
done
sleep 1
@@ -420,7 +422,8 @@ shutdown_guests_parallel()
fi
on_shutdown_prev=$on_shutdown
- on_shutdown=$(check_guests_shutdown "$uri" "$on_shutdown")
+ check_guests_shutdown "$uri" "$on_shutdown"
+ on_shutdown="$guests_shutting_down"
print_guests_shutdown "$uri" "$on_shutdown_prev" "$on_shutdown"
done
}
--
2.14.1
6 years, 10 months
Re: [libvirt] [Libvirt-ci] Build failed in Jenkins: virt-manager-master-py3-check » libvirt-debian-9 #14
by Cole Robinson
I'm confused why this is still failing. I set up a debian9 vm,
reproduced the issue which fails about 50% of the time, and verified
that commit 059fb7d0ba1d414db3db485903972b48c1dda629 fixes it
completely, or at least I can't reproduce. But this is still failing.
Weirdly though
On 02/22/2018 04:18 PM, ci(a)centos.org wrote:
> See <https://ci.centos.org/job/virt-manager-master-py3-check/systems=libvirt-d...>
>
> ------------------------------------------
> Started by upstream project "virt-manager-master-py3-check" build number 14
> originally caused by:
> Started by upstream project "virt-manager-master-py3-build" build number 14
> originally caused by:
> Started by an SCM change
> [EnvInject] - Loading node environment variables.
> Building remotely on libvirt-debian-9 (libvirt) in workspace <https://ci.centos.org/job/virt-manager-master-py3-check/systems=libvirt-d...>
> [virt-manager-master] $ /bin/sh -xe /tmp/jenkins3940620727838286920.sh
> + MAKE=make
> + uname
> + unamestr=Linux
> + [ Linux = FreeBSD ]
> + export PATH=/home/jenkins/build/libvirt/bin:/home/jenkins/build/libvirt/bin:/home/jenkins/build/libvirt/bin:/home/jenkins/build/libvirt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> + export PYTHONPATH=/home/jenkins/build/libvirt/lib/python3.4/site-packages:/home/jenkins/build/libvirt/lib64/python3.4/site-packages:/home/jenkins/build/libvirt/lib/python3.5/site-packages:/home/jenkins/build/libvirt/lib64/python3.5/site-packages:/home/jenkins/build/libvirt/lib/python3.6/site-packages:/home/jenkins/build/libvirt/lib64/python3.6/site-packages:/home/jenkins/build/libvirt/lib/python3.7/site-packages:/home/jenkins/build/libvirt/lib64/python3.7/site-packages
> + python3 ./setup.py test
> running test
> ..............................................................................................................................F...............................................................................................................................................s........................................................................................................................................................................
> ======================================================================
> FAIL: testCLI0002virt_install_singleton_config_2 (tests.clitest.CLITests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "<https://ci.centos.org/job/virt-manager-master-py3-check/systems=libvirt-d...",> line 1110, in <lambda>
> return lambda s: cmdtemplate(s, cmd)
> File "<https://ci.centos.org/job/virt-manager-master-py3-check/systems=libvirt-d...",> line 1109, in cmdtemplate
> _cmdobj.run(self)
> File "<https://ci.centos.org/job/virt-manager-master-py3-check/systems=libvirt-d...",> line 277, in run
> tests.fail(err)
These line numbers don't match up with the line numbers in virt-manager
git master. Is there some chance it's using old code? it certainly seems
to be detecting new commits coming in which trigger builds, but I thing
something weird is going on here
- Cole
6 years, 10 months
[libvirt] [PATCH] make: fix VPATH install of upstart files
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a build fix
src/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index a7f03319c1..cb30c50f14 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3181,7 +3181,8 @@ install-upstart: install-sysconfig
for f in $(UPSTART_FILES:%.upstart=%); \
do \
tgt=`basename $$f` ; \
- $(INSTALL_SCRIPT) $$f.upstart $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$f.upstart \
+ $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
done
uninstall-upstart: uninstall-sysconfig
--
2.14.3
6 years, 10 months
[libvirt] [PATCH v1 00/16] Start to modularize src/Makefile.am
by Daniel P. Berrangé
The src/Makefile.am is quite large and has quite poor grouping of rules
/ variables / etc. This makes it increasingly hard to identify all the
rules relating to a particular area of code.
Traditionally one might create Makefile.am's in each sub-directory and
let make recurse into each. Recursive make is quite a bad idea in
general though because it harms parallelization and means that make does
not have a full view of dependencies.
This series thus takes a different approach to modularization which is
to make use of the "include" statement to pull in makefile fragments
from subdirectories. automake fully expands all "include" statements
when generating the Makefile.in, so we still end up with a single
monolithic file for the eventual build. Aside from ensuring make still
has a full view of dependencies, this also means that all variables are
still in a global namespace.
In doing this split, I've taken the opportunity to santize the variable
declarations into a consistent style. Any variable that is assigned more
than one value now uses line continuations with exactly one value per
line and a trailing $(NULL). It would be nice to enforce this style with
a syntax-check rule but I've not figured this out yet.
This series only moves the virt drivers. So there's obviously a further
series to follow behind this to finish the job for other drivers.
Daniel P. Berrangé (16):
make: split UML driver build rules into uml/Makefile.inc.am
make: split PHyp driver build rules into phyp/Makefile.inc.am
make: split test driver build rules into test/Makefile.inc.am
make: split ESX driver build rules into esx/Makefile.inc.am
make: split hyperv driver build rules into hyperv/Makefile.inc.am
make: split vmware driver build rules into vmware/Makefile.inc.am
make: split vbox driver build rules into vbox/Makefile.inc.am
make: split openvz driver build rules into openvz/Makefile.inc.am
make: split qemu driver build rules into qemu/Makefile.inc.am
make: split bhyve driver build rules into bhyve/Makefile.inc.am
make: split xenconfig driver build rules into
xenconfig/Makefile.inc.am
make: split libxl driver build rules into libxl/Makefile.inc.am
make: split xen driver build rules into xen/Makefile.inc.am
make: split xenapi driver build rules into xenapi/Makefile.inc.am
make: split vz driver build rules into vz/Makefile.inc.am
make: split lxc driver build rules into lxc/Makefile.inc.am
src/Makefile.am | 872 +++---------------------------------------
src/bhyve/Makefile.inc.am | 73 ++++
src/esx/Makefile.inc.am | 90 +++++
src/hyperv/Makefile.inc.am | 59 +++
src/libxl/Makefile.inc.am | 104 +++++
src/lxc/Makefile.inc.am | 207 ++++++++++
src/openvz/Makefile.inc.am | 28 ++
src/phyp/Makefile.inc.am | 19 +
src/qemu/Makefile.inc.am | 148 +++++++
src/test/Makefile.inc.am | 26 ++
src/uml/Makefile.inc.am | 46 +++
src/vbox/Makefile.inc.am | 76 ++++
src/vmware/Makefile.inc.am | 27 ++
src/vz/Makefile.inc.am | 38 ++
src/xen/Makefile.inc.am | 67 ++++
src/xenapi/Makefile.inc.am | 28 ++
src/xenconfig/Makefile.inc.am | 28 ++
17 files changed, 1122 insertions(+), 814 deletions(-)
create mode 100644 src/bhyve/Makefile.inc.am
create mode 100644 src/esx/Makefile.inc.am
create mode 100644 src/hyperv/Makefile.inc.am
create mode 100644 src/libxl/Makefile.inc.am
create mode 100644 src/lxc/Makefile.inc.am
create mode 100644 src/openvz/Makefile.inc.am
create mode 100644 src/phyp/Makefile.inc.am
create mode 100644 src/qemu/Makefile.inc.am
create mode 100644 src/test/Makefile.inc.am
create mode 100644 src/uml/Makefile.inc.am
create mode 100644 src/vbox/Makefile.inc.am
create mode 100644 src/vmware/Makefile.inc.am
create mode 100644 src/vz/Makefile.inc.am
create mode 100644 src/xen/Makefile.inc.am
create mode 100644 src/xenapi/Makefile.inc.am
create mode 100644 src/xenconfig/Makefile.inc.am
--
2.14.3
6 years, 10 months
[libvirt] [PATCH V2] libxl: round memory values to next 1MiB increment
by Jim Fehlig
libxl requires the memory sizes to be rounded to 1MiB increments.
Attempting to start a domain that violates this requirement will
fail with the marginally helpful error
2018-02-22 01:55:32.921+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
2018-02-22 01:55:32.921+0000: libxl: libxl_dom.c:671:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory
Round the maximum and current memory values to the next 1MiB
increment when generating the libxl_domain_config object.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
V2:
Set rounded memory values in virDomainDef object so they are correctly
reflected in the live config.
src/libxl/libxl_conf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 57cb4c0ad..d074edc9c 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -367,6 +367,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
}
b_info->sched_params.weight = 1000;
+ /* Xen requires the memory sizes to be rounded to 1MiB increments */
+ virDomainDefSetMemoryTotal(def,
+ VIR_ROUND_UP(virDomainDefGetMemoryInitial(def), 1024));
+ def->mem.cur_balloon = VIR_ROUND_UP(def->mem.cur_balloon, 1024);
b_info->max_memkb = virDomainDefGetMemoryInitial(def);
b_info->target_memkb = def->mem.cur_balloon;
if (hvm) {
--
2.16.1
6 years, 10 months
[libvirt] [PATCH] libvirt.spec.in: Don't distribute libvirtd.upstart
by Michal Privoznik
Firstly, for rpm we are building libvirt with
--init-script=systemd or --init-script=redhat. So upstart is
never enabled. And only due to a bug we installed
libvirtd.upstart file.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
libvirt.spec.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1eca4e39d..8f46f58b5 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1825,7 +1825,6 @@ exit 0
%{_sysconfdir}/rc.d/init.d/virtlogd
%{_sysconfdir}/rc.d/init.d/virtlockd
%endif
-%doc daemon/libvirtd.upstart
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
--
2.16.1
6 years, 10 months
[libvirt] [PATCH] qemu_hotplug: Drop dead code in net update
by Jiri Denemark
vm->def->nets[changeidx] can never be NULL for changeidx returned by
virDomainNetFindIdx.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 87cf578acc..e0a5300f08 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3061,12 +3061,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
if ((changeidx = virDomainNetFindIdx(vm->def, newdev)) < 0)
goto cleanup;
devslot = &vm->def->nets[changeidx];
-
- if (!(olddev = *devslot)) {
- virReportError(VIR_ERR_OPERATION_FAILED, "%s",
- _("cannot find existing network device to modify"));
- goto cleanup;
- }
+ olddev = *devslot;
oldType = virDomainNetGetActualType(olddev);
if (oldType == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
--
2.16.2
6 years, 10 months
[libvirt] [PATCH] libxl: round memory values to next 1MiB increment
by Jim Fehlig
libxl requires the memory sizes to be rounded to 1MiB increments.
Attempting to start a domain that violates this requirement will
fail with the marginally helpful error
2018-02-22 01:55:32.921+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
2018-02-22 01:55:32.921+0000: libxl: libxl_dom.c:671:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory
Round the maximum and current memory values to the next 1MiB
increment when generating the libxl_domain_config object.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
The memory values could also be adjusted in the post parse callback,
which might be better since the virDomainDef object would then reflect
the actual values given to libxl. In general, I often find myself
confused about the dividing line between adjusting such things in the
post parse callback vs domain creation.
src/libxl/libxl_conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 57cb4c0ad..02bbf4e28 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -367,8 +367,8 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
}
b_info->sched_params.weight = 1000;
- b_info->max_memkb = virDomainDefGetMemoryInitial(def);
- b_info->target_memkb = def->mem.cur_balloon;
+ b_info->max_memkb = VIR_ROUND_UP(virDomainDefGetMemoryInitial(def), 1024);
+ b_info->target_memkb = VIR_ROUND_UP(def->mem.cur_balloon, 1024);
if (hvm) {
char bootorder[VIR_DOMAIN_BOOT_LAST + 1];
--
2.16.1
6 years, 10 months
[libvirt] [PATCH] make: fix another VPATH bug impacting install of sysconf files
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as build fix
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 2166e17dbe..8ceeda5756 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2833,7 +2833,7 @@ install-sysconfig:
for f in $(SYSCONF_FILES:%.sysconf=%) ; \
do \
tgt=`basename $$f`; \
- $(INSTALL_SCRIPT) $$f.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$f.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
done
uninstall-sysconfig:
--
2.14.3
6 years, 10 months