Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-30 Thread Michal Privoznik
On 27.10.2016 02:13, Michal Sekletar wrote: > On Thu, Oct 27, 2016 at 8:37 AM, Jiri Denemark wrote: > >> Yeah, the rule should really be part of this series. > > I am working on udev hook-up. I found out that SECLABEL key doesn't > support substitutions (see %c in man 7

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-30 Thread Michal Sekletar
On Thu, Oct 27, 2016 at 3:08 PM, Daniel P. Berrange wrote: > > IIUC, we can possibly achieve our goal using GOTO, with two rules. > > In a 00-libvirt-early.rules have a rule that runs libvirt_udevhelper > and adds a "GOTO=libvirt-end". Then in zz-libvirt-late.rules >

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-30 Thread Michal Sekletar
On Thu, Oct 27, 2016 at 2:48 PM, Daniel P. Berrange 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

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-30 Thread Daniel P. Berrange
On Thu, Oct 27, 2016 at 11:13:28AM +0200, Michal Sekletar wrote: > On Thu, Oct 27, 2016 at 8:37 AM, Jiri Denemark wrote: > > > Yeah, the rule should really be part of this series. > > I am working on udev hook-up. I found out that SECLABEL key doesn't > support

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-30 Thread Michal Sekletar
On Thu, Oct 27, 2016 at 8:37 AM, Jiri Denemark wrote: > Yeah, the rule should really be part of this series. I am working on udev hook-up. I found out that SECLABEL key doesn't support substitutions (see %c in man 7 udev). I need to fix that first and then we can have very

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Jiri Denemark
On Thu, Oct 27, 2016 at 15:08:37 +0200, Daniel P. Berrange wrote: > On Thu, Oct 27, 2016 at 09:25:41AM +0200, Daniel P. Berrange wrote: > > On Thu, Oct 27, 2016 at 08:37:02AM +0200, Jiri Denemark wrote: > > > On Wed, Oct 26, 2016 at 17:39:35 +0200, Daniel P. Berrange wrote: > > > > On Wed, Oct 26,

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Michal Sekletar
On Thu, Oct 27, 2016 at 4:09 PM, Daniel P. Berrange wrote: > We should never be spawning a VM using a disk at the same time as the > underlying device is appearing - other unrelated devices may be > appearing/disappearing at this time, but not the one the VM is using. > > The

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Daniel P. Berrange
On Thu, Oct 27, 2016 at 04:02:33PM +0200, Michal Sekletar wrote: > On Thu, Oct 27, 2016 at 3:45 PM, Daniel P. Berrange > wrote: > > > We can not do any sychronous wait against udev doing work - that will > > add an unacceptable delay in the VM startup process - it is

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Michal Sekletar
On Thu, Oct 27, 2016 at 3:45 PM, Daniel P. Berrange wrote: > 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 >

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Daniel P. Berrange
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 > wrote: > > > We absolutely don't want to be delegating permissions setting/labelling > > to udev & waiting for it to complete asychronously in the

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Daniel P. Berrange
On Thu, Oct 27, 2016 at 09:25:41AM +0200, Daniel P. Berrange wrote: > On Thu, Oct 27, 2016 at 08:37:02AM +0200, Jiri Denemark wrote: > > On Wed, Oct 26, 2016 at 17:39:35 +0200, Daniel P. Berrange wrote: > > > On Wed, Oct 26, 2016 at 02:36:58PM +0200, Michal Privoznik wrote: > > > > This is a small

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Daniel P. Berrange
On Thu, Oct 27, 2016 at 08:37:02AM +0200, Jiri Denemark wrote: > On Wed, Oct 26, 2016 at 17:39:35 +0200, Daniel P. Berrange wrote: > > On Wed, Oct 26, 2016 at 02:36:58PM +0200, Michal Privoznik wrote: > > > This is a small helper intended to be run by udev. On its input > > > (either as the only

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-27 Thread Jiri Denemark
On Wed, Oct 26, 2016 at 17:39:35 +0200, Daniel P. Berrange wrote: > On Wed, Oct 26, 2016 at 02:36:58PM +0200, Michal Privoznik wrote: > > This is a small helper intended to be run by udev. On its input > > (either as the only command line argument or in DEVNODE > > environment vairable) it is

Re: [libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-26 Thread Daniel P. Berrange
On Wed, Oct 26, 2016 at 02:36:58PM +0200, Michal Privoznik wrote: > This is a small helper intended to be run by udev. On its input > (either as the only command line argument or in DEVNODE > environment vairable) it is given a device and on the output it > will either put nothing (meaning the

[libvirt] [PATCH 11/17] util: Introduce libvirt_udevhelper

2016-10-26 Thread Michal Privoznik
This is a small helper intended to be run by udev. On its input (either as the only command line argument or in DEVNODE environment vairable) it is given a device and on the output it will either put nothing (meaning the device is not used by any of the libvirt domains), or it will print out