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

Implement a custom free IPs service #56

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Areyus
Copy link

@Areyus Areyus commented Mar 26, 2024

This enables the smart-proxy to make use of Infoblox native free IPs API. While this would probably be be handled in an actual IPAM provider, support for this is still unfinished in Foreman, so handling that here is probably the second-best solution.

This enables the smart-proxy to make use of Infoblox native free IPs
API. While this would probably be be handled in an actual IPAM provider,
support for this is still unfinished in Foreman, so handling that here
is probably the second-best solution.
@theforeman-bot
Copy link
Member

Can one of the admins verify this patch?

@Areyus
Copy link
Author

Areyus commented Mar 26, 2024

Currently missing tests, because
a) I am actually unsure how tests for smart-proxy plugins are written and
b) wanted to get some feedback on the general idea of this PR before I continue down that rabbit hole.

Let me know what you think about this idea.
In our experience, the default behavior of guessing IPs and pinging them can be rather slow on big subnets with a lot of systems, which is why we wrote a hacky internal patch to use the unused_ips API a few years ago. This is basically a clean rewrite of that old effort.

@timdeluxe
Copy link
Contributor

Hi @Areyus
thanks for your contribution.

Back then, when i extended this plugin to consider only really "unused" IPs , instead of only those without a DHCP object on them (and became plugin maintainer due to it, cause i couldn't say no 😉), i also saw this API function, but i do not remember, why i did not consider it.

Your approach looks promising, however it servers an edge case. Our biggest networks we serve with Infoblox are /24 and in that size the normal approach isn't a bit issue performance-wise. Anyway nothing speaks against integrating it. However it shoud be made configurable.
And it needs heavy testing - for the unit/integration tests you can look into the existing tests, i am sure you can derive them for your purpose.
But it also needs real testing with an existing infoblox instance. For example how does it play together with the Foreman internal "mark as allocated" process - if i let it suggest a new ip, will it then propose the same one, which is already marked as allocated or a new one? Does it provide only "unused" (from Infoblox perspective) or only those without DHCP object?

If you think you have an acceptable state, i can offer you testing it in our testing environment against an Infoblox instance.

@Areyus
Copy link
Author

Areyus commented Mar 27, 2024

@timdeluxe thanks for the feedback.
I will look into making it configurable and writing tests for it. By, now I did some very rudimentary testing against our own Infoblox instance, which looked promising. I'll get back to you once I would consider it ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants