salt icon indicating copy to clipboard operation
salt copied to clipboard

Documentation: NAPALM module requires disabled multiprocessing in proxy

Open Foxlik opened this issue 9 years ago • 4 comments

Description of Issue/Question

salt-proxy with multiprocessing enabled (the default: https://github.com/saltstack/salt/blob/develop/conf/proxy#L525) breaks the salt.proxy.napalm module for Junos devices. There is a mention here in the README of https://github.com/napalm-automation/napalm-salt repository, but I found it just after I figured the problem out and known what to google for. I believe it could save some people headache having this mentioned in the salt.proxy.napalm documentation. Plus, it could be worth it throwing a warning, or error, when using napalm proxy with multiprocessing.

Any of those would save me quite some time looking for the source of timeouts.

And while at it - the link to NAPALM installation instructions is not working. The correct link now seems to be https://napalm.readthedocs.io/en/latest/installation/index.html.

If it's fine, I'll whip up a PR.

Versions Report

Salt Version:
           Salt: 2016.11.6

Dependency Versions:
           cffi: 1.10.0
       cherrypy: Not Installed
       dateutil: 2.4.2
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.3
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
        machine: x86_64
        release: 4.10.11-1-pve
         system: Linux
        version: Ubuntu 16.04 xenial

Foxlik avatar Jul 09 '17 01:07 Foxlik

@mirceaulinic can you take a look at this?

Thanks, Daniel

gtmanfred avatar Jul 10 '17 16:07 gtmanfred

Hi @Foxlik you are partially correct, and I'm very tempted to encourage you to go ahead and better highlight in the documentation that multiprocessing: false is required.

Let's take a step back and look at the multiprocessing option: https://github.com/saltstack/salt/issues/38864 So it's mainly for SSH-based proxies. But NAPALM consists of multiple drivers that are not necessarily SSH-based (for example, the driver for Arista EOS or Cisco Nexus are HTTP-based). For this reason, I preferred to let the user decide if they'll set the multiprocessing or not (i.e, if someone has NAPALM proxies only for EOS devices they wouldn't need to configure multiprocessing: false; but if they do, there's no much to lose).

Right now, looking at it, I realize this was a mistake and should have better documented this behavior. So thanks @Foxlik for raising this discussion -- please go ahead and enhance the documentation.

EDIT: Regarding the installation notes: yes, that link needs to be corrected. For existing Salt users there's also this formula: https://github.com/saltstack-formulas/napalm-install-formula to help to install the system dependencies (we can probably refer it?). However, it requires some documentation... hope to provide some this week.

Cheers!

mirceaulinic avatar Jul 10 '17 16:07 mirceaulinic

@Foxlik FYI: I have submitted https://github.com/saltstack/salt/pull/42679 this morning which defaults multiprocessing to False for NAPALM proxy, allowing the user to configure this option per proxy, in case they require a more specific option, rather than sharing the same configuration from /etc/salt/proxy.

mirceaulinic avatar Aug 02 '17 10:08 mirceaulinic

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

stale[bot] avatar Nov 25 '18 10:11 stale[bot]