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

[BUG] Error in test validation for tests/integration/lag - tests 07,09 #1698

Closed
ssasso opened this issue Dec 27, 2024 · 3 comments · Fixed by #1703
Closed

[BUG] Error in test validation for tests/integration/lag - tests 07,09 #1698

ssasso opened this issue Dec 27, 2024 · 3 comments · Fixed by #1703
Assignees
Labels
bug Something isn't working

Comments

@ssasso
Copy link
Collaborator

ssasso commented Dec 27, 2024

For 07-mlag-trunk.yml:

root@hippo:~/GIT_H/netlab/tests/integration/lag# netlab validate
[ping]    Pinging H2 from H1 [ node(s): h1 ]
[VALUE]   validate: 'Box' object is not callable
[HINT]    device: frr, action: exec
          plugin expression: exec_ping(nodes.h2.interfaces[0].ipv4,af='ipv4')
[MISSING] validation: Test ping: have no idea what command to execute on node h1 / device frr
[WAITING] Waiting for STP to enable the ports (retrying for 45 seconds)
[VALUE]   validate: 'Box' object is not callable
[MISSING] validation: Test ping: have no idea what command to execute on node h1 / device frr
[VALUE]   validate: 'Box' object is not callable

It seems the test is pointing at the wrong interface(s).

Looking at the netlab snapshot with yq:

cat netlab.snapshot.yml | yq .nodes.h2.interfaces[0].ipv4
null
cat netlab.snapshot.yml | yq .nodes.h2.interfaces[0]
{
  "ifindex": 30000,
  "ifname": "bond1",
  "lag": {
    "ifindex": 1,
    "lacp": "fast",
    "lacp_mode": "active",
    "mode": "802.3ad"
  },
  "linkindex": 3,
  "mtu": 1500,
  "name": "[Access VLAN red] h2 -> [s1,s2]",
  "neighbors": [
    {
      "ifname": "lag 2",
      "ipv4": "172.16.0.1/24",
      "node": "s1"
    },
    {
      "ifname": "lag 2",
      "ipv4": "172.16.0.2/24",
      "node": "s2"
    }
  ],
  "type": "lag",
  "virtual_interface": true,
  "vlan": {
    "access": "red",
    "access_id": 1000
  }
}
@ssasso ssasso added the bug Something isn't working label Dec 27, 2024
@ssasso
Copy link
Collaborator Author

ssasso commented Dec 27, 2024

Side note: second test of 09-mlag-m-to-m.yml is broken as well:

root@hippo:~/GIT_H/netlab/tests/integration/lag# netlab validate
[ping]    Pinging H2 from H1 [ node(s): h1 ]
[PASS]    h1: Ping to h2 (172.16.0.6) succeeded
[PASS]    Test succeeded

[ping_gw] Pinging gateway from H1 [ node(s): h1 ]
[VALUE]   validate: list index out of range
[HINT]    device: linux, action: exec
          plugin expression: exec_ping(nodes.b1.interfaces[4].ipv4,af='ipv4')
[MISSING] validation: Test ping_gw: have no idea what command to execute on node h1 / device linux

[FAIL]    2 tests completed, one test failed

@ssasso ssasso changed the title [BUG] Error in test validation for tests/integration/lag/07-mlag-trunk.yml [BUG] Error in test validation for tests/integration/lag - tests 07,09 Dec 27, 2024
@ipspace
Copy link
Owner

ipspace commented Dec 27, 2024

The second validation check in that same test is also problematic -- the moment someone touches that test the interfaces will change.

I have to admit I did a cursory review of the LAG integration tests. I assumed that an author of an integration test ran it at least once. Obviously my lofty expectations are way out of line in the brave new world of "move fast and break things"

@ipspace
Copy link
Owner

ipspace commented Dec 27, 2024

Looking at the netlab snapshot with yq:

netlab inspect --node h2 interfaces[0] might be easier (plus it adds the group variables to the node, so you get the "real" picture of what Ansible sees)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants