Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cisco.ios.ios_vlans mtu bug for state replaced and overridden on the Catalyst 9k platform #1139

Open
jiholland opened this issue Nov 27, 2024 · 1 comment

Comments

@jiholland
Copy link

SUMMARY

The cisco.ios.ios_vlans resource module fails with state replaced and overridden for Catalyst 9k devices running IOS-XE when altering or deleting vlans because it tries to execute the none-existing vlan configuration command no mtu 1500.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_vlans

ANSIBLE VERSION
ansible [core 2.18.0]
  config file = /home/jiholland/ansible.cfg
  configured module search path = ['/home/jiholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jiholland/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /home/jiholland/collections:/home/jiholland/.ansible/collections
  executable location = /home/jiholland/.venv/bin/ansible
  python version = 3.12.7 (main, Oct  7 2024, 08:37:53) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/home/jiholland/.venv/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection Version
---------- -------
cisco.ios  9.0.3 
CONFIGURATION
ANSIBLE_COW_SELECTION(/home/jiholland/ansible-playbooks/ansible.cfg) = small
CALLBACKS_ENABLED(/home/jiholland/ansible-playbooks/ansible.cfg) = ['community.general.log_plays']
CONFIG_FILE() = /home/jiholland/ansible-playbooks/ansible.cfg
DEFAULT_FORKS(/home/jiholland/ansible-playbooks/ansible.cfg) = 20
DISPLAY_SKIPPED_HOSTS(/home/jiholland/ansible-playbooks/ansible.cfg) = False
HOST_KEY_CHECKING(/home/jiholland/ansible-playbooks/ansible.cfg) = False

OS / ENVIRONMENT
Switch Ports Model              SW Version        SW Image              Mode   
------ ----- -----              ----------        ----------            ----   
*    1 65    C9300-48T          17.12.04          CAT9K_IOSXE           INSTALL
STEPS TO REPRODUCE

Execute the provided example playbook on a Catalyst 9k device running IOS-XE 17.X.

---
- name: Replace a vlan.
  hosts: dev-leaf-1
  gather_facts: false

  tasks:

    - name: Replace vlan 20.
      cisco.ios.ios_vlans:
        config:
          - vlan_id: 20
            name: Test_VLAN20
        state: replaced
EXPECTED RESULTS

I expect the module to replace the vlan configuration for the provided vlan(s) in the task.

ACTUAL RESULTS

If the vlan is already present; the module fails because it tries to execute the command no mtu 1500 which is not a valid command in Cisco IOS-XE.

fatal: [dev-leaf-1]: FAILED! => {
    "changed": false,
    "module_stderr": "no mtu 1500\r\nno mtu 1500\r\n    ^\r\n% Invalid input detected at '^' marker.\r\n\r\ndev-leaf-1(config-vlan)#",
    "module_stdout": "",
    "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error"
}
@jiholland jiholland changed the title cisco.ios.ios_vlans mtu bug for state replaced and overridden on the Catalyst 9k platform cisco.ios.ios_vlans mtu bug for state replaced and overridden on the Catalyst 9k platform Nov 27, 2024
@roverflow
Copy link
Member

@jiholland This issue is being actively worked on, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants