Sending PUT request for updating node with invalid role prevent other tabs from opening

Bug #1539733 reported by Alexander Gromov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Dmitry Guryanov
Mitaka
Won't Fix
Medium
Dmitry Guryanov

Bug Description

If we try to send PUT request for updating node and set the role of the node to invalid value than we will not able to open other tabs.

Steps to reproduce:
1. Create environment with default values
2. Send PUT request to fuel to add new node with invalid value for role parameter. For example we can do that the following way:
    1) git clone https://github.com/Mirantis/mos-ci-deployment-scripts
    2) cd mos-ci-deployment-scripts/mos-components-ci/componentspython
    3) go to python interpretator (python)
    4) type the following strings:
        import nailgun_client as fuel
        client = fuel.NailgunClient(<ip>)
        node_data = [{
            "cluster_id": 1,
            "id": 1,
            "pending_addition": True,
            "pending_deletion": False,
            "pending_roles": ["invalid"],
            "name": "invalid" }]
        client.update_nodes(node_data)
3. As result fuel UI will be broken (we will not be able to go to any tabs).

Only UI is affected. We can send another request and indicate correct value for role and UI will work again.

Revision history for this message
Alexander Gromov (agromov) wrote :
Revision history for this message
Ivan Ponomarev (ivanzipfer) wrote :

Please provide Fuel ISO version

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
tags: added: area-python
Changed in fuel:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Alexander Gromov (agromov) wrote :

I have used #485 ISO (fuel-8.0-485-2016-01-26_07-56-06.iso).

Changed in fuel:
status: Incomplete → Confirmed
Changed in fuel:
milestone: none → 9.0
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Looks like issue on nailgun side. Also we should check why our UI fails to open tab on incorrect response from the server.

tags: added: area-ui ui
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Maybe we should track UI issue as a separate bug.

Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

expected result

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Dmitry Guryanov (dguryanov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: Confirmed → In Progress
tags: removed: area-ui
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/300534
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=9edc5b07ca2c46c0e295a12b0d692b5a67967a06
Submitter: Jenkins
Branch: master

commit 9edc5b07ca2c46c0e295a12b0d692b5a67967a06
Author: Dmitry Guryanov <email address hidden>
Date: Fri Apr 1 15:04:07 2016 +0300

    validate pending_roles for Node

    When you do PUT request to NodeCollectionHandler
    it's possible to provide some unexistent roles,
    which results in broken UI. Because it tries to
    get some info about these roles to display.

    Fixes-bug: #1539733
    Change-Id: I3b5070ca36589be3fa8488717e99823e253089ca

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/newton
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.