[Starlingx-discuss] [Python3] Analysis of nfv using python3
An, Ran1
ran1.an at intel.com
Fri Mar 20 08:57:29 UTC 2020
Hi all
Last week, I sent a mail listed issues I met during upgrading nfv to support python3 task. With further investigating, here is my solution of the issues:
1. to build python3 "fm-api" rpm, pkg "python3-rpm-generators" is required. But it is conflict with pkg "rpm-build" built in the compile layer, because both of them have file (/usr/lib/rpm/pythondistdeps.py).
// this is a general issue which will be met each time we build rpm pkg with requirement(build requirement) of python3-devel, such as python3-deamon required by logmgmt.
My workaround is: rebuild python3-rpm-generators pkg from official srpm with file (usr/lib/rpm/pythondistdeps.py) removed. Pkg "rpm-build" will be the build requirement of python3-rpm-generators pkg to ensure file (usr/lib/rpm/pythondistdeps.py) is existed after python3-rpm-generators pkg is built.
2. as other flock services, like sysinv, are still running in python2, so it require fm-api to both run in python2 env and python3 env. It introduces a new topic: ensure it is safe to run python2-fm-api and python3-fm-api at the same time.
// the methods fm_api provides are thread safe. So it should be safe to run python2-fm-api and python3-fm-api at the same time.
I'll start to build python3 "fm-api" rpm, then model "fm-api" will supported both in python2 and python3.
Thanks
Ran
From: An, Ran1 <ran1.an at intel.com>
Sent: Thursday, March 12, 2020 2:19 PM
To: starlingx-discuss at lists.starlingx.io; Tao Liu <tao.liu at windriver.com>; Al Bailey <al.bailey at windriver.com>; Bart Wensley <barton.wensley at windriver.com>
Cc: Sun, Austin <austin.sun at intel.com>
Subject: [Starlingx-discuss] [Python3] Analysis of nfv using python3
Hi all:
I'm working on task "upgrade project nfv to support python3 runtime env". By analyzing and testing, there will be 32 new python3 rpms, which may impact current system.
* 16 new rpms from official centos7 repo;
* 12 new stx-rpms rebuilt with srpms from official centos7 repo (turn on python3 supported switch in spec);
* 4 stx-rpms built from tar.gz files.
Details including pkg dependency trees and current status could be found in [1]
With patches [2], we could get an iso with nfv services (vim,vim-api, vim-webserver) running in python3.
However, there is an run-time issues. Model "fm_api" in python3 is required to support vim service reporting alarms/event_logs to fault manager (service fm-mgr). It brings following issues:
1. to build python3 "fm-api" rpm, pkg "python3-rpm-generators" is required. But it is conflict with pkg "rpm-build" built in the compile layer, because both of them have file (/usr/lib/rpm/pythondistdeps.py).
2. as other flock services, like sysinv, are still running in python2, so it require fm-api to both run in python2 env and python3 env. It introduces a new topic: ensure it is safe to run python2-fm-api and python3-fm-api at the same time.
The scope of this task seems expand. Is there any suggestions?
[1] https://bugs.launchpad.net/starlingx/+bug/1808073/+attachment/5335996/+files/nfv%20python%20dependency%20analysis.xlsx
[2] patches: https://review.opendev.org/709958; https://review.opendev.org/709960; https://review.opendev.org/709983/1 ; https://review.opendev.org/709980
Thanks
Ran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20200320/529e5b0c/attachment.html>
More information about the Starlingx-discuss
mailing list