Skip to content

junos.install_config and netconfig.managed output showing KeyError: u'junos.conn', but set/conf file is successfully applied to router via netconf #51482

@ghost

Description

when running sudo salt bjn-eu1-e2 state.apply DrainEU1SG1secondary i am getting an error, see below. But while saltstack is showing an error, on the router the commits for the Drain and UnDrainSJ1SG1 sls are succesful. i have confirmation below via rollback and i have confirmation via oxidizer that the state.apply above was successful in both attempts even though the output shown for saltstack cli is failed. you will also see the minion output below that shows napalm is installed on the minion host

[2019-02-03 08:32:40-0800] saltmaster% sudo salt bjn-eu1-e2 state.apply DrainEU1SG1secondary
bjn-eu1-e2:
----------
          ID: DrainEU1SG1secondary
    Function: netconfig.managed
      Result: False
     Comment: State 'netconfig.managed' was not found in SLS 'DrainEU1SG1secondary'
              Reason: 'netconfig' __virtual__ returned False: "netconfig"" (/usr/lib/python2.7/dist-packages/salt/states/netconfig.pyc) cannot be loaded: NAPALM is not installed or not running in a (proxy) minion
     Changes:

Summary for bjn-eu1-e2
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms

[2019-02-03 09:17:50-0800] saltmaster% sudo salt bjn-eu1-e2 state.apply UnDrainEU1SG1secondary
bjn-eu1-e2:
----------
          ID: UnDrainEU1SG1secondary
    Function: netconfig.managed
      Result: False
     Comment: State 'netconfig.managed' was not found in SLS 'UnDrainEU1SG1secondary'
              Reason: 'netconfig' __virtual__ returned False: "netconfig"" (/usr/lib/python2.7/dist-packages/salt/states/netconfig.pyc) cannot be loaded: NAPALM is not installed or not running in a (proxy) minion
     Changes:

Summary for bjn-eu1-e2
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms
[DEBUG   ] jid 20190203091802152685 found all minions set([u'bjn-eu1-e2'])
ERROR: Minions returned with non-zero exit code

that is salt draining and undraining a circuit, confirmed via CLI

Possible completions:
  <[Enter]>            Execute this command
  0                    2019-02-03 09:18:08 PST by SALT via netconf
  1                    2019-02-03 08:32:56 PST by SALT via netconf

i also have confirmation via oxidizer in our slack channel that salt did commit the disable and passive to the rsvp and isis interface

-## Last commit: 2019-02-02 13:01:37 PST by ****
+## Last commit: 2019-02-03 08:32:56 PST by SALT
 version 17.4R1-S4.2;
 groups {
     global;
@@ -502,6 +502,7 @@ routing-options {
 protocols {
     rsvp {
         interface xe-0/1/1:1.0 {
+            disable;
             link-protection;
         }
         interface xe-0/1/0:2.0 {
@@ -711,6 +712,7 @@ protocols {
             level 2 metric 81;
         }
         interface xe-0/1/1:1.0 {
+            passive;
             level 2 metric 156;
         }
         interface lo0.0;
proxy:
 proxytype: napalm
 driver: junos
 host: ****
 username: SALT
 password: ****
 port: 22

removed lines so it didnt clutter the channel

minion1-40-201 ~ % sudo pip install napalm
The directory '/home/julius/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/julius/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: napalm in ./.local/lib/python2.7/site-packages (2.3.3)
Requirement already satisfied: junos-eznc>=2.1.5 in ./.local/lib/python2.7/site-packages (from napalm) (2.2.0)
Requirement already satisfied: enum34 in ./.local/lib/python2.7/site-packages (from netmiko>=2.1.1->napalm) (1.1.6)
Requirement already satisfied: ipaddress in ./.local/lib/python2.7/site-packages (from netmiko>=2.1.1->napalm) (1.0.22)
Requirement already satisfied: pyasn1>=0.1.7 in ./.local/lib/python2.7/site-packages (from paramiko>=1.15.2->junos-eznc>=2.1.5->napalm) (0.4.5)
Requirement already satisfied: bcrypt>=3.1.3 in ./.local/lib/python2.7/site-packages (from paramiko>=1.15.2->junos-eznc>=2.1.5->napalm) (3.1.6)
salt-call --versions-report
Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: 2.4.2
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.10
        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.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.12 (default, Dec  4 2017, 14:50:18)
   python-gnupg: 0.3.8
         PyYAML: 3.13
          PyZMQ: 17.1.2
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.2.5

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: ISO-8859-1
        machine: x86_64
        release: 4.4.0-124-generic
         system: Linux
        version: Ubuntu 16.04 xenial


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions