Comment 6 for bug 1995883

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/python-cinderclient/+/864047
Committed: https://opendev.org/openstack/python-cinderclient/commit/bc3072318fe3780f9d10e9e94add51ab02328a23
Submitter: "Zuul (22348)"
Branch: stable/zed

commit bc3072318fe3780f9d10e9e94add51ab02328a23
Author: Brian Rosmaita <email address hidden>
Date: Tue Nov 8 11:58:38 2022 -0500

    Handle downgraded client for snapshot-create

    When a CLI user specifies --os-volume api-version 3.66, the shell
    will execute the appropriate shell code, but if the server only
    supports < 3.66, the client is automatically downgraded and correctly
    uses the pre-3.66 SnapshotManager.create() method.

    In that case, the 'force' parameter, which is technically not allowed
    in mv 3.66 (but which silently accepts a True value for backward
    compatibility), will have a value of None, which the pre-3.66 code
    happily passes to cinder as '"force": null' in the request body, and
    which then fails the Block Storage API request-schema check.

    Handle this situation by detecting a None 'force' value and setting
    it to its pre-3.66 default value of False.

    Change-Id: I3ad8283c2a9aaac58c8d2b50fa7ac86b617e5dd3
    Closes-bug: #1995883
    (cherry picked from commit 9df653571d4da06c25222189be27e87a6da75628)