Cannot execute cinder commands with OS_TOKEN

Bug #2061349 reported by Tatsuya Hayashino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Unassigned

Bug Description

When executing cinder commands using OS_TOKEN, the following error occurs:

> $ cinder list
> ERROR: argument --os-token: conflicting option string: --os-token

This issue seems to occur for the following reason:

Here, os_token is added to the parser by keystoneauth1.loading.
https://github.com/openstack/python-cinderclient/blob/4e71afe6ab4fdca495e42c01fd6ec7e4f2136b36/cinderclient/shell.py#L255-L256

Furthermore, these lines attempt to add os_token in cinderclient as well, causing an argparse error.
https://github.com/openstack/python-cinderclient/blob/4e71afe6ab4fdca495e42c01fd6ec7e4f2136b36/cinderclient/shell.py#L334-L337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)
Changed in python-cinderclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-cinderclient/+/915798
Committed: https://opendev.org/openstack/python-cinderclient/commit/585c14fdf05ad57f817e5262e54458fa8a8d44ac
Submitter: "Zuul (22348)"
Branch: master

commit 585c14fdf05ad57f817e5262e54458fa8a8d44ac
Author: Tatsuya Hayashino <email address hidden>
Date: Mon Apr 15 12:16:56 2024 +0900

    Fix cinder command execution issue with a token

    This commit fixes the issue where the following error occurs when
    executing cinder commands using a token:
    > ERROR: argument --os-token: conflicting option string: --os-token

    This issue arises because `os_token` is added to the parser in
    `keystoneauth1.loading.register_auth_argparse_arguments()`, and then
    `os_token` is set again by `parser.add_argument('--os-token')`.

    Closes-Bug: #2061349
    Change-Id: I8d1ff0f202bec24ed2982108b6cbba1b7981b356

Changed in python-cinderclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 9.6.0

This issue was fixed in the openstack/python-cinderclient 9.6.0 release.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.