Page MenuHomeVyOS Platform

vyos_ospf_interfaces does not handle virtual interfaces for the name/identifier of the interface
Closed, ResolvedPublicBUG

Description

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.

  • 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\nansible@gateway01.routers.hogs.tswn.us# ", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"}

Details

Version
3.0.1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

syncer triaged this task as Normal priority.

I cannot see the virtual interface names are supported in 1.3-1.5 -

vyos@taget01# set interfaces ethernet eth1.2 ip ospf cost 50

Invalid Ethernet interface name
Value validation failed
Set failed

The Ansible module does not mutate the interface but pushes it unchanged in the command, yet fails.
I believe this issue needs to be reassigned to VyOS development team

evgmol changed the task status from Open to Needs reporter action.Mar 3 2025, 12:26 AM

@pasik Hi mate! Were you the original reporter of this bug please?
If so, can you clarify a few questions I asked above?
thank you