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

The event indicates "The parent prefix was not able to be computed" when the real problem is that the user set an invalid tenant #132

Open
2 tasks done
henrybear327 opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@henrybear327
Copy link
Collaborator

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?

If you use a PrefixClaim using parentPrefixSelector with an invalid Tenant (a Tenant that doesn't exist in NetBox), the Event will show

The parent prefix was not able to be computed. no parent prefix can be obtained with the query conditions set in ParentPrefixSelector, err = <nil>, number of candidates = 0

See #90 (comment)

What did you expect to happen?

An error message such as invalid Tenant supplied should be returned.

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

Use the following CR

apiVersion: netbox.dev/v1
kind: PrefixClaim
metadata:
  name: prefixclaim-customfields-sample
spec:
  tenant: "MY_TENANT that doesn't exist"
  site: "DM-Akron"
  preserveInNetbox: true
  prefixLength: "/31"
  parentPrefixSelector: # The keys and values are case-sensitive
    environment: "PostProduction"
    poolName: "Pool 1"

Netbox operator version

Latest on main (the issue was discovered on #90 before merging)

Netbox operator configuration (command line flags or environment variables)

No response

Relevant log output

No response

Anything else we need to know?

No response

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

No branches or pull requests

1 participant