Re: [PATCH 1/2] storage: Alter check for default managed setting

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

 



On Mon, Jul 03, 2017 at 02:52:05PM -0400, John Ferlan wrote:
> Only alter the managed setting if it wasn't provided. If someone provided
> 'no', then honor that rather than overwriting.

IMO this deserves to be tracked by a BZ, since the current behaviour is in
contrast to what the documentation says.

ACK

Erik

>
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/storage/storage_backend_scsi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
> index f7378d3..f3e62fb 100644
> --- a/src/storage/storage_backend_scsi.c
> +++ b/src/storage/storage_backend_scsi.c
> @@ -227,12 +227,12 @@ createVport(virConnectPtr conn,
>                fchost->wwnn, fchost->wwpn);
>
>
> -    /* Since we're creating the vHBA, then we need to manage removing it
> +    /* Since we're creating the vHBA, then we may need to manage removing it
>       * as well. Since we need this setting to "live" through a libvirtd
>       * restart, we need to save the persistent configuration. So if not
> -     * already defined as YES, then force the issue.
> +     * already defined as YES or NO, then force the issue.
>       */
> -    if (fchost->managed != VIR_TRISTATE_BOOL_YES) {
> +    if (fchost->managed == VIR_TRISTATE_BOOL_ABSENT) {
>          fchost->managed = VIR_TRISTATE_BOOL_YES;
>          if (configFile) {
>              if (virStoragePoolSaveConfig(configFile, def) < 0)
> --
> 2.9.4
>
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

--
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