Bug 2207698
| Summary: | The `Suggest new` link in the interface tab beside IPv4 Address while creating a host is not suggesting any new IP even if the hosts created are deleted to free up ip leases | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | sganar |
| Component: | Foreman Proxy | Assignee: | nalfassi |
| Status: | CLOSED MIGRATED | QA Contact: | Satellite QE Team <sat-qe-bz-list> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.14.0 | CC: | ahumbe, aruzicka, ehelms, ekohlvan, gtalreja, jpathan, lstejska, lzap, nalfassi, rlavi, vijsingh |
| Target Milestone: | Unspecified | Keywords: | AutomationBlocker, MigratedToJIRA, PrioBumpQA, TestBlocker, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-smart_proxy_dhcp_infoblox-0.0.18 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-06-06 16:14:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
sganar
2023-05-16 15:05:08 UTC
Is this a regression from earlier Satellite release? No, this is not a regression Can you try to reproduce the issue without Infoblox, I believe it won't be related just to the Infoblox,
but more to clean up of IPs in the Capsule.
Can you also upload logs from the Capsule? I quote Nalfassi here:
> I discovered that the `start` method mentioned in this link (https://github.com/theforeman/smart-proxy/blob/develop/modules/dhcp_common/free_ips.rb#L41) is not invoked anywhere, and this is the root cause of the problem.
After providing the information (test with different providers, logs), we should move it to the Capsule component.
I'm pretty sure what happens is that the Foreman requests a free IP suggestion from the Smart Proxy. That is implemented via the Smart Proxy's free IPs service: https://github.com/theforeman/smart-proxy/blob/develop/modules/dhcp_common/free_ips.rb The whole goal of this is that you can suggest an IP to the user and be reasonable sure that it will remain free while the user is filling in the rest of the host form. What you can see is that it looks for an available IP by taking the set of IPs it's allowed to allocate within the subnet, subtract the already allocated. The IP it found is temporarily marked as allocated. This period is defined as the blacklist interval, defaulting to 30 * 60 (so 30 minutes). Cleanup of the reservations pool happens every minute. The is no mechanism to manually mark a previously suggested IP address as free again. You can actually override this blacklist duration, though there is no installer option for it. This would be done in by adding :blacklist_duration_minutes to /etc/foreman-proxy/settings.d/dhcp_isc.yml The other possibility is to increase the size of the pool. In a subnet you provide the Smart Proxy with a begin and end IP address. Increasing that to a larger number will allow to you provision more hosts. Apologies for the update shortly after. I missed that it was about Infoblox, not ISC DHCP. (In reply to Leos Stejskal from comment #6) > Can you try to reproduce the issue without Infoblox, I believe it won't be > related just to the Infoblox, > but more to clean up of IPs in the Capsule. dhcp_isc uses the same FreeIps service: https://github.com/theforeman/smart_proxy_dhcp_infoblox/blob/a71c1786fcec3cd79235acbbd8ee96a6c4d13075/lib/smart_proxy_dhcp_infoblox/plugin_configuration.rb#L22 (In reply to Leos Stejskal from comment #6) > Can you try to reproduce the issue without Infoblox, I believe it won't be > related just to the Infoblox, > but more to clean up of IPs in the Capsule. > > Can you also upload logs from the Capsule? I quote Nalfassi here: > > I discovered that the `start` method mentioned in this link (https://github.com/theforeman/smart-proxy/blob/develop/modules/dhcp_common/free_ips.rb#L41) is not invoked anywhere, and this is the root cause of the problem. > > After providing the information (test with different providers, logs), we > should move it to the Capsule component. Interestingly this never calls `start_services :unused_ips` so that may be the actual bug. If we look at dhcp_isc, we see it does start the service. First it defines the free_ips dependency: https://github.com/theforeman/smart-proxy/blob/2fb6db34f8726df3e8b276c4ced0542fd296bc6a/modules/dhcp_isc/configuration_loader.rb#L28 That is then called with start_services: https://github.com/theforeman/smart-proxy/blob/2fb6db34f8726df3e8b276c4ced0542fd296bc6a/modules/dhcp_isc/dhcp_isc_plugin.rb#L18 Looking at the definition of start_services, that calls .start: https://github.com/theforeman/smart-proxy/blob/2fb6db34f8726df3e8b276c4ced0542fd296bc6a/lib/proxy/plugin_initializer.rb#L253-L258 So I think Nofar's analysis of not starting the FreeIps service is correct and a very likely cause of the problem. Adding that start_services :unused_ips line to https://github.com/theforeman/smart_proxy_dhcp_infoblox/blob/master/lib/smart_proxy_dhcp_infoblox/dhcp_infoblox_plugin.rb likely resolves the issue. Created redmine issue https://projects.theforeman.org/issues/37227 from this bug Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/37227 has been resolved. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |