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

vyos_ospf_interfaces does not handle virtual interfaces for the name/identifier of the interface #281

Open
sdwilsh opened this issue Oct 16, 2022 · 0 comments

Comments

@sdwilsh
Copy link
Contributor

sdwilsh commented Oct 16, 2022

SUMMARY

If you specify an interface like eth1.3, the commit will fail. You can specify eth1 vif 3, but then it is always reported as changed, even if nothing is changed.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vyos_ospf_interfaces

ANSIBLE VERSION
ansible [core 2.13.3]
  config file = /home/sdwilsh/ansible-playbooks/ansible.cfg
  configured module search path = ['/home/sdwilsh/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/sdwilsh/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/sdwilsh/ansible-collection-dev:/home/sdwilsh/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/sdwilsh/.local/bin/ansible
  python version = 3.10.7 (main, Sep  7 2022, 15:22:19) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /home/sdwilsh/.local/lib/python3.10/site-packages/ansible_collections
Collection Version
---------- -------
vyos.vyos  3.0.1  

# /home/sdwilsh/ansible-collection-dev/ansible_collections
Collection Version
---------- -------
vyos.vyos  3.0.1 
CONFIGURATION
COLLECTIONS_PATHS(/home/sdwilsh/ansible-playbooks/ansible.cfg) = ['/home/sdwilsh/ansible-collection-dev', '/home/sdwilsh/.ansible/collections', '/usr/share/ansible/collections']
DEFAULT_HOST_LIST(/home/sdwilsh/ansible-playbooks/ansible.cfg) = ['/home/sdwilsh/ansible-playbooks/prod-inventory']
DEFAULT_REMOTE_USER(/home/sdwilsh/ansible-playbooks/ansible.cfg) = ansible
DEFAULT_ROLES_PATH(/home/sdwilsh/ansible-playbooks/ansible.cfg) = ['/home/sdwilsh/ansible-playbooks/roles', '/home/sdwilsh/.ansible/roles']
DEFAULT_VAULT_PASSWORD_FILE(/home/sdwilsh/ansible-playbooks/ansible.cfg) = /home/sdwilsh/ansible-playbooks/.ansible_vault_password
INTERPRETER_PYTHON(/home/sdwilsh/ansible-playbooks/ansible.cfg) = auto
PERSISTENT_COMMAND_TIMEOUT(/home/sdwilsh/ansible-playbooks/ansible.cfg) = 180
OS / ENVIRONMENT

I'm running vyos 1.3.2, but I don't think it'll matter, looking at the code.

STEPS TO REPRODUCE
    - name: Setup OSPF Interfaces
      vyos.vyos.vyos_ospf_interfaces:
        config:
          - name: eth1.2
            address_family:
            - afi: ipv4
              authentication:
                md5_key:
                  key_id: 1
                  key: "{{ vyos__ospf_authentication_key }}"
              cost: 1
              dead_interval: 5
              hello_interval: 2
              network: non-broadcast
        state: replaced
      tags:
        - "ospf"
EXPECTED RESULTS

This should work as other rules do and accept syntax like eth1.3. A more useful failure message would be nice too.

ACTUAL RESULTS
fatal: [gateway01.routers.hogs.tswn.us]: FAILED! => {"changed": false, "module_stderr": "h1.2 ip ospf authentication md5 key-id 1 md5-key XXXXXXXXXXX\r\n\r\r\n  \r\n  \r\n  Invalid Ethernet interface name\r\n  Value validation failed\r\n  Set failed\r\n\r\n\r\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000[edit]\r\r\[email protected]# ", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"}
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

1 participant