Re: [PATCH v5 01/11] virstoragefile: Introduce virStoragePRDef

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/23/2018 09:14 AM, Michal Privoznik wrote:
> This is a definition that holds information on SCSI persistent
> reservation settings. The XML part looks like this:
> 
>   <reservations enabled='yes' managed='no'>
>     <source type='unix' path='/path/to/qemu-pr-helper.sock' mode='client'/>
>   </reservations>
> 
> If @managed is set to 'yes' then the <source/> is not parsed.
> This design was agreed on here:
> 
> https://www.redhat.com/archives/libvir-list/2017-November/msg01005.html
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

Even though this is present there's still an adjustment or two that
needs to be made to formatdomain.html.in

> ---
>  docs/formatdomain.html.in                          |  23 +++-
>  docs/schemas/domaincommon.rng                      |  34 +-----
>  docs/schemas/storagecommon.rng                     |  50 ++++++++
>  src/conf/domain_conf.c                             |  38 ++++++
>  src/libvirt_private.syms                           |   3 +
>  src/util/virstoragefile.c                          | 131 +++++++++++++++++++++
>  src/util/virstoragefile.h                          |  14 +++
>  .../disk-virtio-scsi-reservations.xml              |  49 ++++++++
>  .../disk-virtio-scsi-reservations.xml              |   1 +
>  tests/qemuxml2xmltest.c                            |   2 +
>  10 files changed, 314 insertions(+), 31 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations.xml
>  create mode 120000 tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations.xml
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index ada0df227f..6ed2fd349d 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -2565,7 +2565,10 @@
>    &lt;/disk&gt;
>    &lt;disk type='block' device='lun'&gt;
>      &lt;driver name='qemu' type='raw'/&gt;
> -    &lt;source dev='/dev/sda'/&gt;
> +    &lt;source dev='/dev/sda'&gt;
> +      &lt;reservations enabled='yes' managed='no'&gt;
> +        &lt;source type='unix' path='/path/to/qemu-pr-helper' mode='client'/&gt;
> +      &lt;/reservations&gt;
>      &lt;target dev='sda' bus='scsi'/&gt;
>      &lt;address type='drive' controller='0' bus='0' target='3' unit='0'/&gt;
>    &lt;/disk&gt;
> @@ -2928,6 +2931,24 @@
>              <a href="formatstorageencryption.html">Storage Encryption</a>
>              page for more information.
>            </dd>
> +          <dt><code>reservations</code></dt>
> +          <dd><span class="since">Since libvirt 4.3.0</span>, the

4.4.0

> +            <code>reservations</code> can be a sub-element of the> +            <code>source</code> element for storage sources (QEM
driver only).

QEMU

> +            If present (and enabled) it enables persistent reservations for SCSI
> +            based disks. The element has one mandatory attribute
> +            <code>enabled</code> with accepted values <code>yes</code> and
> +            <code>no</code>. If the feature is enabled, then there's another
> +            mandatory attribute <code>managed</code> (accepted values are the
> +            same as for <code>enabled</code>) that enables or disables libvirt
> +            spawning a helper process. When the PR is unmanaged, then hypervisor
> +            acts as a client and path to server socket must be provided in child
> +            element <code>source</code>, which currently accepts only the
> +            following attributes: <code>type</code> with one value
> +            <code>unix</code>, <code>path</code> with path the socket, and
> +            finally <code>mode</code> which accepts either <code>server</code>
> +            or <code>client</code> and specifies the role of hypervisor.

I know I've pointed this out before - mode only accepts client.  Yes the
grammar supports both, but the code supports only one and that's all we
should list.


> +          </dd>

Can we squeeze in a (somewhat facetiously :-)):

It's recommended to allow libvirt manage the persistent reservations.

Or

Please don't use unmanaged mode, it's going to be really painful for all
involved ;-)


John


>          </dl>
>  
>          <p>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux