[libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting
by Pavel Hrdina
You can notice it by looking for this message while booting:
"Oct 23 08:31:19 libvirt-freebsd-10 sm-mta[667]: My unqualified host
name (libvirt-freebsd-10) unknown; sleeping for retry"
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
guests/tasks/base.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml
index a71e66d..48455dd 100644
--- a/guests/tasks/base.yml
+++ b/guests/tasks/base.yml
@@ -118,6 +118,19 @@
hostname:
name: '{{ inventory_hostname }}'
+# On FreeBSD sendmail is enabled by default and it expects fully qualified
+# hostname. By disabling sendmail we will avoid sendmail to trying to resolve
+# the hostname while booting which takes several seconds.
+- name: Disable sendmail
+ lineinfile:
+ path: /etc/rc.conf
+ create: yes
+ backup: yes
+ regexp: '^sendmail_enable.*'
+ line: 'sendmail_enable="NONE"'
+ when:
+ - os_name == 'FreeBSD'
+
- name: Configure ssh access for the root user
authorized_key:
user: root
--
2.13.6
7 years, 1 month
[libvirt] Build fails on Debian unstable: libssh's ssh_get_publickey() is deprecated
by Andrea Bolognani
I ran into a failure trying to compile libvirt on Debian unstable
today:
rpc/virnetlibsshsession.c: In function 'virLibsshServerKeyAsString':
rpc/virnetlibsshsession.c:220:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
if (ssh_get_publickey(sess->session, &key) != SSH_OK) {
^~
In file included from rpc/virnetlibsshsession.c:24:0:
/usr/include/libssh/libssh.h:489:31: note: declared here
SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key);
^~~~~~~~~~~~~~~~~
CC libvirt_lxc_la-libvirt-lxc.lo
cc1: all warnings being treated as errors
Makefile:8092: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed
Looks like Debian decided to start shipping a development snapshot
instead of the latest stable release:
$ dpkg -l | grep libssh-
ii libssh-gcrypt-4:amd64 0.8.0~20170825.94fa1e38-1
ii libssh-gcrypt-dev 0.8.0~20170825.94fa1e38-1
That means we're not in a hurry; still, it probably makes sense to
try and figure out a way to keep it compiling (and working!) sooner
rather than later :)
--
Andrea Bolognani / Red Hat / Virtualization
7 years, 1 month
[libvirt] [libvirt-jenkins-ci PATCH 0/6] Implement developer flavor
by Andrea Bolognani
Make lcitool useful outside of the libvirt CI context, even though
doing so openly contradicts its name. We're just savage like that.
Andrea Bolognani (6):
guests: Open vault on demand
guests: Move configuration handling to load_config()
guests: Implement flavors
guests: Implement developer flavor
guests: Hand root password location over to Ansible
guests: Update documentation
guests/README.markdown | 45 ++++++------
guests/group_vars/all/main.yml | 4 +-
guests/host_vars/libvirt-centos-6/main.yml | 2 -
guests/host_vars/libvirt-centos-6/vault.yml | 10 ---
guests/host_vars/libvirt-centos-7/main.yml | 2 -
guests/host_vars/libvirt-centos-7/vault.yml | 10 ---
guests/host_vars/libvirt-debian-8/main.yml | 2 -
guests/host_vars/libvirt-debian-8/vault.yml | 10 ---
guests/host_vars/libvirt-debian-9/main.yml | 2 -
guests/host_vars/libvirt-debian-9/vault.yml | 10 ---
guests/host_vars/libvirt-fedora-25/main.yml | 2 -
guests/host_vars/libvirt-fedora-25/vault.yml | 10 ---
guests/host_vars/libvirt-fedora-26/main.yml | 2 -
guests/host_vars/libvirt-fedora-26/vault.yml | 10 ---
guests/host_vars/libvirt-fedora-rawhide/main.yml | 2 -
guests/host_vars/libvirt-fedora-rawhide/vault.yml | 10 ---
guests/host_vars/libvirt-freebsd-10/main.yml | 3 +-
guests/host_vars/libvirt-freebsd-10/vault.yml | 10 ---
guests/host_vars/libvirt-freebsd-11/main.yml | 3 +-
guests/host_vars/libvirt-freebsd-11/vault.yml | 10 ---
guests/host_vars/libvirt-ubuntu-12/main.yml | 2 -
guests/host_vars/libvirt-ubuntu-12/vault.yml | 8 --
guests/host_vars/libvirt-ubuntu-14/main.yml | 2 -
guests/host_vars/libvirt-ubuntu-14/vault.yml | 8 --
guests/host_vars/libvirt-ubuntu-16/main.yml | 2 -
guests/host_vars/libvirt-ubuntu-16/vault.yml | 8 --
guests/lcitool | 90 +++++++++++++++++------
guests/site.yml | 6 ++
guests/tasks/base.yml | 2 +-
guests/tasks/developer.yml | 21 ++++++
guests/tasks/jenkins.yml | 8 ++
guests/vars/vault.yml | 54 ++++++++++++++
32 files changed, 186 insertions(+), 184 deletions(-)
delete mode 100644 guests/host_vars/libvirt-centos-6/vault.yml
delete mode 100644 guests/host_vars/libvirt-centos-7/vault.yml
delete mode 100644 guests/host_vars/libvirt-debian-8/vault.yml
delete mode 100644 guests/host_vars/libvirt-debian-9/vault.yml
delete mode 100644 guests/host_vars/libvirt-fedora-25/vault.yml
delete mode 100644 guests/host_vars/libvirt-fedora-26/vault.yml
delete mode 100644 guests/host_vars/libvirt-fedora-rawhide/vault.yml
delete mode 100644 guests/host_vars/libvirt-freebsd-10/vault.yml
delete mode 100644 guests/host_vars/libvirt-freebsd-11/vault.yml
delete mode 100644 guests/host_vars/libvirt-ubuntu-12/vault.yml
delete mode 100644 guests/host_vars/libvirt-ubuntu-14/vault.yml
delete mode 100644 guests/host_vars/libvirt-ubuntu-16/vault.yml
create mode 100644 guests/tasks/developer.yml
create mode 100644 guests/vars/vault.yml
--
2.13.6
7 years, 1 month
[libvirt] [jenkins-ci PATCH 0/3] guests: Fixes for development releases
by Andrea Bolognani
Andrea Bolognani (3):
guests: Use non-debug kernel on Fedora Rawhide
ansible: Use ansible_distribution_release on FreeBSD
guests: Add Debian sid and FreeBSD -CURRENT
guests/files/fedora-rawhide-kernel-nodebug.repo | 8 +++
guests/host_vars/libvirt-debian-sid/install.yml | 3 ++
guests/host_vars/libvirt-debian-sid/main.yml | 19 +++++++
guests/host_vars/libvirt-debian-sid/vault.yml | 8 +++
guests/host_vars/libvirt-freebsd-current/main.yml | 25 +++++++++
guests/host_vars/libvirt-freebsd-current/vault.yml | 8 +++
guests/tasks/base.yml | 61 ++++++++++++++--------
7 files changed, 111 insertions(+), 21 deletions(-)
create mode 100644 guests/files/fedora-rawhide-kernel-nodebug.repo
create mode 100644 guests/host_vars/libvirt-debian-sid/install.yml
create mode 100644 guests/host_vars/libvirt-debian-sid/main.yml
create mode 100644 guests/host_vars/libvirt-debian-sid/vault.yml
create mode 100644 guests/host_vars/libvirt-freebsd-current/main.yml
create mode 100644 guests/host_vars/libvirt-freebsd-current/vault.yml
--
2.13.6
7 years, 1 month
Re: [libvirt] [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP
by Eduardo Habkost
On Thu, Oct 19, 2017 at 04:28:59PM +0100, Daniel P. Berrange wrote:
> On Thu, Oct 19, 2017 at 11:21:22AM -0400, Igor Mammedov wrote:
> > ----- Original Message -----
> > > From: "Daniel P. Berrange" <berrange(a)redhat.com>
> > > To: "Igor Mammedov" <imammedo(a)redhat.com>
> > > Cc: "peter maydell" <peter.maydell(a)linaro.org>, pkrempa(a)redhat.com, ehabkost(a)redhat.com, cohuck(a)redhat.com,
> > > qemu-devel(a)nongnu.org, armbru(a)redhat.com, pbonzini(a)redhat.com, david(a)gibson.dropbear.id.au
> > > Sent: Wednesday, October 18, 2017 5:30:10 PM
> > > Subject: Re: [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP
> > >
> > > On Tue, Oct 17, 2017 at 06:06:35PM +0200, Igor Mammedov wrote:
> > > > On Tue, 17 Oct 2017 16:07:59 +0100
> > > > "Daniel P. Berrange" <berrange(a)redhat.com> wrote:
> > > >
> > > > > On Tue, Oct 17, 2017 at 09:27:02AM +0200, Igor Mammedov wrote:
> > > > > > On Mon, 16 Oct 2017 17:36:36 +0100
> > > > > > "Daniel P. Berrange" <berrange(a)redhat.com> wrote:
> > > > > >
> > > > > > > On Mon, Oct 16, 2017 at 06:22:50PM +0200, Igor Mammedov wrote:
> > > > > > > > Series allows to configure NUMA mapping at runtime using QMP/HMP
> > > > > > > > interface. For that to happen it introduces a new '-paused' CLI
> > > > > > > > option
> > > > > > > > which allows to pause QEMU before machine_init() is run and
> > > > > > > > adds new set-numa-node HMP/QMP commands which in conjuction with
> > > > > > > > info hotpluggable-cpus/query-hotpluggable-cpus allow to configure
> > > > > > > > NUMA mapping for cpus.
> > > > > > >
> > > > > > > What's the problem we're seeking solve here compared to what we
> > > > > > > currently
> > > > > > > do for NUMA configuration ?
> > > > > > From RHBZ1382425
> > > > > > "
> > > > > > Current -numa CLI interface is quite limited in terms that allow map
> > > > > > CPUs to NUMA nodes as it requires to provide cpu_index values which
> > > > > > are non obvious and depend on machine/arch. As result libvirt has to
> > > > > > assume/re-implement cpu_index allocation logic to provide valid
> > > > > > values for -numa cpus=... QEMU CLI option.
> > > > >
> > > > > In broad terms, this problem applies to every device / object libvirt
> > > > > asks QEMU to create. For everything else libvirt is able to assign a
> > > > > "id" string, which is can then use to identify the thing later. The
> > > > > CPU stuff is different because libvirt isn't able to provide 'id'
> > > > > strings for each CPU - QEMU generates a psuedo-id internally which
> > > > > libvirt has to infer. The latter is the same problem we had with
> > > > > devices before '-device' was introduced allowing 'id' naming.
> > > > >
> > > > > IMHO we should take the same approach with CPUs and start modelling
> > > > > the individual CPUs as something we can explicitly create with -object
> > > > > or -device. That way libvirt can assign names and does not have to
> > > > > care about CPU index values, and it all works just the same way as
> > > > > any other devices / object we create
> > > > >
> > > > > ie instead of:
> > > > >
> > > > > -smp 8,sockets=4,cores=2,threads=1
> > > > > -numa node,nodeid=0,cpus=0-3
> > > > > -numa node,nodeid=1,cpus=4-7
> > > > >
> > > > > we could do:
> > > > >
> > > > > -object numa-node,id=numa0
> > > > > -object numa-node,id=numa1
> > > > > -object cpu,id=cpu0,node=numa0,socket=0,core=0,thread=0
> > > > > -object cpu,id=cpu1,node=numa0,socket=0,core=1,thread=0
> > > > > -object cpu,id=cpu2,node=numa0,socket=1,core=0,thread=0
> > > > > -object cpu,id=cpu3,node=numa0,socket=1,core=1,thread=0
> > > > > -object cpu,id=cpu4,node=numa1,socket=2,core=0,thread=0
> > > > > -object cpu,id=cpu5,node=numa1,socket=2,core=1,thread=0
> > > > > -object cpu,id=cpu6,node=numa1,socket=3,core=0,thread=0
> > > > > -object cpu,id=cpu7,node=numa1,socket=3,core=1,thread=0
> > > > the follow up question would be where do "socket=3,core=1,thread=0"
> > > > come from, currently these options are the function of
> > > > (-M foo -smp ...) and can be queried vi query-hotpluggble-cpus at
> > > > runtime after qemu parses -M and -smp options.
> > >
> > > NB, I realize my example was open to mis-interpretation. The values I'm
> > > illustrating here for socket=3,core=1,thread=0 and *not* ID values, they
> > > are a plain enumeration of values. ie this is saying the 4th socket, the
> > > 2nd core and the 1st thread. Internally QEMU might have the 2nd core
> > > with a core-id of 8, or 7038 or whatever architecture specific numbering
> > > scheme makes sense, but that's not what the mgmt app gives at the CLI
> > > level
> > Even though fixed properties/values simplicity is tempting and it might even
> > work for what we have implemented in qemu currently (well, SPAPR will need
> > refactoring (if possible) to meet requirements + compat stuff for current
> > machines with sparse IDs).
> > But I have to disagree here and try to oppose it.
> >
> > QEMU models concrete platforms/hw with certain non abstract properties
> > and it's libvirt's domain to translate platform specific devices into
> > 'spherical' devices with abstract properties.
> >
> > Now back to cpus and suggestion to fix the set of 'address' properties
> > and their values into continuous enumeration range [0..N). That would
> > 1. put a burden of hiding platform/device details on QEMU
> > (which is already bad as QEMU's job is to emulate it)
> > 2. with abstract 'address' properties and values, user won't have
> > a clue as to where device is being attached (as qemu would magically
> > remap that to fit specific machine needs)
> > 2.1. if abstract 'address' properties and values we can do away with
> > socket/core/thread/whatnot since they won't mean the same when considered
> > from platform point of view, so we can just drop all these nonsense
> > and go back to cpu-index that has all the properties you've suggested
> > /abstract, [0..N]/.
> > 3. we currently stopped with socket|core|thread-id properties as they are
> > applicable to machines that support -device cpu, but it's up to machine
> > to pick witch of these to use (x86: uses all, spar: uses core-id only),
> > but current property set is open for extension if need arises without
> > need to redefine interface. So fixed list of properties [even ignoring
> > values impact] doesn't scale.
>
> Note from the libvirt POV, we don't expose socket-id/core-id/thread-id in our
> guest XML, we just provide an overall count of sockets/cores/threads which is
> portable. The only arch specific thing we would have todo is express constraints
> about ratios of these - eg indicate in some way that ppc doesn't allow mutliple
> threads per core for example.
>
> > We even have cpu-add command which takes cpu-index as argument and
> > -numa node,cpus=0..X CLI option, good luck with figuring out which cpu goes
> > where and if it makes any sense from platform point of view.
> >
> > That's why when designing hot plug for 'device_add cpu' interface, we ended up
> > with new query-hotpluggble-cpus QMP command, which is currently used by libvirt
> > for hot-plug:
> >
> > Approach allows
> > 1: machine to publish properties/values that make sense from emulated
> > platform point of view but still understandable by user of given hw.
> > 2: user may use them as opaque mandatory properties to create cpu device if
> > he/she doesn't care about where it's plugged.
> > 3: if user cares about which cpu goes where, properties defined by machine
> > provide that info from emulated hw point of view including platform specific
> > details.
> > 4: it's easy to extend set of properties/values if need arises without
> > breaking users (provided user will put them all in -device/device_add
> > options as it's supposed to)
> >
> > But current approach has drawback, to call query-hotpluggble-cpus, machine has to
> > be started first, which is fine for hot plug but not for specifying CLI options.
> >
> > Currently that could be solved by starting qemu twice when 'defining domain',
> > where on the first run mgmt queries board layout and caches it for all the next
> > times the defined machine is started (change in machine/version/-smp/-cpu will
> > invalidate, cache).
> >
> > This series allows to avoid this 1st time restart, when creating domain for
> > the first time, mgmt can query layout and then specify numa mapping without
> > restarting, it can cache defined mapping as commands exactly match corresponding
> > CLI options and reuse cached options on the next domain starts.
> >
> > This approach could be extended further with "device_add cpu" command
> > so it would be possible to start qemu with -smp 0,... and allow mgmt to
> > create cpus with explicit IDs controlled by mgmt, and again mgmt may cache
> > these commands and reuse them on CLI next time machine is started
> >
> > I think Eduardo's work on query-slots is superset of query-hotpluggble-cpus,
> > but working to the same goal to allow mgmt discover which hw is provided by
> > specific machine and where/which hw could be plugged (like which slot supports
> > which kind of device and which 'address' should be used to attach device
> > (socket|core... - for cpus, bus/function - for pic, ...)
>
> As mentioned elsewhere in the thread, the approach of defining the VM config
> incrementally via the monitor has significant downsides, by making the config
> invisible in any logs of the ARGV, and has likely performance impact when
> starting up QEMU, particularly if it is used for more things going forward. To
> me these downsides are enough to make the suggested approach for CPUs impractical
> for libvirt to use.
Those downsides do exist, but we should weight them against the
downsides of not allowing any information at all to flow from
QEMU to libvirt when starting a VM.
I believe the code in libvirt/src/qemu/qemu_domain_address.c is
a good illustration of those downsides.
--
Eduardo
7 years, 1 month
[libvirt] [RFC] Question regarding the validity of QEMU capabilities
by Marc Hartmayer
Hi all,
the actual capabilities of QEMU are depending on the host. This
includes dependencies like which kernel modules are loaded or which
kernel parameters are used (e.g. kvm.nested). Therefore, after a
restart we cannot be sure that the QEMU capabilities remain the same.
How can we solve this problem?
I have come up with two ways:
- reprobe the capabilities with every host reboot
- check for every possible change in virQEMUCapsIsValid... (this is
already done for KVM). In my opinion this is not the way to go.
Thanks.
Marc
7 years, 1 month
[libvirt] [PATCH 0/3] qemu: Fix race condition between block jobs and the end of migration
by Jiri Denemark
When migrating both memory and storage, we need to make sure block jobs
are finished after the virtual CPUs get paused at the end of migration
but before QEMU completes the migration otherwise QEMU may die with
_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed
This is a libvirt side of the QEMU fix from Dr. David Alan Gilbert:
http://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg04895.html
Applicable on top of my "Preparation for new QEMU migration states"
series I sent yesterday.
Jiri Denemark (3):
qemu: Add support for migrate-continue QMP command
qemu: Add pause-before-switchover migration capability
qemu: Enabled pause-before-switchover migration capability
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_migration.c | 75 +++++++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_monitor.c | 18 +++++++++--
src/qemu/qemu_monitor.h | 6 ++++
src/qemu/qemu_monitor_json.c | 29 +++++++++++++++++
src/qemu/qemu_monitor_json.h | 4 +++
7 files changed, 131 insertions(+), 3 deletions(-)
--
2.14.2
7 years, 1 month
[libvirt] Exposing mem-path in domain XML
by Michal Privoznik
Dear list,
there is the following bug [1] which I'm not quite sure how to grasp. So
there is this application/infrastructure called Kove [2] that allows you
to have memory for your application stored on a distant host in network
and basically fetch needed region on pagefault. Now imagine that
somebody wants to use it for backing up domain memory. However, the way
that the tool works is it has some kernel module and then some userland
binary that is fed with the path of the mmaped file. I don't know all
the details, but the point is, in order to let users use this we need to
expose the paths for mem-path for the guest memory. I know we did not
want to do this in the past, but now it looks like we don't have a way
around it, do we?
Michal
1: https://bugzilla.redhat.com/show_bug.cgi?id=1461214
2: http://kove.net
7 years, 1 month
[libvirt] Question about the host-model CPU mode
by Marc Hartmayer
Let's assume we've a z13 system with a QEMU 2.9 and we define a domain
using the default s390-virtio-ccw machine together with the host-model
CPU mode. The definition will have the machine expanded to
s390-virtio-ccw-2.9 but retain the host-model CPU mode. In a next step
we upgrade to QEMU 2.10 (first version to recognize z14). Everything is
still fine, even though the machine runs in 2.9 compatibility
mode. Finally we upgrade to a z14. As a consequence it is not possible
to start the domain anymore as the machine type doesn't support our CPU
host model (which is expanded at start time of the domain).
Is this behavior expected?
There are some ways to avoid this problem:
- CPU model expansion is performed at domain definition time
- host-model is related to the machine type of a domain
Thank you in advance.
Beste Grüße / Kind regards
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
7 years, 1 month
[libvirt] [PATCH v2 00/11] Never ending story of user supplied aliases
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2017-October/msg00790.html
diff to v1:
- new patch 1/11 to address Pavel's findings
- reworked parsing so that the alias is set iff it follows the rules
- added some tests
- added news.xml entry
Michal Privoznik (11):
qemu_alias: Be more tolerant if alias don't follow our format
conf: Parse user supplied aliases
conf: Validate user supplied aliases
qemuDomainABIStabilityCheck: Check for memory aliases too
qemuxml2argvdata: Drop device aliases
qemuhotplugtest: Load active XML
conf: Format alias even for inactive XMLs
docs: Document user aliases
qemu: Parse alias from inactive XMLs
tests: Test user set aliases for qemu
news: Document user aliases
docs/formatdomain.html.in | 23 +++
docs/news.xml | 9 ++
src/conf/domain_conf.c | 171 ++++++++++++++++++++-
src/conf/domain_conf.h | 6 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 22 +--
src/qemu/qemu_domain.c | 18 ++-
src/qemu/qemu_driver.c | 3 +
tests/qemuhotplugtest.c | 3 +-
.../qemuxml2argv-disk-cdrom-network-ftp.xml | 1 -
.../qemuxml2argv-disk-cdrom-network-ftps.xml | 1 -
.../qemuxml2argv-disk-cdrom-network-http.xml | 1 -
.../qemuxml2argv-disk-cdrom-network-https.xml | 1 -
.../qemuxml2argv-disk-cdrom-network-tftp.xml | 1 -
.../qemuxml2argv-usb-redir-filter.xml | 1 -
.../qemuxml2argv-user-aliases.args | 71 +++++++++
.../qemuxml2argvdata/qemuxml2argv-user-aliases.xml | 140 +++++++++++++++++
tests/qemuxml2argvtest.c | 5 +
.../qemuxml2xmlout-user-aliases.xml | 1 +
tests/qemuxml2xmltest.c | 2 +
20 files changed, 449 insertions(+), 32 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-user-aliases.xml
--
2.13.6
7 years, 1 month