+++ This bug was initially created as a clone of Bug #1669427 +++ 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. --- Additional comment from Luigi Toscano on 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? --- Additional comment from Telles Nobrega on 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. --- Additional comment from Kevin Jones on 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. --- Additional comment from Telles Nobrega on 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 --- Additional comment from Kevin Jones on 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. --- Additional comment from Kevin Jones on 2019-01-25 12:00 UTC --- --- Additional comment from Telles Nobrega on 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. --- Additional comment from Luigi Toscano on 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.
It looks like the number of fields required is a bit higher on 14 (2101), so the creation of a node group template fails (tested with openstack-sahara-ui-9.0.1-0.20190115011300.6e3f753.el7ost.noarch and CDH 5.11). Can we please rebase the fix over https://review.openstack.org/#/c/635923/ , which is the tip of stable/rocky?
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-9.0.1-0.20190115011301.6e3f753.el7ost.noarch python-django-horizon-14.0.1-0.20181006183341.19865ee.el7ost.noarch python2-django-1.11.13-2.el7ost.noarch
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:0588