Bug #12731
openDouble-logging of AJAX request on Puppet class addition
Description
when editing a host and clicking on adding a config group, the following is obsereved:
2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/146/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Processing by PuppetclassesController#parameters as */* 2015-12-07T15:27:52 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"EK5bPbO41IS5jSnf/MN0vqG5yAcsBNGwO7PB6wnlFs0=", "host"=>... ...
this further generates a few additional AJAX calls as it assume the form has changed and require backend update.
AFAIK there is no ajax call on remove.
Updated by Dominic Cleal over 8 years ago
- Description updated (diff)
A couple of points I don't follow:
a) the parameters AJAX call may be required to add/remove overridden class parameters from the parameters tab if the classes list changed
b) what additional generated AJAX calls do you mean? Logs?
Updated by Ohad Levy over 8 years ago
Dominic Cleal wrote:
A couple of points I don't follow:
a) the parameters AJAX call may be required to add/remove overridden class parameters from the parameters tab if the classes list changed
that might be true but POST "/puppetclasses/146/parameters IMHO should not occur ?
b) what additional generated AJAX calls do you mean? Logs?
you are correct, adding a class should refresh the parameters tab, however, i see multiple (note the duplication):
2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/146/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/146/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200... 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/180/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/180/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/197/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/197/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/185/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200 2015-12-07T15:27:52 [app] [I] Started POST "/puppetclasses/185/parameters" for 127.0.0.1 at 2015-12-07 15:27:52 +0200
Updated by Dominic Cleal over 8 years ago
Ohad Levy wrote:
Dominic Cleal wrote:
A couple of points I don't follow:
a) the parameters AJAX call may be required to add/remove overridden class parameters from the parameters tab if the classes list changed
that might be true but POST "/puppetclasses/146/parameters IMHO should not occur ?
This is just rendering the parameters for that one Puppet class (it's more of a GET, not POST). If that class is in the config group then it's correct I think.
b) what additional generated AJAX calls do you mean? Logs?
you are correct, adding a class should refresh the parameters tab, however, i see multiple (note the duplication):
[...]
I think that's a logging issue, not a second AJAX call.
Updated by Dominic Cleal over 8 years ago
- Subject changed from adding config group in host form triggers an unnecessary ajax call to Double-logging of AJAX request on Puppet class addition
- Category changed from Web Interface to Logging
Debugging in both the browser and server-side seems to show there's no double execution of the controller action, so it's probably double logging on the server.
Edit: and only on STDOUT, the log file appears fine.