-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
SUMMARY
Getting unexpected failure when trying to do a SNMP set on a Cisco IOS read-write MIB.
ISSUE TYPE
- Bug Report
COMPONENT NAME
ANSIBLE VERSION
(venv) -bash-4.4$ ansible --version
ansible [core 2.14.7]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/rocky/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/automation-gateway/venv/lib64/python3.9/site-packages/ansible
ansible collection location = /opt/automation-gateway/ansible/collections:/usr/share/ansible/collections
executable location = /opt/automation-gateway/venv/bin/ansible
python version = 3.9.16 (main, Dec 23 2022, 09:55:36) [GCC 8.5.0 20210514 (Red Hat 8.5.0-17)] (/opt/automation-gateway/venv/bin/python)
jinja version = 3.1.2
libyaml = True
COLLECTION VERSION
(venv) -bash-4.4$ ansible-galaxy collection list ansible.snmp
# /opt/automation-gateway/ansible/collections/ansible_collections
Collection Version
------------ -------
ansible.snmp 2.0.0
CONFIGURATION
(venv) -bash-4.4$ ansible-config dump --only-changed
COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = ['/opt/automation-gateway/ansible/collections', '/usr/share/ansible/collections']
CONFIG_FILE() = /etc/ansible/ansible.cfg
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 120
(venv) -bash-4.4$
OS / ENVIRONMENT
(venv) -bash-4.4$ cat /etc/rocky-release
Rocky Linux release 8.8 (Green Obsidian)
STEPS TO REPRODUCE
- Install ansible.snmp along with dependencies
- attempt an SNMP set using the following params:
- oid: ifAdminStatus
- iid: 8
- type: INTEGER
- value: 2
EXPECTED RESULTS
ACTUAL RESULTS
self._handler.run(task_vars=vars_copy)\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/action/set.py\", line 60, in run\r\n pre_set_response = self._connection.get()\r\n File \"/opt/automation-gateway/venv/lib64/python3.9/site-packages/ansible/plugins/connection/__init__.py\", line 35, in wrapped\r\n self._connect()\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/connection/v2c.py\", line 121, in _connect\r\n super()._connect()\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/plugin_utils/snmp_connection_base.py\", line 71, in _connect\r\n self._instance.set_oids(self._oids)\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/plugin_utils/netsnmp_instance.py\", line 89, in set_oids\r\n self._oids.append(netsnmp.Varbind(**oid))\r\nTypeError: __init__() got an unexpected keyword argument 'type_arg'\r\nIOS-CSR-AWS-1_snmp | FAILED! => {\r\n \"msg\": \"Unexpected failure during module execution: __init__() got an unexpected keyword argument 'type_arg'\",\r\n \"stdout\": \"\"\r\n}",
"msg": "Unexpected failure during module execution: __init__() got an unexpected keyword argument 'type_arg'",
"stdout": ""
},
"status": "FAILURE",
"stdout": "The full traceback is:\r\nTraceback (most recent call last):\r\n File \"/opt/automation-gateway/venv/lib64/python3.9/site-packages/ansible/executor/task_executor.py\", line 158, in run\r\n res = self._execute()\r\n File \"/opt/automation-gateway/venv/lib64/python3.9/site-packages/ansible/executor/task_executor.py\", line 633, in _execute\r\n result = self._handler.run(task_vars=vars_copy)\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/action/set.py\", line 60, in run\r\n pre_set_response = self._connection.get()\r\n File \"/opt/automation-gateway/venv/lib64/python3.9/site-packages/ansible/plugins/connection/__init__.py\", line 35, in wrapped\r\n self._connect()\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/connection/v2c.py\", line 121, in _connect\r\n super()._connect()\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/plugin_utils/snmp_connection_base.py\", line 71, in _connect\r\n self._instance.set_oids(self._oids)\r\n File \"/opt/automation-gateway/ansible/collections/ansible_collections/ansible/snmp/plugins/plugin_utils/netsnmp_instance.py\", line 89, in set_oids\r\n self._oids.append(netsnmp.Varbind(**oid))\r\nTypeError: __init__() got an unexpected keyword argument 'type_arg'\r\nIOS-CSR-AWS-1_snmp | FAILED! => {\r\n \"msg\": \"Unexpected failure during module execution: __init__() got an unexpected keyword argument 'type_arg'\",\r\n \"stdout\": \"\"\r\n}",
"task": "ansible.snmp.set"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels