Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1124466 - Using "Suggest new" IP button from New Host pages is a no-op on webui
Using "Suggest new" IP button from New Host pages is a no-op on webui
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.0.3
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: Unused
Assigned To: Shimon Shtein
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks: GSS_Sat6Beta_Tracker/GSS_Sat6_Tracker
  Show dependency treegraph
 
Reported: 2014-07-29 10:33 EDT by Shannon Hughes
Modified: 2016-07-27 04:43 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:43:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log after suggesting ip (4.67 KB, text/x-log)
2014-08-25 15:39 EDT, Shannon Hughes
no flags Details
foreman-debug (423.24 KB, application/x-xz)
2014-08-25 15:50 EDT, Shannon Hughes
no flags Details
IP not found error on UI when no dhcp proxy set, however production.log throws 404 (56.24 KB, image/png)
2015-10-20 05:27 EDT, Sachin Ghai
no flags Details
when no dhcp-proxy associated to subnet, and on clicking 'suggest_new link, ui stick with old IP (42.62 KB, image/png)
2016-04-09 07:14 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9427 None None None 2016-04-22 12:53 EDT
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 08:24:38 EDT

  None (edit)
Description Shannon Hughes 2014-07-29 10:33:43 EDT
Description of problem:

When creating a new host and from the Network tab The "suggest new" IP button is depressed and nothing happens. The text field is not filled in and there are not visual indicators if an error occured of the status of the action. 

When inspecting the production log it appears a possible 404 occured that is not converted into a meaningful message: 

 (0.1ms)  SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1
   (0.1ms)  SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1
  Host::Managed Load (0.3ms)  SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."name" = 'process_hostgroup' LIMIT 1
  Rendered common/404.html.erb within layouts/application (1.0ms)
  Rendered home/_submenu.html.erb (3.5ms)
  Rendered home/_user_dropdown.html.erb (1.3ms)
Read fragment views/tabs_and_title_records-1 (0.1ms)
  Rendered home/_topbar.html.erb (6.1ms)
  Rendered layouts/base.html.erb (7.5ms)
Filter chain halted as :find_by_name rendered or redirected
Completed 404 Not Found in 20ms (Views: 10.0ms | ActiveRecord: 1.2ms)
Comment 1 RHEL Product and Program Management 2014-07-29 10:34:03 EDT
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Dominic Cleal 2014-07-31 09:47:32 EDT
Could you provide the full log please (foreman-debug is recommended)?  The request details would be very useful.

Also check the subnet in the Satellite 6 UI has a DHCP proxy associated to it.
Comment 4 Shannon Hughes 2014-08-25 15:39:11 EDT
Created attachment 930628 [details]
log after suggesting ip
Comment 6 Shannon Hughes 2014-08-25 15:50:11 EDT
Created attachment 930629 [details]
foreman-debug
Comment 7 Shimon Shtein 2015-02-18 08:53:35 EST
Created redmine issue http://projects.theforeman.org/issues/9427 from this bug
Comment 8 Bryan Kearney 2015-02-18 18:04:12 EST
Upstream bug assigned to sshtein@redhat.com
Comment 9 Bryan Kearney 2015-02-26 10:02:54 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/9427 has been closed
-------------
Shimon Shtein
Applied in changeset commit:b9521a8dc7f4e61a011cabbfdfe78657bd3c24d2.
Comment 10 Sachin Ghai 2015-10-20 05:19:30 EDT
Verified with latest upstream build:

foreman-release-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch


when we don't associate dhcp proxy then I still see 404 in production logs:

--
| Started POST "/subnets/freeip" for 10.10.48.191 at 2015-10-20 05:13:46 -0400
2015-10-20 05:13:46 [app] [I] Processing by SubnetsController#freeip as JSON
2015-10-20 05:13:46 [app] [I]   Parameters: {"subnet_id"=>"1", "host_mac"=>"", "organization_id"=>"1", "location_id"=>"2", "taken_ips"=>["", ""]}
2015-10-20 05:13:46 [app] [I]   Rendered common/404.html.erb within layouts/application (0.9ms)
2015-10-20 05:13:46 [app] [I]   Rendered home/_user_dropdown.html.erb (2.6ms)
2015-10-20 05:13:46 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-10-20 05:13:46 [app] [I]   Rendered home/_topbar.html.erb (3.2ms)
2015-10-20 05:13:46 [app] [I]   Rendered layouts/base.html.erb (4.3ms)
2015-10-20 05:13:46 [app] [I] Completed 404 Not Found in 22ms (Views: 5.9ms | ActiveRecord: 3.7ms)
--

However webUI throws error: 

Error generating IP: Not Found

But the link is enabled even if dhcp proxy was not set. please see the screenshot.
Comment 11 Sachin Ghai 2015-10-20 05:27 EDT
Created attachment 1084668 [details]
IP not found error on UI when no dhcp proxy set, however production.log throws 404
Comment 12 Sachin Ghai 2015-10-20 05:39:38 EDT
Another observation is if we click on 'suggest new' link and when dhcp-proxy is properly set then nothing happens on UI. Neither it allocates new IP nor it raises any error. 

Assigning back now.

Expected result should be:

1) in case dhcp proxy set, UI should generates new IP on clicking 'Suggest New'

2) In case, dhcp proxy is not set then UI should raise an error and similar error should be raised via production.log and 'suggest new' link should be disabled.
Comment 13 Bryan Kearney 2015-10-20 06:03:51 EDT
Upstream bug component is Provisioning
Comment 14 Shimon Shtein 2015-12-09 02:35:30 EST
(In reply to Sachin Ghai from comment #12)
> Another observation is if we click on 'suggest new' link and when dhcp-proxy
> is properly set then nothing happens on UI. Neither it allocates new IP nor
> it raises any error. 
> 
> Assigning back now.
> 
> Expected result should be:
> 
> 1) in case dhcp proxy set, UI should generates new IP on clicking 'Suggest
> New'
> 
> 2) In case, dhcp proxy is not set then UI should raise an error and similar
> error should be raised via production.log and 'suggest new' link should be
> disabled.

IMHO, this kind of behavior deserves its own issue. Original issue was about showing internal errors from the process, this one is a change in behavior - to be more precise about showing the "suggest" link.
Comment 15 Sachin Ghai 2016-04-09 07:13:34 EDT
Verified with sat6.2 beta snap6.2

The reported issue has been fixed. I can see newly generated IP on clicking 'suggest new' link from webUI:


here are the production.log:
===========================
2016-04-09 07:08:13 [app] [I] Started POST "/subnets/freeip" for 10.67.7.83 at 2016-04-09 07:08:13 -0400
2016-04-09 07:08:13 [app] [I] Processing by SubnetsController#freeip as JSON
2016-04-09 07:08:13 [app] [I]   Parameters: {"subnet_id"=>"1", "host_mac"=>"", "organization_id"=>"1", "location_id"=>"2", "taken_ips"=>["192.168.100.32", ""]}
2016-04-09 07:08:15 [app] [I] Completed 200 OK in 2085ms (Views: 0.2ms | ActiveRecord: 4.9ms)

And If I associate a static subnet where dhcp proxy is not set, webUI stick woth old IP. Please see the attached screenshot.
Comment 16 Sachin Ghai 2016-04-09 07:14 EDT
Created attachment 1145384 [details]
when no dhcp-proxy associated to subnet, and on clicking 'suggest_new link, ui stick with old IP
Comment 18 errata-xmlrpc 2016-07-27 04:43:11 EDT
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/RHBA-2016:1500

Note You need to log in before you can comment on or make changes to this bug.