saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.14k stars 5.47k forks source link

Error 'netacl.load_filter_config' is not available. #46889

Closed prashanthtuttu closed 6 years ago

prashanthtuttu commented 6 years ago

Description of Issue/Question

'netacl.load_filter_config' is not available when trying to configure acl on cisco nexus devices salt testdevice-nxos netacl.load_term_config my-filter term_name=my-term pillar_key=netacl test=True debug=True

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).) Pillar file looks like:

testdevice-nxos:

my-filter:
    ----------
    my-term:
        ----------
        action:
            accept
        destination_address:
            any
        source_address:
            1.1.1.1

Steps to Reproduce Issue

(Include debug logs if possible and relevant.) [DEBUG ] Reading configuration from /etc/salt/master [DEBUG ] Including configuration from '/etc/salt/master.d/peer_run.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/peer_run.conf [DEBUG ] Including configuration from '/etc/salt/master.d/vault.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/vault.conf [DEBUG ] Using cached minion ID from /etc/salt/minion_id: sc-net-salt-master-dev-01.nvidia.com [DEBUG ] Missing configuration file: /root/.saltrc [DEBUG ] Configuration file path: /etc/salt/master [DEBUG ] Reading configuration from /etc/salt/master [DEBUG ] Including configuration from '/etc/salt/master.d/peer_run.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/peer_run.conf [DEBUG ] Including configuration from '/etc/salt/master.d/vault.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/vault.conf [DEBUG ] Using cached minion ID from /etc/salt/minion_id: sc-net-salt-master-dev-01.nvidia.com [DEBUG ] Missing configuration file: /root/.saltrc [DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc [DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc [DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'sc-net-salt-master-dev-01.nvidia.com_master', 'tcp://127.0.0.1:4506', 'clear') [DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pub.ipc [DEBUG ] LazyLoaded local_cache.get_load [DEBUG ] Reading minion list from /var/cache/salt/master/jobs/ad/8d10ea35490aaa71ee94815ab6b09d954c84ecab5370a416c39d728aeedf86/.minions.p [DEBUG ] get_iter_returns for jid 20180405102217598360 sent to set(['testdevice-nxos']) will timeout at 10:22:22.605593 [DEBUG ] jid 20180405102217598360 return from testdevice-nxos [DEBUG ] return event: {'testdevice-nxos': {'jid': '20180405102217598360', 'retcode': 254, 'ret': "'netacl.load_term_config' is not available.", 'out': 'nested'}} [DEBUG ] LazyLoaded nested.output testdevice-nxos: 'netacl.load_term_config' is not available. [DEBUG ] jid 20180405102217598360 found all minions set(['testdevice-nxos']) ERROR: Minions returned with non-zero exit code

Versions Report

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

Dependency Versions: cffi: 1.11.4 cherrypy: 3.5.0 dateutil: 2.4.2 docker-py: Not Installed gitdb: 0.6.4 gitpython: 1.0.1 ioflo: Not Installed Jinja2: 2.8 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, Dec 4 2017, 14:50:18) python-gnupg: Not Installed PyYAML: 3.11 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 locale: UTF-8 machine: x86_64 release: 4.4.0-87-generic system: Linux version: Ubuntu 16.04 xenial

garethgreenaway commented 6 years ago

@prashanthtuttu Thanks for the report. The netacl state modules requires that the aclgen and napalm_base python libraries are installed. Do you have those installed on the machine you're attempting to have the state module run?

prashanthtuttu commented 6 years ago

Thanks @garethgreenaway . I got that installed and when intiating the acl push i get a new error , may be im missing something. Can you help with that

salt testdevice-ios netacl.load_term_config my-filter term_name=my-term pillar_key=netacl test=True debug=True

testdevice-ios: The minion function caused an exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1493, in _thread_return return_data = executor.execute() File "/usr/lib/python2.7/dist-packages/salt/executors/direct_call.py", line 28, in execute return self.func(*self.args, *self.kwargs) File "/usr/lib/python2.7/dist-packages/salt/utils/napalm.py", line 430, in func_wrapper return func(args, kwargs) File "/usr/lib/python2.7/dist-packages/salt/modules/napalm_acl.py", line 445, in load_term_config term_fields) File "/usr/lib/python2.7/dist-packages/salt/modules/capirca_acl.py", line 867, in get_term_config revision_date_format=revision_date_format) File "/usr/lib/python2.7/dist-packages/salt/modules/capirca_acl.py", line 1013, in get_filter_config revision_date_format=revision_date_format) File "/usr/lib/python2.7/dist-packages/salt/modules/capirca_acl.py", line 1178, in get_policy_config merge_pillar=merge_pillar) File "/usr/lib/python2.7/dist-packages/salt/modules/capirca_acl.py", line 537, in _get_policy_object **term_fields) File "/usr/lib/python2.7/dist-packages/salt/modules/capirca_acl.py", line 492, in _get_term_object log.debug(str(term)) File "/root/src/aclgen/lib/policy.py", line 731, in str AttributeError: '_Term' object has no attribute 'priority'

prashanthtuttu commented 6 years ago

@ garethgreenaway , can you look into the issue , another issue was also raised on the same error regarding napalm / capirca #46918

mirceaulinic commented 6 years ago

This has already been reported by @prashanthtuttu in #47117 and #47011. Let's close this one.

rallytime commented 6 years ago

Closing as a duplicate.