Skip to content

Duplicate IP addresses can lead to orphan IPAddressCR #120

@faebr

Description

@faebr

Bug report criteria

  • This bug report is not security related, security issues should be disclosed privately via netbox operator maintainers.
  • Existing open issues have been checked and this is not a duplicate.

What happened?

  • Create 2 IpAddress CRs using the same IP and tenant but one with the preserveInNetbox flag set to true and one to false
  • Apply both CRs to the cluster. Both will be reconciled and point to the same IP address instance in Netbox
  • If you now delete the CR that has the preserveInNetbox flag set to false, Netbox Operator will delete the IP address in Netbox and we end up with an orphan IpAddress CR pointing to a non-existing IP

What did you expect to happen?

To either prevent the ability to create IP addresses with the same IP or make sure before deletion in the NetBox that no other CR is referencing this IP address.

How can we reproduce it (as minimally and precisely as possible)?

Described in what happened.

Netbox operator version

latest

Netbox operator configuration (command line flags or environment variables)

No response

Relevant log output

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions