Jump to: navigation, search

Cinder/3rdParty-drivers-py3-update

< Cinder
Revision as of 16:41, 2 August 2019 by Brian-rosmaita (talk | contribs) (Created page with "== Cinder Third Party CI update to Python == The key point of this page is to share tips about updating Third Party CI to run Python 3.7. (Feel free to skip ahead to that pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Cinder Third Party CI update to Python

The key point of this page is to share tips about updating Third Party CI to run Python 3.7. (Feel free to skip ahead to that part!)

Background

Python 2 (that is, Python 2 itself, not simply OpenStack support for Python 2) is end-of-life on 1 January 2020. This means that the Train release of OpenStack is the last release that will support Python 2. The OpenStack Technical Committee has declared that Python 2 support will be dropped completely during the beginning of the U development cycle (that is, late in 2019).

Reference: 2018-05-29 Python2 Deprecation Timeline

What this means for Cinder Third Party CI

Walt explained on the mailing list:

Hello Cinder folks,

The train release is going to be the last release of OpenStack with python 2 support. Train also is going to require supporting python 3.6 and 3.7. This means that we should be enabling and or switching over all of our 3rd party CI runs to python 3 to ensure that our drivers and all of their required libraries run properly in a python 3.6/3.7 environment. This will help driver maintainers discover any python3 incompatibilities with their driver as well as any required libraries. At the PTG in Denver, the cinder team agreed that we wanted driver CI systems to start using python3 by milestone 2 for Train. This would be the July 22-26th time frame [1].

We are also working on adding driver library requirements to the OpenStack global requirements project [2] [3]. This effort will provide native install primitives for driver libraries in cinder. This process also requires the driver libraries to run in python3.6/3.7.

The Cinder team wants to maintain it's high quality of driver support in the train release. By enabling python 3.6 and python 3.7 in CI tests, this will help everyone ship Cinder with the required support in Train and the following releases.

Walt

[1] https://releases.openstack.org/train/schedule.html

[2] https://review.opendev.org/#/c/656724/

[3] https://review.opendev.org/#/c/657395/

Jay followed up with an additional note that the Cinder team wanted to see drivers running Python 3 in their CI environments by Train Milestone 2 (week of July 22).

Because the Train release of OpenStack is supposed to support both Python 3.6 and Python 3.7, it's acceptable to have your CI running 3.7 only on the theory that anything that runs in 3.7 will also run in 3.6.

Tips for Converting Your CI to Python 3

Please share your experiences to help other CI maintainers. If you can't edit this wiki page (permissions were restricted due to a really bad spam storm in 2017), please slap your comments into a paste and contact jungleboyj, smcginnis, or rosmaita in the #openstack-cinder IRC channel and we'll add them for you.

Ubuntu-based CI

Chris M reports that he had success converting his Ubuntu 16.04 CI to run Python 3.7 by doing this:

Key steps prior to running stack.sh on Ubuntu 16.04:

   add-apt-repository ppa:deadsnakes/ppa                                                                                                                                                                                                            
   apt-get -q update                                                                                                                                                                                                                                
   apt-get install -y python3.7                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                    

Lines to add to local.conf:

   localrc                                                                                                                                                                                                                                
   USE_PYTHON3=True                                                                                                                                                                                                                                 
   PYTHON3_VERSION=3.7                                                                                                                                                                                                                              
    :