Created attachment 1355058 [details] screenshot of UI Description of problem: We were trying to create a host (with libvirt but issue is with all compute resource). But the capsule was unable to provide a free IP. Interface tab shows error as Failed to fetch a free IP from Capsule. Version-Release number of selected component (if applicable):Satellite 6.3 snap 25 How reproducible: always Steps to Reproduce: 1. Create host group with valid subnet, compute resource 2. Navigate to Hosts -> create new host 3. Select host group and compute resource to deploy 4. Go to interface tab and select edit interface 5. Select subnet Actual results: UI showed error on IPv4 suggestion as Failed to fetch a free IP from Capsule %{Capsule}: %{message} and production.log showed 2017-11-19 03:11:13 d95897a3 [app] [I] Started POST "/subnets/freeip" for 10.65.223.187 at 2017-11-19 03:11:13 -0500 2017-11-19 03:11:13 d95897a3 [app] [I] Processing by SubnetsController#freeip as JSON 2017-11-19 03:11:13 d95897a3 [app] [I] Parameters: {"subnet_id"=>"2", "host_mac"=>"", "organization_id"=>"1", "location_id"=>"2", "taken_ips"=>["", ""]} 2017-11-19 03:11:13 d95897a3 [app] [I] Current user: admin (administrator) 2017-11-19 03:11:13 d95897a3 [app] [W] Failed to fetch a free IP from proxy <hostname> (https://<hostname>:9090): ERF12-8202 [ProxyAPI::ProxyException]: Unable to retrieve unused IP ([RestClient::BadRequest]: 400 Bad Request) for Capsule https://<hostname>:9090/dhcp 2017-11-19 03:11:13 d95897a3 [app] [I] Completed 200 OK in 94ms (Views: 0.5ms | ActiveRecord: 6.7ms) and proxy.log showed I, [2017-11-19T03:14:59.108374 ] INFO -- : <IP> - - [19/Nov/2017:03:14:59 -0500] "GET /dhcp/192.168.100.0/unused_ip HTTP/1.1" 400 35 0.0018 E, [2017-11-19T03:15:02.300105 ] ERROR -- : wrong number of arguments (4 for 3) Expected results: free IP suggestion should work. Additional info:
Created attachment 1355062 [details] Backtrace in capsule log
Note, this issue appears while provisioning all compute resources.
following logs appears on clicking "suggest IP": 2017-11-20 03:11:55 7a3483c1 [app] [I] Started POST "/subnets/freeip" for 10.67.116.20 at 2017-11-20 03:11:55 -0500 2017-11-20 03:11:55 7a3483c1 [app] [I] Processing by SubnetsController#freeip as JSON 2017-11-20 03:11:55 7a3483c1 [app] [I] Parameters: {"subnet_id"=>"2", "host_mac"=>"", "organization_id"=>"1", "location_id"=>"2", "taken_ips"=>["", ""]} 2017-11-20 03:11:55 7a3483c1 [app] [I] Current user: admin (administrator) ==> /var/log/foreman-proxy/proxy.log <== E, [2017-11-20T03:11:55.404522 ] ERROR -- : wrong number of arguments (4 for 3) I, [2017-11-20T03:11:55.404897 ] INFO -- : 127.0.0.1 - - [20/Nov/2017:03:11:55 -0500] "GET /dhcp/10.8.113.0/unused_ip HTTP/1.1" 400 35 0.0011 ==> /var/log/foreman/production.log <== 2017-11-20 03:11:55 7a3483c1 [app] [W] Failed to fetch a free IP from proxy SAT_SERVER (https://SAT_SERVER:9090): ERF12-8202 [ProxyAPI::ProxyException]: Unable to retrieve unused IP ([RestClient::BadRequest]: 400 Bad Request) for Capsule https://SAT_SERVER:9090/dhcp 2017-11-20 03:11:55 7a3483c1 [app] [I] Completed 200 OK in 99ms (Views: 0.5ms | ActiveRecord: 6.2ms)
These two bugs are dupe, I will let Dmitri and QAs to decide which one to close as a dupe: https://bugzilla.redhat.com/show_bug.cgi?id=1514885 https://bugzilla.redhat.com/show_bug.cgi?id=1459644
Regression in DHCP proxy module apparently as per https://bugzilla.redhat.com/show_bug.cgi?id=1459644#c21
This BZ blocks https://bugzilla.redhat.com/show_bug.cgi?id=1459644 so I think we should not close as dupe.
Created an upstream issue: http://projects.theforeman.org/issues/21710
This bug is separate from https://bugzilla.redhat.com/show_bug.cgi?id=1459644 AND is tracked separately upstream, I think this warrants a dedicated BZ.
PR attached to upstream issue fixed the issue on my setup.
*** Bug 1517876 has been marked as a duplicate of this bug. ***
To make this bug easier to search the error you will see when this happens is: "Failed to fetch a free IP from Capsule %{Capsule}: %{message}"
VERIFIED Version Tested: Satellite-6.3 Snap 27 Found Successfully fetch a free IP from Capsule.
Created attachment 1363179 [details] Fetched free IP from capsule
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336