"module list" command don't show complete installed modules

Bug #1662058 reported by Rui Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Opinion
Undecided
Rui Chen
Python client library for Sahara
Fix Committed
Low
Rui Chen
Python client library for Zaqar
Fix Released
Undecided
Rui Chen
python-barbicanclient
Fix Released
Low
Rui Chen
python-designateclient
Fix Released
Undecided
Rui Chen
python-openstackclient
In Progress
Undecided
Rui Chen

Bug Description

In my devstack, "module list" output is:

(openstack) module list
+------------------+--------+
| Field | Value |
+------------------+--------+
| aodhclient | 0.7.0 |
| congressclient | 1.5.0 |
| heatclient | 1.7.0 |
| ironicclient | 1.9.0 |
| keystoneclient | 3.9.0 |
| magnumclient | 2.3.1 |
| mistralclient | 2.1.2 |
| muranoclient | 0.11.1 |
| novaclient | 6.0.0 |
| openstackclient | 3.8.2 |
| os_client_config | 1.26.1 |
| senlinclient | 1.1.0 |
| swiftclient | 3.2.0 |
+------------------+--------+

But in fact, openstacksdk(neutron), cinderclient, glanceclient, barbicanclient, designateclient, saharaclient, zaqarclient had been installed.

There are two reasons that cause the related module don't present:

#1 build-in module (keystone, glance, swfit, nova, openstacksdk(neutron), cinder)
    OSC do lazy loading to import these clients, keystone, nova, swift clients have good luck to be loaded in current OSC init serials, but the init process don't trigger openstacksdk(neutron), cinder and glance clients importing, that need to trade off between lazy loading and "module list" output, I don't have good solution now.

#2 plugin module (barbican, designate, sahara, zaqar)
    these clients don't following the PEP 396[1] to define the module version in __version__, so we need to fix it in those client side.

[1]: https://www.python.org/dev/peps/pep-0396/

Rui Chen (kiwik-chenrui)
Changed in python-openstackclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

The bug is related with https://bugs.launchpad.net/python-openstackclient/+bug/1661814 , I will try to fix #2 first.

description: updated
Rui Chen (kiwik-chenrui)
Changed in python-barbicanclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

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

Changed in python-barbicanclient:
status: New → In Progress
Rui Chen (kiwik-chenrui)
Changed in python-designateclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-designateclient (master)

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

Changed in python-designateclient:
status: New → In Progress
Rui Chen (kiwik-chenrui)
Changed in python-saharaclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-saharaclient (master)

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

Changed in python-saharaclient:
status: New → In Progress
Rui Chen (kiwik-chenrui)
Changed in python-zaqarclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-zaqarclient (master)

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

Changed in python-zaqarclient:
status: New → In Progress
Changed in python-saharaclient:
importance: Undecided → Low
Changed in python-barbicanclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-saharaclient (master)

Reviewed: https://review.openstack.org/429548
Committed: https://git.openstack.org/cgit/openstack/python-saharaclient/commit/?id=ec8ff32d24f14acfd634ea1d51c4facd40d8a14e
Submitter: Jenkins
Branch: master

commit ec8ff32d24f14acfd634ea1d51c4facd40d8a14e
Author: Rui Chen <email address hidden>
Date: Mon Feb 6 15:53:11 2017 +0800

    Set client module __version__

    According to PEP 396, the version of client library
    should be set in xxxclient.__version__, that help
    python-openstackclient command "module list" to get
    the right plugin module versions.

    Change-Id: Iebb5bd1c8332c5628a8ebc05b1e89248a2d1a7c9
    Partial-Bug: #1662058

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

Reviewed: https://review.openstack.org/429562
Committed: https://git.openstack.org/cgit/openstack/python-zaqarclient/commit/?id=35404c7a741d919afbd74fcd268affccc7df10d2
Submitter: Jenkins
Branch: master

commit 35404c7a741d919afbd74fcd268affccc7df10d2
Author: Rui Chen <email address hidden>
Date: Mon Feb 6 16:16:22 2017 +0800

    Set client module __version__

    According to PEP 396, the version of client library
    should be set in xxxclient.__version__, that help
    python-openstackclient command "module list" to get
    the right plugin module versions.

    Change-Id: Iea53e561ab197f4ef1b4855422c748417d808fab
    Partial-Bug: #1662058

Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

It's not easy thing to fix in openstacksdk, maybe trigger the related bugs [1][2], need to dive deep in code.

[1]: https://bugs.launchpad.net/python-openstacksdk/+bug/1588823
[2]: https://bugs.launchpad.net/python-openstacksdk/+bug/1662139

Changed in python-openstacksdk:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-designateclient (master)

Reviewed: https://review.openstack.org/429545
Committed: https://git.openstack.org/cgit/openstack/python-designateclient/commit/?id=d4cf5d3dd597127d6b38c6ee38b0c9d66faae871
Submitter: Jenkins
Branch: master

commit d4cf5d3dd597127d6b38c6ee38b0c9d66faae871
Author: Rui Chen <email address hidden>
Date: Mon Feb 6 15:44:00 2017 +0800

    Set client module __version__

    According to PEP 396, the version of client library
    should be set in xxxclient.__version__, that help
    python-openstackclient command "module list" to get
    the right plugin module versions.

    Change-Id: I932287726c5b0a8638c6ad72171e98181867d88f
    Partial-Bug: #1662058

Rui Chen (kiwik-chenrui)
Changed in python-saharaclient:
status: In Progress → Fix Committed
Changed in python-zaqarclient:
status: In Progress → Fix Committed
Changed in python-designateclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

Don't find good way to add __version__ for openstacksdk and avoid bug https://bugs.launchpad.net/python-openstacksdk/+bug/1588823 both, so fix the issue in OSC side, patch is https://review.openstack.org/436820

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

Reviewed: https://review.openstack.org/436820
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=10f0300f704ca8dd5928d9a8b41ac6c16732f203
Submitter: Jenkins
Branch: master

commit 10f0300f704ca8dd5928d9a8b41ac6c16732f203
Author: Rui Chen <email address hidden>
Date: Wed Feb 22 16:18:56 2017 +0800

    Show openstacksdk version info in "module list"

    openstacksdk bug/1588823 exist, no good way to add __version__ for
    openstack module properly, fix the issue in osc side, make openstacksdk
    module information be available.

    Change-Id: I27ff61792443d1aa07f31598bed3aa32f924ff40
    Partial-Bug: #1662058

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

Reviewed: https://review.openstack.org/429534
Committed: https://git.openstack.org/cgit/openstack/python-barbicanclient/commit/?id=10209c5e5296ac0222bde4ddd0849a18e1c1155e
Submitter: Jenkins
Branch: master

commit 10209c5e5296ac0222bde4ddd0849a18e1c1155e
Author: Rui Chen <email address hidden>
Date: Mon Feb 6 15:10:24 2017 +0800

    Set client module __version__

    According to PEP 396, the version of client library
    should be set in xxxclient.__version__, that help
    python-openstackclient command "module list" to get
    the right plugin module versions.

    Change-Id: I74f624e75b5335c657d7bb741435bfafedcc974e
    Partial-Bug: #1662058

Rui Chen (kiwik-chenrui)
Changed in python-barbicanclient:
status: In Progress → Fix Committed
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

Now only cinderclient module can't be shown when we execute "openstack module list", it's not easy to fix because of module lazy-loading.

Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

We can get cinderclient version in openstackclient interactive mode if we run a volume related commands once, like: volume list

Changed in python-openstacksdk:
status: New → Opinion
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

We do a workaround in python-openstackclient side https://review.openstack.org/436820 , python-openstacksdk version had been shown in "module list", mark bug status as Opinion.

wangxiyuan (wangxiyuan)
Changed in python-zaqarclient:
status: Fix Committed → Fix Released
Jeremy Liu (liujiong)
Changed in python-barbicanclient:
status: Fix Committed → Fix Released
Changed in python-designateclient:
status: Fix Committed → Fix Released
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.