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

Interfaces should not be kept in a list #95

Closed
LeeSmet opened this issue Feb 27, 2023 · 2 comments
Closed

Interfaces should not be kept in a list #95

LeeSmet opened this issue Feb 27, 2023 · 2 comments
Assignees
Labels
type_bug Something isn't working
Milestone

Comments

@LeeSmet
Copy link

LeeSmet commented Feb 27, 2023

It seems interfaces are just appended in a list, which leads to stale entries/duplicate entries. For example:

query MyQuery {
  nodes(where: {nodeID_eq: 656}) {
    interfaces {
      id
      ips
      name
    }
  }
}

leads to:

{
  "data": {
    "nodes": [
      {
        "interfaces": [
          {
            "id": "0000482034-000001-e4f62",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000565524-000001-4cb26",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000663646-000001-4b520",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000726370-000001-815c6",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778489-000029-1440b",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778511-000037-9fb8c",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778532-000031-68962",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778554-000025-ce0a6",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778576-000025-f2058",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778600-000009-f7fe1",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778621-000013-ab8b0",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778647-000023-ff8cf",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778670-000025-80742",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778692-000025-0e0c7",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778715-000025-71171",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778736-000027-8fc62",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778758-000017-39210",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778783-000011-3287a",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778807-000011-b0691",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778828-000011-8ad80",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778849-000017-763e7",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778874-000247-0666c",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000778997-000221-12cd4",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000817966-000011-8bdf8",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0000817996-000003-3f1a2",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0003058319-000003-24628",
            "ips": "192.168.29.198",
            "name": "zos"
          },
          {
            "id": "0004704630-000026-7de39",
            "ips": "192.168.29.198,192.168.29.225",
            "name": "zos"
          }
        ]
      }
    ]
  }
}

Not sure how zos reports interface changes, but old IP's for an interface with a given name should be invalidated if new ones come in (keeping in mind that only the same family ip's are invalidated, i.e. IPv4 IP only invalidates IPv4 IP)

@LeeSmet LeeSmet added the type_bug Something isn't working label Feb 27, 2023
@DylanVerstraete
Copy link
Contributor

I think keeping a list is fine but maybe the update call doesn't properly update the interface list.

@DylanVerstraete DylanVerstraete moved this to 🏗 In progress in 3.9.0 Feb 27, 2023
@DylanVerstraete DylanVerstraete self-assigned this Feb 27, 2023
@DylanVerstraete DylanVerstraete moved this from 🏗 In progress to 👀 Verification in 3.9.0 Mar 14, 2023
@DylanVerstraete DylanVerstraete added this to the 2.9.0 milestone Mar 14, 2023
@A-Harby
Copy link
Contributor

A-Harby commented Mar 16, 2023

Verified.
image

@A-Harby A-Harby closed this as completed Mar 16, 2023
@github-project-automation github-project-automation bot moved this from 👀 Verification to ✅ Done in 3.9.0 Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants