Bug 1669427 - Sahara CDH Plugin won't allow creation of Node Group Templates through Horizon
Summary: Sahara CDH Plugin won't allow creation of Node Group Templates through Horizon
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-sahara-ui
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z5
: 13.0 (Queens)
Assignee: Telles Nobrega
QA Contact: Luigi Toscano
Tana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-25 08:57 UTC by Kevin Jones
Modified: 2019-03-14 13:36 UTC (History)
0 users

Fixed In Version: openstack-sahara-ui-8.0.1-3.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1669501 (view as bug list)
Environment:
Last Closed: 2019-03-14 13:36:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test-5000 node group template added via horizon (55.76 KB, image/png)
2019-01-25 12:00 UTC, Kevin Jones
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack Storyboard 2004866 0 None None None 2019-01-25 14:00:36 UTC
OpenStack gerrit 633193 0 None None None 2019-01-25 12:48:08 UTC
Red Hat Product Errata RHBA-2019:0562 0 None None None 2019-03-14 13:36:32 UTC

Description Kevin Jones 2019-01-25 08:57:56 UTC
Description of problem:
When using the CDH plugin, upon filling in the form tabs for creating a node group template, horizon returns that there was an error submitting the form. When you look at the logs, the error message has to do with the number of fields being exceeded.

Importing via JSON template does not work either.


Version-Release number of selected component (if applicable):
RHOSP 13
CDH 5.11.0 (assume same issues for other CDH versions and other plugins)


How reproducible:
100%

Steps to Reproduce:
1. Deploy Sahara on RHOSP 13
2. Build, upload and register a CDH image
3. Log into horizon and goto data processing -> clusters -> node templates
4. Create a node group template
5. Fill in all required fields
6. Submit the form

Actual results:
Horizon displays a red error message saying the form could not be submitted

Expected results:
The node group is created

Additional info:
Error seen in /var/log/containers/horizon/horizon.log

2019-01-24 22:15:42,142 57 ERROR django.security.TooManyFieldsSent The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.

Comment 1 Luigi Toscano 2019-01-25 09:28:51 UTC
This looks like https://storyboard.openstack.org/#!/story/1714575 but I thought we fixed it. It looks like a packaging problem, with the configuration file which fixes this (_12_toggle_data_upload_max_number_fields.py) not being injected correctly. If you can, can you please verify whether copying this file:

http://git.openstack.org/cgit/openstack/sahara-dashboard/plain/sahara_dashboard/local_settings.d/_12_toggle_data_upload_max_number_fields.py

inside the horizon container, into the directory /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d, fixes the issue?

Comment 2 Telles Nobrega 2019-01-25 10:45:49 UTC
Luigi is right. The issue has been fixed, we have to check if it was packaged properly for OSP13.

Comment 3 Kevin Jones 2019-01-25 10:50:14 UTC
Is there something else I need to do? I did the following on my 3 controllers.

cd /var/lib/config-data/puppet-generated/horizon/
mkdir -p usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d
curl http://git.openstack.org/cgit/openstack/sahara-dashboard/plain/sahara_dashboard/local_settings.d/_12_toggle_data_upload_max_number_fields.py -o usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d/_12_toggle_data_upload_max_number_fields.py
docker restart horizon

I now see the file with the setting set to 2000 in each of the 3 horizon containers.

However, the node group template form submission still fails.

Still same error in horizon log
2019-01-25 05:37:42,169 81 ERROR django.security.TooManyFieldsSent The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.

Comment 4 Telles Nobrega 2019-01-25 11:39:52 UTC
Hi Kevin,

It should be enough, but just to be sure, can you try a higher value for max number fields? 

If that doesn't work than we need to understand why the value is not being loaded by horizon.

Thanks

Comment 5 Kevin Jones 2019-01-25 11:59:58 UTC
Yes, bumping to 5000 allows node group template creation through horizon now. Obviously I don't know what the minimum number is. I'd have to work my way back down to 2000 to find out I suppose.

On all 3 controllers, I modified the file to change from 2000 to 5000

[root@overcloud-controller-2 ~]# vi /var/lib/config-data/puppet-generated/horizon/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d/_12_toggle_data_upload_max_number_fields.py
[root@overcloud-controller-2 ~]# cat /var/lib/config-data/puppet-generated/horizon/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d/_12_toggle_data_upload_max_number_fields.py
# toggle DATA_UPLOAD_MAX_NUMBER_FIELDS
DATA_UPLOAD_MAX_NUMBER_FIELDS = 5000
[root@overcloud-controller-2 ~]# docker restart horizon
horizon

Result is attached. test-5000 node group template added via horizon.

Comment 6 Kevin Jones 2019-01-25 12:00:38 UTC
Created attachment 1523501 [details]
test-5000 node group template added via horizon

Comment 7 Telles Nobrega 2019-01-25 12:08:59 UTC
If I remember correctly 3000 should be more than enough. But I'm not 100% sure what the minimum value is.

Comment 8 Luigi Toscano 2019-01-25 12:29:51 UTC
Playing a bit with the logs and the django code, I see that the number of requested fields is... 2001 (!)
So we need to
- raise the limit a bit (probably not 2001, but not too much), also upstream;
- fix the packaging to install the package (maybe just link it in the right location, it looks like a symbolic link works too), also in RDO.

Comment 23 Luigi Toscano 2019-03-01 16:48:58 UTC
The value of DATA_UPLOAD_MAX_NUMBER_FIELDS has been raised to 2600 and now it is possible to created CDH-based node group templates.

Verified with:
openstack-sahara-ui-8.0.1-3.el7ost.noarch
python-django-horizon-13.0.1-4.el7ost.noarch
python2-django-1.11.11-1.el7ost.noarch

Comment 25 errata-xmlrpc 2019-03-14 13:36:31 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-2019:0562


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