
On Thu, Oct 27, 2016 at 03:37:59PM +0200, Michal Sekletar wrote:
On Thu, Oct 27, 2016 at 2:48 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
We absolutely don't want to be delegating permissions setting/labelling to udev & waiting for it to complete asychronously in the background. That leads to two completely different approaches for labelling files vs block devices making debugging harder and the overall system more complex & error prone.
libvirtd would chown and relabel but it would also trigger change event after it populates devices.udev. To make sure any change event that was possibly running before won't change permissions back. Waiting will be synchronous on libvirtd side. I admit it is a bit ugly but I think there is no other way how to solve this problem.
We can not do any sychronous wait against udev doing work - that will add an unacceptable delay in the VM startup process - it is already too long and we don't want to design a system that will make it even slower. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|