01-30-2019 01:13 AM - edited 03-01-2019 04:15 AM
Hi everyone.
We are using NSO 4.7.2.1
Now we are trying to use Python 3.6.6
NSO 4.7.2.1 Development / Chapter 3. The NSO Python VM says as follows.
Configure NSO to use a custom start command (recommended)
NSO can be configured to use a custom start command for starting a Python VM. This can be done by first copying the file $NCS_DIR/bin/ncs-start-python-vm to a new file, then change the last line of that file to start the desired version of Python. After that start a CLI against NSO and configure the new file as the start command for a new Python VM.
Updating the default start command (not recommended)
Changing the last line of $NCS_DIR/bin/ncs-start-python-vm is of course an option but altering any of the installation files of NSO is discouraged.
In short, it says
So we tried to follow the recommended procedure 1.
In Local Installation, it worked as we expected.
Default Python (Python 2.7.5 is started)
<INFO> 30-Jan-2019::07:02:10.488 asr9k-config-if MainThread: - Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
<INFO> 30-Jan-2019::07:02:10.489 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::07:02:10.490 asr9k-config-if MainThread: - Started
Change to Python3 (Python 3.6.6 is started as expected.)
<INFO> 30-Jan-2019::07:03:16.623 asr9k-config-if MainThread: - Python 3.6.6 (default, Aug 13 2018, 18:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
<INFO> 30-Jan-2019::07:03:16.623 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::07:03:16.627 asr9k-config-if MainThread: - Started
But in System Installation, the recommended procedure 1 didn’t work, but non-recommended procedure 2 worked.
Default Python (Python 2.7.5 is started)
<INFO> 30-Jan-2019::06:53:59.335 asr9k-config-if MainThread: - Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
<INFO> 30-Jan-2019::06:53:59.335 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::06:53:59.336 asr9k-config-if MainThread: - Started
Change to Python3 by recommended procedure 1 didn’t work. (Python 2.7.5 is started)
<INFO> 30-Jan-2019::06:56:41.470 asr9k-config-if MainThread: - Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
<INFO> 30-Jan-2019::06:56:41.474 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::06:56:41.475 asr9k-config-if MainThread: - Started
Change to Python3 by non-recommended procedure 2 worked. (Python 3.6.6 is started as expected.)
<INFO> 30-Jan-2019::06:57:49.508 asr9k-config-if MainThread: - Python 3.6.6 (default, Aug 13 2018, 18:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
<INFO> 30-Jan-2019::06:57:49.508 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::06:57:49.514 asr9k-config-if MainThread: - Started
The only way to use Python 3.6.6 in System Installation is follow the non-recommended procedure.
So we need to choose it.
Is this an expected behavior?
Any comment would be appreciated.
01-30-2019 10:57 AM
Does the python-vm.logs say anything?
What if you change the python version the recommended way then restart ncs, does that still exhibit the same behavior?
01-30-2019 05:18 PM
Hi Joey.
Thank you for the comment.
ncs-python-vm.log shows the message I attached before.
<INFO> 30-Jan-2019::06:56:41.470 asr9k-config-if MainThread: - Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
<INFO> 30-Jan-2019::06:56:41.474 asr9k-config-if MainThread: - Starting...
<INFO> 30-Jan-2019::06:56:41.475 asr9k-config-if MainThread: - Started
Restarting ncs exhibits the same behavior.
I'll open Service Request for future use.
02-06-2019 12:19 PM
02-06-2019 03:36 PM
I opened Service Request.
It'll take long time to fix NSO code.
I'll wait for the fix.
Koji Yokoe
07-31-2019 01:58 AM
07-31-2019 02:00 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide