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: IPPrefixPool doesn't take into account resources that have been freed #5315

Open
BaptisteGi opened this issue Dec 24, 2024 · 0 comments
Labels
type/bug Something isn't working as expected

Comments

@BaptisteGi
Copy link
Contributor

BaptisteGi commented Dec 24, 2024

Component

API Server / GraphQL

Infrahub version

1.0.9

Current Behavior

I have a /24 prefix that is connected to a IP prefix resource pool. I have allocated many subnets out of this pool and at some point reached the end of my /24 prefix. Then I removed the first prefixes allocated but somehow my resource pool still see the prefix as full and thus doesn't want to allocate anymore.

image

['IPPrefixPoolGetResource'] No more resources available

Few additional bits:

  • Even when I completely empty my prefix it complains that there is no resource anymore
  • There is no branch involved

Expected Behavior

I expect the IP prefix resource pool to catchup on the latest deletions that happened in the prefix and re-allocate them during the following instances.

Steps to Reproduce

  • Create a prefix
  • Create a IP prefix resource pool and point to the previous prefix as resource
  • Allocate the entire prefix
  • Remove some of the allocated prefix
  • Try to allocate some resource again
    -> Even tho there is some space (cause you removed some records) resource pool says the prefix is full

Additional Information

Weirdly enough in the logs I see that the resource pool mentions some of the records I have deleted, maybe somehow the resource pool has a cache that is not cleared? or take the state of the data from the past? (tried to reboot infrahub but still have the same message...)

logs.txt

@BaptisteGi BaptisteGi added the type/bug Something isn't working as expected label Dec 24, 2024
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 as expected
Projects
None yet
Development

No branches or pull requests

1 participant