Skip to content

[BUG] Deltaproxy and napalm.junos_cli #63599

Closed as not planned
Closed as not planned

Description

@n-holmstedt

Description
We've encountered some issues with using the junos execution module with the junos napalm proxy.

There seem to be some kind of autovivification-issue, or similar, affecting the timeout-wrapper in the junos execution module. The wrapper expects the kwarg "dev_timeout" to exist and be defined, when in reality it is 'None' when not specifying it.

salt hostname napalm.junos_cli 'show version' format=xml
hostname:
    Passed invalid arguments to napalm.junos_cli: '>' not supported between instances of 'int' and 'NoneType'
salt hostname napalm.junos_cli 'show version' format=xml dev_timeout=30
hostname:
    <works>

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify): 1x Master container, 1x Deltaproxy container.
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
One master running in docker container.
One delta-proxy running in docker container.
One Juniper MX204

Traceback from the host running the delta proxy:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/salt/metaproxy/deltaproxy.py", line 669, in thread_return
    opts, data, func, args, kwargs
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 149, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1228, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1243, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/executors/direct_call.py", line 10, in execute
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 149, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1228, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1243, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/utils/napalm.py", line 512, in func_wrapper
    ret = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/modules/napalm_mod.py", line 980, in junos_cli
    command, format=format, dev_timeout=dev_timeout, dest=dest, **kwargs
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 149, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1228, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/loader/lazy.py", line 1243, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/salt/modules/junos.py", line 156, in wrapper
    ldev_timeout = max(kwargs.pop("dev_timeout", 0), kwargs.pop("timeout", 0))
TypeError: '>' not supported between instances of 'int' and 'NoneType'

Expected behavior
Expecting the junos execution modul not to throw a TypeError when looking at dev_timeout.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.0
       libgit2: 1.1.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.17
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: 1.6.1
        Python: 3.7.13 (default, Apr 20 2022, 03:16:50)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 18.0.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.1

System Versions:
          dist: alpine 3.14.6
        locale: UTF-8
       machine: x86_64
       release: 4.18.0-372.9.1.el8.x86_64
        system: Linux
       version: Alpine Linux 3.14.6

Activity

  1. added
    bug
    on Feb 1, 2023
  2. added this to the Sulfur v3006.2 milestone on May 3, 2023
  3. added
    help-wanted
    on Jun 18, 2024
  4. modified the milestones: Sulfur v3006.9, Approved on Jun 18, 2024
  5. added
    severity-medium
    on Oct 16, 2026
  6. dwoz commented on Oct 16, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Delta-Proxybughelp-wantedneeds-triageseverity-mediumstale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions