Nailgun validates hidden setting groups

Bug #1589872 reported by Julia Aranovich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Medium
Fuel Sustaining
Mitaka
Won't Fix
Medium
Fuel Sustaining
Newton
Confirmed
Medium
Fuel Sustaining

Bug Description

Steps to reproduce in Fuel UI:

1. create an environment (default wizard settings)
2. go to Settings tab, OpenStack Services subtab
3. check "Install Ceilometer and Aodh" and "Use external Mongo DB" settings, "External MongoDB" setting section should appear on the screen
4. input in an invalid value into "MongoDB hosts IP" field to raise a validation error on UI (in my case the field was autocompleted with "admin" value, see the attached screenshot)
5. uncheck "Install Ceilometer and Aodh" and "Use external Mongo DB" settings. "External MongoDB" setting section should disappear from the screen and validation error should not be shown as well as the section was closed.
6. check "Install Sahara" checkbox to enable "Save Settings" button
7. click "Save Settings" button to save the change

Expected result: the change is saved successfully, no error occurred.

Actual result: there is a Nailgun error, PUT /api/clusters/5/attributes failed with 400 Bad Request and the response: {"message": "[hosts_ip] Invalid hosts ip sequence", "errors": []}

The following data was sent to Nailgun http://paste.openstack.org/show/cVKQFEYSmmMg6Ncqo1UR/

Looks like Nailgun validates values in hidden sections, like "External MongoDB" in the case.

Tags: area-python
Revision history for this message
Julia Aranovich (jkirnosova) wrote :
Changed in fuel:
milestone: none → 10.0
Changed in fuel:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Fuel UI Team (fuel-ui)
tags: added: area-ui
Revision history for this message
Julia Aranovich (jkirnosova) wrote :

I think this is Nailgun issue, it should not validate/process setting sections that are hidden by restrictions.

tags: removed: area-ui
Changed in fuel:
assignee: Fuel UI Team (fuel-ui) → nobody
Maciej Relewicz (rlu)
Changed in fuel:
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
Revision history for this message
Dmitriy Kruglov (dkruglov) wrote :

Another occurrence of the issue https://custom-ci.infra.mirantis.net/job/10.0.custom.system_test/563/console (this is not a swarm but an acceptance tests, i.e. it is executed in CI but not on a daily basis).
MOS 9.0, ISO build #496 (RC2).

Revision history for this message
Nikolay Tymtsiv (ntymtsiv) wrote :

@jkirnosova How does fuel-ui mark hidden by restrictions setting sections? Nailgun does not know is this setting hidden or not. IMO Fuel-UI should not send values to nailgun in this case.

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Julia Aranovich (jkirnosova) wrote :

Nikolay, Fuel UI doesn't display hidden settings (see #4 step from the bug description).
To check if setting or setting section is hidden, UI code processes its restrictions attribute:

https://github.com/openstack/fuel-web/blob/stable/mitaka/nailgun/nailgun/fixtures/openstack.yaml#L946-L949

Here you can see that the whole section has a restriction. And section settings should not be validated if any restriction is satisfied (no matter what action it has: 'disable' or 'hide'). Satisfied restriction means that the setting/section isn't active.

Changed in fuel:
status: Incomplete → Confirmed
milestone: 10.0 → 11.0
Revision history for this message
Oleksiy Molchanov (omolchanov) wrote :
Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
Oleksiy Molchanov (omolchanov) wrote :

Oh, sorry, wrong bug id =)

Changed in fuel:
status: Fix Committed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.