Bug 1124466 - Using "Suggest new" IP button from New Host pages is a no-op on webui
Summary: Using "Suggest new" IP button from New Host pages is a no-op on webui
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-07-29 14:33 UTC by Shannon Hughes
Modified: 2019-09-26 17:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:43:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log after suggesting ip (4.67 KB, text/x-log)
2014-08-25 19:39 UTC, Shannon Hughes
no flags Details
foreman-debug (423.24 KB, application/x-xz)
2014-08-25 19:50 UTC, 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 09:27 UTC, 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 11:14 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9427 0 None None None 2016-04-22 16:53:55 UTC
Red Hat Product Errata RHBA-2016:1500 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Shannon Hughes 2014-07-29 14:33:43 UTC
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 Program Management 2014-07-29 14:34:03 UTC
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 13:47:32 UTC
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 19:39:11 UTC
Created attachment 930628 [details]
log after suggesting ip

Comment 6 Shannon Hughes 2014-08-25 19:50:11 UTC
Created attachment 930629 [details]
foreman-debug

Comment 7 Shimon Shtein 2015-02-18 13:53:35 UTC
Created redmine issue http://projects.theforeman.org/issues/9427 from this bug

Comment 8 Bryan Kearney 2015-02-18 23:04:12 UTC
Upstream bug assigned to sshtein

Comment 9 Bryan Kearney 2015-02-26 15:02:54 UTC
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 09:19:30 UTC
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 09:27:15 UTC
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 09:39:38 UTC
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 10:03:51 UTC
Upstream bug component is Provisioning

Comment 14 Shimon Shtein 2015-12-09 07:35:30 UTC
(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 11:13:34 UTC
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 11:14:46 UTC
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 08:43:11 UTC
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.