shell client completion cache not working

Bug #1712835 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Eric Harney
python-manilaclient
Fix Released
Low
Victoria Martinez de la Cruz

Bug Description

The cinderclient shell attempts to write a completion cache to ~/.cinderclient/ , but all files there are empty. (volume-uuid-cache, volume-human-id-cache, etc.)

I believe this is intended to cache things like UUIDs so that if you run "cinder list" and see a volume with uuid "abcd..." , you can then run "cinder list a<tab>" and have bash-completion fill in the UUID.

This does not happen.

Revision history for this message
Eric Harney (eharney) wrote :
description: updated
Revision history for this message
Eric Harney (eharney) wrote :

Same issue still appears in 4.1.0.

Revision history for this message
Eric Harney (eharney) wrote :

Functionality appears to have been removed in https://review.openstack.org/#/c/63147/ .

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/610619

Changed in python-cinderclient:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Revision history for this message
Eric Harney (eharney) wrote :

At a quick scan, manilaclient seems to need the same fix: it has a "_write_to_completion_cache" method that isn't called anywhere.

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

Reviewed: https://review.openstack.org/610619
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=7319a40767641aa83d75cc99a807fd231f52f1ac
Submitter: Zuul
Branch: master

commit 7319a40767641aa83d75cc99a807fd231f52f1ac
Author: Eric Harney <email address hidden>
Date: Mon Oct 15 11:29:01 2018 -0400

    Re-enable shell UUID completion cache

    This enables writing ids to a local completion
    cache when using the cinderclient shell, which
    allows tools/cinder.bash_completion to complete
    commands such as
        cinder delete a<tab>

    Volume ids are recorded on "cinder list" and
    "cinder create" operations, similar for backup ids.

    This functionality was unintentionally removed in
    changes some time ago. Labeled as Partial-Bug
    because I haven't added name caching yet, which also
    used to exist.

    Partial-Bug: #1712835
    Change-Id: Id56aa43b061758a00a2a8c9c92a5a33ab9f7ab84
    (cherry picked from commit c4b37c2830fdd90b57383a93e09a8bd40ca41221)

Changed in python-cinderclient:
assignee: Eric Harney (eharney) → Rajat Dhasmana (whoami-rajat)
Eric Harney (eharney)
Changed in python-cinderclient:
assignee: Rajat Dhasmana (whoami-rajat) → Eric Harney (eharney)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/612529
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=e40166740ea78d4a1eb2a7040afe3a502374af51
Submitter: Zuul
Branch: master

commit e40166740ea78d4a1eb2a7040afe3a502374af51
Author: Eric Harney <email address hidden>
Date: Mon Oct 22 16:53:07 2018 -0400

    More shell completion cache additions

    Closes-Bug: #1712835
    Change-Id: I9326d5d92ff2e93dd0398d9a115210b376059064

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

Related fix proposed to branch: master
Review: https://review.openstack.org/638179

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/638179
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=7ee806f218cb22972a60d4e38ba1a4078e383f60
Submitter: Zuul
Branch: master

commit 7ee806f218cb22972a60d4e38ba1a4078e383f60
Author: Eric Harney <email address hidden>
Date: Wed Feb 20 10:14:08 2019 -0500

    Fix bash_completion cache path

    In change 4cf62cf3 we started writing the
    cache to ~/.cache/cinderclient/ - this script
    needs to read from there.

    Related-Bug: #1712835

    Change-Id: Ib4de058af6b636d06ac360fe448b432e8e7733ad

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/639424

Changed in python-manilaclient:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Jason Grosso (jgrosso)
Changed in python-manilaclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-cinderclient (stable/stein)

Related fix proposed to branch: stable/stein
Review: https://review.openstack.org/645573

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

Fix proposed to branch: stable/stein
Review: https://review.openstack.org/645577

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/stein
Review: https://review.openstack.org/645582

Changed in python-manilaclient:
assignee: Eric Harney (eharney) → Tom Barron (tpb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (stable/stein)

Reviewed: https://review.openstack.org/645577
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=5a884fb68f8610b379ce5b6c7a857b3f78201359
Submitter: Zuul
Branch: stable/stein

commit 5a884fb68f8610b379ce5b6c7a857b3f78201359
Author: Eric Harney <email address hidden>
Date: Mon Oct 15 11:29:01 2018 -0400

    Re-enable shell UUID completion cache

    This enables writing ids to a local completion
    cache when using the cinderclient shell, which
    allows tools/cinder.bash_completion to complete
    commands such as
        cinder delete a<tab>

    Volume ids are recorded on "cinder list" and
    "cinder create" operations, similar for backup ids.

    This functionality was unintentionally removed in
    changes some time ago. Labeled as Partial-Bug
    because I haven't added name caching yet, which also
    used to exist.

    Partial-Bug: #1712835
    Change-Id: Id56aa43b061758a00a2a8c9c92a5a33ab9f7ab84
    (cherry picked from commit c4b37c2830fdd90b57383a93e09a8bd40ca41221)
    (cherry picked from commit 7319a40767641aa83d75cc99a807fd231f52f1ac)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/645582
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=47ef57982420e66a32e1860900802e28d5951959
Submitter: Zuul
Branch: stable/stein

commit 47ef57982420e66a32e1860900802e28d5951959
Author: Eric Harney <email address hidden>
Date: Mon Oct 22 16:53:07 2018 -0400

    More shell completion cache additions

    Closes-Bug: #1712835
    Change-Id: I9326d5d92ff2e93dd0398d9a115210b376059064
    (cherry picked from commit e40166740ea78d4a1eb2a7040afe3a502374af51)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-cinderclient (stable/stein)

Change abandoned by Brian Rosmaita (<email address hidden>) on branch: stable/stein
Review: https://review.openstack.org/645573
Reason: Consensus on the dependency review is that it shouldn't be backported to Stein. That makes this patch unnecessary.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 4.2.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 4.3.0

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

Changed in python-manilaclient:
assignee: Tom Barron (tpb) → Victoria Martinez de la Cruz (vkmc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/639424
Committed: https://opendev.org/openstack/python-manilaclient/commit/6ecdbef0fcbdde1f6ea6441bc58efb91422a008e
Submitter: "Zuul (22348)"
Branch: master

commit 6ecdbef0fcbdde1f6ea6441bc58efb91422a008e
Author: Eric Harney <email address hidden>
Date: Tue Feb 26 11:41:27 2019 -0500

    Re-enable shell completion cache

    This enables writing ids to a local completion
    cache when using the manilaclient shell, which
    allows tools/manila.bash_completion to complete
    commands such as:
        manila delete a<tab>

    Share ids are recorded on "manila list" operations.

    Caching can be expanded to cover additional
    types of manila objects using this same infrastructure.

    Uses ~/.cache/manilaclient/ to match path standards,
    and uses SHA-1 since Python running w/ FIPS mode may
    not have MD5.

    Also, fix a small bug in the fakes used in our test suite.
    We were adding the shares count (an optional param) to all
    the list responses, while this is something that should be done
    only if the param with_count is set to True.

    Co-Authored-By: Victoria Martinez de la Cruz <email address hidden>
    Closes-Bug: #1712835
    Change-Id: I7f4dedf1dd4b7db6cf24fc1c4ed2a8d3685f714c

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

This issue was fixed in the openstack/python-manilaclient 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/python-manilaclient/+/848112

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

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/848112
Committed: https://opendev.org/openstack/python-manilaclient/commit/7f7d7d32dcabfa619ea9e1717483062026e0b61f
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 7f7d7d32dcabfa619ea9e1717483062026e0b61f
Author: Eric Harney <email address hidden>
Date: Tue Feb 26 11:41:27 2019 -0500

    Re-enable shell completion cache

    This enables writing ids to a local completion
    cache when using the manilaclient shell, which
    allows tools/manila.bash_completion to complete
    commands such as:
        manila delete a<tab>

    Share ids are recorded on "manila list" operations.

    Caching can be expanded to cover additional
    types of manila objects using this same infrastructure.

    Uses ~/.cache/manilaclient/ to match path standards,
    and uses SHA-1 since Python running w/ FIPS mode may
    not have MD5.

    Also, fix a small bug in the fakes used in our test suite.
    We were adding the shares count (an optional param) to all
    the list responses, while this is something that should be done
    only if the param with_count is set to True.

    Co-Authored-By: Victoria Martinez de la Cruz <email address hidden>
    Closes-Bug: #1712835
    Change-Id: I7f4dedf1dd4b7db6cf24fc1c4ed2a8d3685f714c
    (cherry picked from commit 6ecdbef0fcbdde1f6ea6441bc58efb91422a008e)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 2.6.4

This issue was fixed in the openstack/python-manilaclient 2.6.4 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.