Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genie not available as parser #188

Open
empusas opened this issue Aug 11, 2022 · 4 comments
Open

Genie not available as parser #188

empusas opened this issue Aug 11, 2022 · 4 comments

Comments

@empusas
Copy link

empusas commented Aug 11, 2022

I checked the requirements.txt that genie is in the list of modules to be installed. But If I try to use it in a get Config request I get an error that it is not installed.

"args": {
   "use_genie": "true"
  },


"exception_args": [
          "\nGenie and PyATS are not installed. Please PIP install both Genie and PyATS:\npip install genie\npip install pyats\n"
        ]
@tbotnz
Copy link
Owner

tbotnz commented Aug 13, 2022

Hi,

Can you check if you installed it on the worker containers?

Cheers

@empusas
Copy link
Author

empusas commented Aug 13, 2022

I have checked the containers. Genie is installed, but not pyats.
As you got genie in the requirements.txt, but not pyats I guess you assumed that pyats is a requirement for genie and will be installed as dependency.
I have installed it in both worker manually with pip, restarted the containers, but still get the same error message as the changes are lost with the restart.
I assume adding pyats to the requirements.txt might fix the problem.

$ sudo docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED      STATUS      PORTS                                     NAMES
0c12c0b4ea85   netpalm_netpalm-worker-pinned   "python3 worker.py p…"   2 days ago   Up 2 days                                             netpalm_netpalm-worker-pinned_1
68eeea98d325   netpalm_netpalm-controller      "/bin/sh -c 'gunicor…"   2 days ago   Up 2 days   0.0.0.0:443->9000/tcp, :::443->9000/tcp   netpalm_netpalm-controller_1
8a06acad8b27   netpalm_netpalm-worker-fifo     "python3 worker.py f…"   2 days ago   Up 2 days                                             netpalm_netpalm-worker-fifo_1
a5f472d621df   netpalm_redis                   "docker-entrypoint.s…"   2 days ago   Up 2 days   6379/tcp                                  netpalm_redis_1
$ sudo docker exec -it 0c12c0b4ea85 /bin/sh
# pip list | grep genie
genie                        22.7
genie.libs.clean             22.7
genie.libs.conf              22.7
genie.libs.filetransferutils 22.7
genie.libs.health            22.7
genie.libs.ops               22.7
genie.libs.parser            22.7
genie.libs.sdk               22.7
# pip list | grep pyats
# exit
$ sudo docker exec -it 8a06acad8b27 /bin/sh
# pip list | grep genie
genie                        22.7
genie.libs.clean             22.7
genie.libs.conf              22.7
genie.libs.filetransferutils 22.7
genie.libs.health            22.7
genie.libs.ops               22.7
genie.libs.parser            22.7
genie.libs.sdk               22.7
#  pip list | grep pyats
#

@empusas
Copy link
Author

empusas commented Sep 6, 2022

I needed to rebuild the containers today as the Redis certificates expired. I thought it would be a good chance to add pyats to the requirements.txt and see if this solves the problem with the Genie parser.
Unfortunately it did not. The controller container kept restarting with this error:

netpalm-controller_1 | raise HaltServer(reason, self.WORKER_BOOT_ERROR)
netpalm-controller_1 | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
netpalm_netpalm-controller_1 exited with code 1
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [7] [INFO] Starting gunicorn 20.1.0
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [7] [INFO] Listening at: http://0.0.0.0:9000/ (7)
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [7] [INFO] Using worker: uvicorn.workers.UvicornWorker
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [9] [INFO] Booting worker with pid: 9
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [10] [INFO] Booting worker with pid: 10
netpalm-controller_1 | [2022-09-06 19:03:35 +0000] [11] [INFO] Booting worker with pid: 11
netpalm-controller_1 | [2022-09-06 19:03:36 +0000] [9] [ERROR] Exception in worker process
netpalm-controller_1 | Traceback (most recent call last):
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
netpalm-controller_1 | worker.init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/workers.py", line 66, in init_process
netpalm-controller_1 | super(UvicornWorker, self).init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
netpalm-controller_1 | self.load_wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
netpalm-controller_1 | self.wsgi = self.app.wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
netpalm-controller_1 | self.callable = self.load()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
netpalm-controller_1 | return self.load_wsgiapp()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
netpalm-controller_1 | return util.import_app(self.app_uri)
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
netpalm-controller_1 | mod = importlib.import_module(module)
netpalm-controller_1 | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
netpalm-controller_1 | return _bootstrap._gcd_import(name[level:], package, level)
netpalm-controller_1 | File "", line 1014, in _gcd_import
netpalm-controller_1 | File "", line 991, in _find_and_load
netpalm-controller_1 | File "", line 975, in _find_and_load_unlocked
netpalm-controller_1 | File "", line 671, in _load_unlocked
netpalm-controller_1 | File "", line 843, in exec_module
netpalm-controller_1 | File "", line 219, in _call_with_frames_removed
netpalm-controller_1 | File "/code/netpalm/netpalm_controller.py", line 15, in
netpalm-controller_1 | from netpalm.netpalm_worker_common import start_broadcast_listener_process
netpalm-controller_1 | File "/code/netpalm/netpalm_worker_common.py", line 13, in
netpalm-controller_1 | from netpalm.backend.core.manager import ntplm, NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/init.py", line 1, in
netpalm-controller_1 | from netpalm.backend.core.manager.netpalm_manager import NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/netpalm_manager.py", line 8, in
netpalm-controller_1 | from netpalm.backend.core.redis.rediz import Rediz
netpalm-controller_1 | File "/code/netpalm/backend/core/redis/rediz.py", line 23, in
netpalm-controller_1 | from netpalm.backend.core.routes import routes
netpalm-controller_1 | File "/code/netpalm/backend/core/routes/routes.py", line 2, in
netpalm-controller_1 | from netpalm.backend.plugins.calls.dryrun.dryrun import dryrun
netpalm-controller_1 | File "/code/netpalm/backend/plugins/calls/dryrun/dryrun.py", line 3, in
netpalm-controller_1 | from netpalm.backend.plugins.drivers.napalm.napalm_drvr import naplm
netpalm-controller_1 | File "/code/netpalm/backend/plugins/drivers/napalm/napalm_drvr.py", line 1, in
netpalm-controller_1 | import napalm
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/init.py", line 5, in
netpalm-controller_1 | from napalm.base import get_network_driver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/init.py", line 22, in
netpalm-controller_1 | from napalm.base.base import NetworkDriver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/base.py", line 17, in
netpalm-controller_1 | from netmiko import ConnectHandler, NetMikoTimeoutException
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/init.py", line 7, in
netpalm-controller_1 | from netmiko.ssh_dispatcher import ConnectHandler
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/ssh_dispatcher.py", line 2, in
netpalm-controller_1 | from netmiko.a10 import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/init.py", line 1, in
netpalm-controller_1 | from netmiko.a10.a10_ssh import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/a10_ssh.py", line 3, in
netpalm-controller_1 | from netmiko.cisco_base_connection import CiscoSSHConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/cisco_base_connection.py", line 2, in
netpalm-controller_1 | from netmiko.base_connection import BaseConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/base_connection.py", line 28, in
netpalm-controller_1 | from netmiko.utilities import (
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/utilities.py", line 21, in
netpalm-controller_1 | from genie.conf.base import Device
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/genie/conf/init.py", line 16, in
netpalm-controller_1 | from .main import Genie
netpalm-controller_1 | File "src/genie/conf/main.py", line 4, in init genie.conf.main
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/pyats/topology/init.py", line 52, in
netpalm-controller_1 | from .link import Link, LinkBase
netpalm-controller_1 | File "src/pyats/topology/link.py", line 5, in init pyats.topology.link
netpalm-controller_1 | File "src/pyats/topology/factory.py", line 5, in init pyats.topology.factory
netpalm-controller_1 | File "src/pyats/configuration.py", line 17, in init pyats.configuration
netpalm-controller_1 | File "src/pyats/utils/import_utils/misc.py", line 16, in pyats.utils.import_utils.misc.on_import
netpalm-controller_1 | File "src/pyats/configuration.py", line 35, in pyats.configuration._install
netpalm-controller_1 | File "src/pyats/datastructures/configuration.py", line 38, in pyats.datastructures.configuration.Configuration.load_cfgs
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 697, in read
netpalm-controller_1 | self._read(fp, filename)
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 1082, in _read
netpalm-controller_1 | raise MissingSectionHeaderError(fpname, lineno, line)
netpalm-controller_1 | configparser.MissingSectionHeaderError: File contains no section headers.
netpalm-controller_1 | file: 'controller.pid', line: 1
netpalm-controller_1 | '7\n'
netpalm-controller_1 | [2022-09-06 19:03:36 +0000] [9] [INFO] Worker exiting (pid: 9)
netpalm-controller_1 | [2022-09-06 19:03:36 +0000] [10] [ERROR] Exception in worker process
netpalm-controller_1 | Traceback (most recent call last):
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
netpalm-controller_1 | worker.init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/workers.py", line 66, in init_process
netpalm-controller_1 | super(UvicornWorker, self).init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
netpalm-controller_1 | self.load_wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
netpalm-controller_1 | self.wsgi = self.app.wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
netpalm-controller_1 | self.callable = self.load()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
netpalm-controller_1 | return self.load_wsgiapp()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
netpalm-controller_1 | return util.import_app(self.app_uri)
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
netpalm-controller_1 | mod = importlib.import_module(module)
netpalm-controller_1 | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
netpalm-controller_1 | return _bootstrap._gcd_import(name[level:], package, level)
netpalm-controller_1 | File "", line 1014, in _gcd_import
netpalm-controller_1 | File "", line 991, in _find_and_load
netpalm-controller_1 | File "", line 975, in _find_and_load_unlocked
netpalm-controller_1 | File "", line 671, in _load_unlocked
netpalm-controller_1 | File "", line 843, in exec_module
netpalm-controller_1 | File "", line 219, in _call_with_frames_removed
netpalm-controller_1 | File "/code/netpalm/netpalm_controller.py", line 15, in
netpalm-controller_1 | from netpalm.netpalm_worker_common import start_broadcast_listener_process
netpalm-controller_1 | File "/code/netpalm/netpalm_worker_common.py", line 13, in
netpalm-controller_1 | from netpalm.backend.core.manager import ntplm, NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/init.py", line 1, in
netpalm-controller_1 | from netpalm.backend.core.manager.netpalm_manager import NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/netpalm_manager.py", line 8, in
netpalm-controller_1 | from netpalm.backend.core.redis.rediz import Rediz
netpalm-controller_1 | File "/code/netpalm/backend/core/redis/rediz.py", line 23, in
netpalm-controller_1 | from netpalm.backend.core.routes import routes
netpalm-controller_1 | File "/code/netpalm/backend/core/routes/routes.py", line 2, in
netpalm-controller_1 | from netpalm.backend.plugins.calls.dryrun.dryrun import dryrun
netpalm-controller_1 | File "/code/netpalm/backend/plugins/calls/dryrun/dryrun.py", line 3, in
netpalm-controller_1 | from netpalm.backend.plugins.drivers.napalm.napalm_drvr import naplm
netpalm-controller_1 | File "/code/netpalm/backend/plugins/drivers/napalm/napalm_drvr.py", line 1, in
netpalm-controller_1 | import napalm
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/init.py", line 5, in
netpalm-controller_1 | from napalm.base import get_network_driver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/init.py", line 22, in
netpalm-controller_1 | from napalm.base.base import NetworkDriver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/base.py", line 17, in
netpalm-controller_1 | from netmiko import ConnectHandler, NetMikoTimeoutException
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/init.py", line 7, in
netpalm-controller_1 | from netmiko.ssh_dispatcher import ConnectHandler
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/ssh_dispatcher.py", line 2, in
netpalm-controller_1 | from netmiko.a10 import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/init.py", line 1, in
netpalm-controller_1 | from netmiko.a10.a10_ssh import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/a10_ssh.py", line 3, in
netpalm-controller_1 | from netmiko.cisco_base_connection import CiscoSSHConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/cisco_base_connection.py", line 2, in
netpalm-controller_1 | from netmiko.base_connection import BaseConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/base_connection.py", line 28, in
netpalm-controller_1 | from netmiko.utilities import (
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/utilities.py", line 21, in
netpalm-controller_1 | from genie.conf.base import Device
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/genie/conf/init.py", line 16, in
netpalm-controller_1 | from .main import Genie
netpalm-controller_1 | File "src/genie/conf/main.py", line 4, in init genie.conf.main
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/pyats/topology/init.py", line 52, in
netpalm-controller_1 | from .link import Link, LinkBase
netpalm-controller_1 | File "src/pyats/topology/link.py", line 5, in init pyats.topology.link
netpalm-controller_1 | File "src/pyats/topology/factory.py", line 5, in init pyats.topology.factory
netpalm-controller_1 | File "src/pyats/configuration.py", line 17, in init pyats.configuration
netpalm-controller_1 | File "src/pyats/utils/import_utils/misc.py", line 16, in pyats.utils.import_utils.misc.on_import
netpalm-controller_1 | File "src/pyats/configuration.py", line 35, in pyats.configuration._install
netpalm-controller_1 | File "src/pyats/datastructures/configuration.py", line 38, in pyats.datastructures.configuration.Configuration.load_cfgs
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 697, in read
netpalm-controller_1 | self._read(fp, filename)
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 1082, in _read
netpalm-controller_1 | raise MissingSectionHeaderError(fpname, lineno, line)
netpalm-controller_1 | configparser.MissingSectionHeaderError: File contains no section headers.
netpalm-controller_1 | file: 'controller.pid', line: 1
netpalm-controller_1 | '7\n'
netpalm-controller_1 | [2022-09-06 19:03:36 +0000] [10] [INFO] Worker exiting (pid: 10)
netpalm-controller_1 | [2022-09-06 19:03:36 +0000] [11] [ERROR] Exception in worker process
netpalm-controller_1 | Traceback (most recent call last):
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
netpalm-controller_1 | worker.init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/workers.py", line 66, in init_process
netpalm-controller_1 | super(UvicornWorker, self).init_process()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
netpalm-controller_1 | self.load_wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
netpalm-controller_1 | self.wsgi = self.app.wsgi()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
netpalm-controller_1 | self.callable = self.load()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
netpalm-controller_1 | return self.load_wsgiapp()
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
netpalm-controller_1 | return util.import_app(self.app_uri)
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
netpalm-controller_1 | mod = importlib.import_module(module)
netpalm-controller_1 | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
netpalm-controller_1 | return _bootstrap._gcd_import(name[level:], package, level)
netpalm-controller_1 | File "", line 1014, in _gcd_import
netpalm-controller_1 | File "", line 991, in _find_and_load
netpalm-controller_1 | File "", line 975, in _find_and_load_unlocked
netpalm-controller_1 | File "", line 671, in _load_unlocked
netpalm-controller_1 | File "", line 843, in exec_module
netpalm-controller_1 | File "", line 219, in _call_with_frames_removed
netpalm-controller_1 | File "/code/netpalm/netpalm_controller.py", line 15, in
netpalm-controller_1 | from netpalm.netpalm_worker_common import start_broadcast_listener_process
netpalm-controller_1 | File "/code/netpalm/netpalm_worker_common.py", line 13, in
netpalm-controller_1 | from netpalm.backend.core.manager import ntplm, NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/init.py", line 1, in
netpalm-controller_1 | from netpalm.backend.core.manager.netpalm_manager import NetpalmManager
netpalm-controller_1 | File "/code/netpalm/backend/core/manager/netpalm_manager.py", line 8, in
netpalm-controller_1 | from netpalm.backend.core.redis.rediz import Rediz
netpalm-controller_1 | File "/code/netpalm/backend/core/redis/rediz.py", line 23, in
netpalm-controller_1 | from netpalm.backend.core.routes import routes
netpalm-controller_1 | File "/code/netpalm/backend/core/routes/routes.py", line 2, in
netpalm-controller_1 | from netpalm.backend.plugins.calls.dryrun.dryrun import dryrun
netpalm-controller_1 | File "/code/netpalm/backend/plugins/calls/dryrun/dryrun.py", line 3, in
netpalm-controller_1 | from netpalm.backend.plugins.drivers.napalm.napalm_drvr import naplm
netpalm-controller_1 | File "/code/netpalm/backend/plugins/drivers/napalm/napalm_drvr.py", line 1, in
netpalm-controller_1 | import napalm
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/init.py", line 5, in
netpalm-controller_1 | from napalm.base import get_network_driver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/init.py", line 22, in
netpalm-controller_1 | from napalm.base.base import NetworkDriver
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/napalm/base/base.py", line 17, in
netpalm-controller_1 | from netmiko import ConnectHandler, NetMikoTimeoutException
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/init.py", line 7, in
netpalm-controller_1 | from netmiko.ssh_dispatcher import ConnectHandler
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/ssh_dispatcher.py", line 2, in
netpalm-controller_1 | from netmiko.a10 import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/init.py", line 1, in
netpalm-controller_1 | from netmiko.a10.a10_ssh import A10SSH
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/a10/a10_ssh.py", line 3, in
netpalm-controller_1 | from netmiko.cisco_base_connection import CiscoSSHConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/cisco_base_connection.py", line 2, in
netpalm-controller_1 | from netmiko.base_connection import BaseConnection
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/base_connection.py", line 28, in
netpalm-controller_1 | from netmiko.utilities import (
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/netmiko/utilities.py", line 21, in
netpalm-controller_1 | from genie.conf.base import Device
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/genie/conf/init.py", line 16, in
netpalm-controller_1 | from .main import Genie
netpalm-controller_1 | File "src/genie/conf/main.py", line 4, in init genie.conf.main
netpalm-controller_1 | File "/usr/local/lib/python3.8/site-packages/pyats/topology/init.py", line 52, in
netpalm-controller_1 | from .link import Link, LinkBase
netpalm-controller_1 | File "src/pyats/topology/link.py", line 5, in init pyats.topology.link
netpalm-controller_1 | File "src/pyats/topology/factory.py", line 5, in init pyats.topology.factory
netpalm-controller_1 | File "src/pyats/configuration.py", line 17, in init pyats.configuration
netpalm-controller_1 | File "src/pyats/utils/import_utils/misc.py", line 16, in pyats.utils.import_utils.misc.on_import
netpalm-controller_1 | File "src/pyats/configuration.py", line 35, in pyats.configuration._install
netpalm-controller_1 | File "src/pyats/datastructures/configuration.py", line 38, in pyats.datastructures.configuration.Configuration.load_cfgs
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 697, in read
netpalm-controller_1 | self._read(fp, filename)
netpalm-controller_1 | File "/usr/local/lib/python3.8/configparser.py", line 1082, in _read
netpalm-controller_1 | raise MissingSectionHeaderError(fpname, lineno, line)
netpalm-controller_1 | configparser.MissingSectionHeaderError: File contains no section headers.
netpalm-controller_1 | file: 'controller.pid', line: 1
netpalm-controller_1 | '7\n'
netpalm-controller_1 | [2022-09-06 19:03:37 +0000] [11] [INFO] Worker exiting (pid: 11)
netpalm-controller_1 | [2022-09-06 19:03:37 +0000] [7] [WARNING] Worker with pid 10 was terminated due to signal 15
netpalm-controller_1 | [2022-09-06 19:03:37 +0000] [7] [WARNING] Worker with pid 11 was terminated due to signal 15
netpalm-controller_1 | [2022-09-06 19:03:37 +0000] [7] [INFO] Shutting down: Master
netpalm-controller_1 | [2022-09-06 19:03:37 +0000] [7] [INFO] Reason: Worker failed to boot.
netpalm_netpalm-controller_1 exited with code 3

@tom0010
Copy link

tom0010 commented Aug 29, 2023

This is because of pyats conflicting with -p.

They must use sys.args or something similar.

To fix this you can pass --pid inside of the dockerfiles/netpalm_controller_dockerfile for netpalm controller instead of -p:
e.g.

gunicorn --pid controller.pid -c gunicorn.conf.py netpalm.netpalm_controller:app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants