Getting /etc/lvm/lvmlocal.conf inside the mock env?

Nir Soffer nsoffer at redhat.com
Tue Aug 1 20:43:11 UTC 2017


To run lvm commands inside the mock env, we need this configuration:

# cat /etc/lvm/lvmlocal.conf
activation {
    udev_sync = 0
    udev_rules = 0
}

We can use these options from the command line, using --config '...' - but
having
it in the local lvm conf, we can test also vdsm lvm commands running in
mock.

This enables very interesting unit tests that we cannot write today, using
real
lvs on top of loop device, instead of our complicated and fragile fake lvm.

Here is an example of such test:
https://gerrit.ovirt.org/#/c/74991/11/tests/virttests/dmstats_test.py
This runs now successfully on travis and jenkins!

It would be nice if we can include this conf file in the automation/ dir,
and have
it installed inside the chroot, or we can install it manually from
check-patch.sh.

For travis we will write this file when building the container.

Nir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/infra/attachments/20170801/bae0b854/attachment.html>


More information about the Infra mailing list