In a python3 grenade run, openstack client plugins are lost after swift install

Bug #1805156 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grenade
Fix Released
Undecided
Chris Dent

Bug Description

When running grenade under python3, swift runs as python2. This means that when swift is upgraded (and re-installed) it will install python-openstackclient into /usr/local/bin/openstack as a python2 console script, replacing the python3 one that was already there. Already there with established entry points from python3 installations of things like osc-placement.

The result is that after the swift upgrade, future usage of openstack client plugins will fail to find the commands associated with the plugins. For example the resource provider inventory verification tests upgrading nova (upgraded after swift) will fail.

One way to work around this is reinstall the python-openstackclient after swift is done. Because it is in ENABLED_PYTHON3_PACKAGES it will be installed as a python3 console script.

This problem can be seen in the back and forth discussion between cdent and cdent on https://review.openstack.org/#/c/619552/

Tags: python3
Changed in grenade:
assignee: nobody → Chris Dent (cdent)
status: New → In Progress
Matt Riedemann (mriedem)
tags: added: python3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to grenade (master)

Reviewed: https://review.openstack.org/619728
Committed: https://git.openstack.org/cgit/openstack-dev/grenade/commit/?id=674861b787a9861a5585101563a971bf3e571812
Submitter: Zuul
Branch: master

commit 674861b787a9861a5585101563a971bf3e571812
Author: Chris Dent <email address hidden>
Date: Fri Nov 23 12:51:35 2018 +0000

    Re-install python-openstackclient after swift

    When running grenade under python3, swift runs under python2. Swift
    includes openstack client in its requirements so when it installs under
    Python 2 it clobbers the existing openstack client at /usr/local/bin and
    any previously installed plugins are wiped out because their entry
    points aren't seen. This was discovered because the osc-placement
    commands were not available to nova inventory verification commands
    during the nova upgrade, which comes after swift.

    To address this, we do a reinstall at the end of swift's upgrade.
    Because python-openstack client is in ENABLED_PYTHON3_PACKAGES,
    it will install as Python3 when installed standalone.

    Note that the issue being fixed here is python3 specific, not
    OpenStack release specific.

    Closes-Bug: 1805156
    Change-Id: If23619885a4766e243b39eae6041efe4a4d0a3af

Changed in grenade:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on grenade (master)

Change abandoned by Chris Dent (<email address hidden>) on branch: master
Review: https://review.openstack.org/619552
Reason: not really worth fixing as the current thing is working

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.