Configuration options are broken

Bug #1856556 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinderlib
Fix Released
Undecided
Gorka Eguileor
Train
Fix Committed
Undecided
Gorka Eguileor
Ussuri
Fix Released
Undecided
Gorka Eguileor

Bug Description

When fixing bug #1854188 [1] we broke configuration options, because now we cannot pass configuration options from the DEFAULT section, and some ListOpt don't work because cinderlib was incorrectly expecting all these options to have bounds=True, but some don't define it and default to False.

[1]: https://bugs.launchpad.net/cinderlib/+bug/1854188

Gorka Eguileor (gorka)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinderlib (master)

Fix proposed to branch: master
Review: https://review.opendev.org/699203

Changed in cinderlib:
status: New → In Progress
Changed in cinderlib:
milestone: none → 2.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinderlib (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/699986

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (master)

Reviewed: https://review.opendev.org/699203
Committed: https://git.openstack.org/cgit/openstack/cinderlib/commit/?id=fbd7a72c1bbfe4696eada41064c476ba3ecd6a8f
Submitter: Zuul
Branch: master

commit fbd7a72c1bbfe4696eada41064c476ba3ecd6a8f
Author: Gorka Eguileor <email address hidden>
Date: Wed Dec 18 17:48:16 2019 +0100

    Fix configuration options

    When fixing bug #1854188 (Change-ID:
    I62e992804a3ae6aa0b4aa4f883807783197d4b33) we broke configuration
    options, because now we cannot pass configuration options from the
    DEFAULT section, and some ListOpt don't work because cinderlib was
    incorrectly expecting all these options to have bounds=True, but some
    don't define it and default to False.

    Most of the "crazy" code we currently have around oslo config is because
    we wanted to support drivers that add configuration options on runtime
    and reload the configuration.

    This made sense when cinderlib was not an OpenStack official project,
    but now that it is it makes more sense to force Cinder drivers to do the
    right thing.

    Aligned with this, this patch removes all the faking of the cinder.conf
    file as a StringIO object, and simply sets things in the configuration
    object that is passed to the drivers, which is the only thing they
    should be using.

    This will make cinderlib code more robust, even if some drivers will now
    need to be modified to work with cinderlib.

    We are validating known configuration options and ignoring unknown ones,
    like Cinder does.

    The NetApp driver was one of the drivers that would get broken, but
    since I have access to it and we can make a very small and targeted
    workaround to avoid breaking it, we do it as well.

    Closes-Bug: #1856556
    Change-Id: I67fbf8e9d7ee79f3d6617b4d0ae755dae0e1987a

Changed in cinderlib:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (stable/train)

Reviewed: https://review.opendev.org/699986
Committed: https://git.openstack.org/cgit/openstack/cinderlib/commit/?id=199ebd4f5a1984573877f582a2655f4171916761
Submitter: Zuul
Branch: stable/train

commit 199ebd4f5a1984573877f582a2655f4171916761
Author: Gorka Eguileor <email address hidden>
Date: Wed Dec 18 17:48:16 2019 +0100

    Fix configuration options

    When fixing bug #1854188 (Change-ID:
    I62e992804a3ae6aa0b4aa4f883807783197d4b33) we broke configuration
    options, because now we cannot pass configuration options from the
    DEFAULT section, and some ListOpt don't work because cinderlib was
    incorrectly expecting all these options to have bounds=True, but some
    don't define it and default to False.

    Most of the "crazy" code we currently have around oslo config is because
    we wanted to support drivers that add configuration options on runtime
    and reload the configuration.

    This made sense when cinderlib was not an OpenStack official project,
    but now that it is it makes more sense to force Cinder drivers to do the
    right thing.

    Aligned with this, this patch removes all the faking of the cinder.conf
    file as a StringIO object, and simply sets things in the configuration
    object that is passed to the drivers, which is the only thing they
    should be using.

    This will make cinderlib code more robust, even if some drivers will now
    need to be modified to work with cinderlib.

    We are validating known configuration options and ignoring unknown ones,
    like Cinder does.

    The NetApp driver was one of the drivers that would get broken, but
    since I have access to it and we can make a very small and targeted
    workaround to avoid breaking it, we do it as well.

    Closes-Bug: #1856556
    Change-Id: I67fbf8e9d7ee79f3d6617b4d0ae755dae0e1987a
    (cherry picked from commit fbd7a72c1bbfe4696eada41064c476ba3ecd6a8f)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinderlib 1.0.1

This issue was fixed in the openstack/cinderlib 1.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers