saltstack / saltstack/salt

Netmiko auto fetches pillars on failure

Open
#55,107 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

The netmiko proxy minion receives its pillar data from the master for being able to log into the device its managing. It will attempt to do so after getting that pillar. If the pillar is wrong (credentials arent any good) the netmiko proxy minions default actions is to continually fetch the pillars from master again and try to login to its device again. creating an infinite loop until someone changes the pillar data or kills the proxy.

Setup

get a master up and put in fake proxy pillar data into the pillar for netmiko.

Steps to Reproduce Issue

Then run command to initialize the proxy minion. The proxy will initialize successfully because the required key/values for the netmiko pillar are in place. Then the proxy will attempt and fail, and there you go! an infinite loop is born to suck down cpu cycles and bandwidth.

Versions Report
bash-4.4$ salt --versions-report
Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: unknown
       dateutil: 2.7.2
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: 0.27.7
        libnacl: Not Installed
       M2Crypto: 0.33.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.27.4
         Python: 2.7.16 (default, May  6 2019, 19:35:26)
   python-gnupg: 0.4.2
         PyYAML: 5.1.1
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.6
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-862.11.6.el7.x86_64
         system: Linux
        version: Not Installed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure while initializing the netmiko proxy minion with invalid pillar credentials, then trace the proxy's pillar-fetch and login retry loop. Confirm that a failed login no longer causes unbounded pillar refetches and repeated login attempts, using the reported Salt versions and setup as the regression case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.