NFV OCF scripts on Debian need full python3 path

Bug #1962787 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Al Bailey

Bug Description

The 3 OCF scripts located under
https://opendev.org/starlingx/nfv/src/branch/master/nfv/nfv-vim/scripts

and are installed on debian under:
  /usr/lib/ocf/resource.d/nfv/

do not make reference to the full path for python3 in 2 locations in each file

example they have:
(python|/usr/bin/python|/usr/bin/python2)

but needs to be updated to
(python|/usr/bin/python|/usr/bin/python2|/usr/bin/python3)

this is to support service stop detection in ocf scripts

The processes are launched with paths like this:
root 1264931 1 55 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini
root 1264941 1264931 0 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini
root 1264942 1264931 0 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini
root 1264944 1264931 0 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini
root 1264947 1264931 0 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini
root 1264951 1264931 0 22:33 ? 00:00:00 /usr/bin/python3 /bin/nfv-vim -c /etc/nfv/vim/config.ini

root 2859483 1 0 Mar01 ? 00:00:33 /usr/bin/python3 /bin/nfv-vim-api -c /etc/nfv/vim/config.ini

root 2866797 1 0 Mar01 ? 00:00:38 /usr/bin/python3 /bin/nfv-vim-webserver -c /etc/nfv/vim/config.ini

Changed in starlingx:
status: New → In Progress
Revision history for this message
Al Bailey (albailey1974) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nfv (master)

Reviewed: https://review.opendev.org/c/starlingx/nfv/+/831841
Committed: https://opendev.org/starlingx/nfv/commit/94ce75c0d45589b197b5481d21f85035e16291ce
Submitter: "Zuul (22348)"
Branch: master

commit 94ce75c0d45589b197b5481d21f85035e16291ce
Author: albailey <email address hidden>
Date: Thu Mar 3 12:59:28 2022 -0600

    Update nfv code to work properly on python3.7+

    The coroutines in nfv internally raise StopIteration,
    however in python 3.7, that exception is converted to
    a RuntimeError: https://www.python.org/dev/peps/pep-0479/

    The vim code that catches a StopIteration exception has
    been updated to catch both types.

    The OCF scripts on a Debian system runs python3, and need
    explicit /usr/bin/python3 added to them

    Test-Plan:
     - Verified a Debian environment running python 3.9 is able
    to start nfv-vim without the process immediately crashing.
     - Verified a Centos environment running the older python2.7
    still able to run nfv-vim.
     - Verified Centos installation

    Closes-Bug: 1963277
    Closes-Bug: 1962787
    Signed-off-by: albailey <email address hidden>
    Change-Id: Ib54926738aeafbee0c90e7a2b5a4ad9556a3d7f1

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.debian stx.nfv
Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Al Bailey (albailey1974)
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.