'Textarea' used on settings tab should be validated on empty values

Bug #1488455 reported by Andrey Sledzinskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel Plugins
New
Undecided
Unassigned
Fuel for OpenStack
Invalid
High
Fuel UI Team

Bug Description

Steps:
1. Install plugin on master (https://github.com/stackforge/fuel-plugin-detach-rabbitmq)
2. Create cluster with default values
3. Open settings tab, enable rabbit plugin, delete all from 'Additional config' textarea
4. Add 1 controller, 1 compute, 1 cinder, 1 rabbit node
5. Start deployment

Actual result - deployment failed with
2015-08-25 10:09:18 +0000 Puppet (err): can't convert Hash into String at /etc/fuel/plugins/detach-rabbitmq-1.0/rabbitmq_hiera_override.pp:19 on node node-1.test.domain.local

It happened because textarea was empty and wasn't parsed into yaml correctly.

Expected - plugin framework should allow to specify textarea as required to be it validated on UI to prevent such errors

Logs are attached

Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :
Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :

I was suggested workaround to add to yaml, will try it too
regex:
             source: '^\w+$'
             error: "Empty field"

Changed in fuel:
importance: Undecided → High
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 7.0
Changed in fuel-plugins:
assignee: nobody → Sergii Golovatiuk (sgolovatiuk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-detach-keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/216689

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Sergii Golovatiuk (sgolovatiuk)
status: New → In Progress
Revision history for this message
Sergii Golovatiuk (sgolovatiuk) wrote :

There should be additional validation on UI.

Changed in fuel:
assignee: Sergii Golovatiuk (sgolovatiuk) → Fuel UI Team (fuel-ui)
Revision history for this message
Alexandra Morozova (astepanchuk) wrote :

validations on UI are caused by openstack.yaml restrictions section, so it should be fixed there. I vote against obligatory check as there may be not needed validations for some fields.

Changed in fuel:
status: In Progress → Opinion
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-plugin-detach-database (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/216697

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-plugin-detach-keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/216699

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-plugin-detach-rabbitmq (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/216700

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-detach-keystone (master)

Reviewed: https://review.openstack.org/216689
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugin-detach-keystone/commit/?id=968bb2bd79fc183ebab1b9591abcc3ce2a40c169
Submitter: Jenkins
Branch: master

commit 968bb2bd79fc183ebab1b9591abcc3ce2a40c169
Author: Sergii Golovatiuk <email address hidden>
Date: Tue Aug 25 14:34:43 2015 +0200

    Fix behavior on empty yaml

    parseyaml('') returns false which cannot be used in pick as pick
    requires Array or Hash on input. Adding is_bool allows to address this
    issue

    Proper fix should be in parseyaml itself. [MODULES-2462] should address
    this issue.

    Change-Id: I1ac53f2944d2fa7831430adbc06893e114191b6d
    Closes-Bug: 1488455

Changed in fuel:
status: Opinion → Fix Committed
Changed in fuel:
status: Fix Committed → Opinion
Revision history for this message
Vitaly Kramskikh (vkramskikh) wrote :

As for validation for non-emptiness, you can use '.+' regexp to achieve this. No changes in plugin framework are needed.

As for extended validation (yaml/json + schemas), it's a feature and should/will be covered by a separate blueprint

Changed in fuel:
status: Opinion → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-plugin-detach-database (master)

Reviewed: https://review.openstack.org/216697
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugin-detach-database/commit/?id=d9073b7610b8cd441e42443d943d793b86803822
Submitter: Jenkins
Branch: master

commit d9073b7610b8cd441e42443d943d793b86803822
Author: asledzinskiy <email address hidden>
Date: Tue Aug 25 16:02:59 2015 +0300

    Add validation on emptyness of additional config

    - We need to validate additional config textarea
    on empty values

    Change-Id: I9ec16da7ff92a0f147dc2cde8671d3144ad28344
    Related-Bug: #1488455

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-plugin-detach-keystone (master)

Reviewed: https://review.openstack.org/216699
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugin-detach-keystone/commit/?id=d6b025f9dbd03ad3fe96b709bc79991d8f155450
Submitter: Jenkins
Branch: master

commit d6b025f9dbd03ad3fe96b709bc79991d8f155450
Author: asledzinskiy <email address hidden>
Date: Tue Aug 25 16:13:19 2015 +0300

    Add validation on emptyness of additional config

    - We need to validate additional config textarea
    on empty values

    Change-Id: I596f52b5812367a44ab40920c9fd41221cab2f99
    Related-Bug: #1488455

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-plugin-detach-rabbitmq (master)

Reviewed: https://review.openstack.org/216700
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugin-detach-rabbitmq/commit/?id=72cbc9cdfa4f4a1dd6b29dce83741a671ef6e310
Submitter: Jenkins
Branch: master

commit 72cbc9cdfa4f4a1dd6b29dce83741a671ef6e310
Author: asledzinskiy <email address hidden>
Date: Tue Aug 25 16:17:09 2015 +0300

    Add validation on emptyness of additional config

    - We need to validate additional config textarea
    on empty values

    Change-Id: I3f4ab52a0027e11a75cd077c2db7113fdaef1c52
    Related-Bug: #1488455

Changed in fuel-plugins:
assignee: Sergii Golovatiuk (sgolovatiuk) → nobody
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.