It is possible to set value on nonexistent level if env levels are empty

Bug #1624271 reported by Alexander Kislitsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Kislitsky

Bug Description

Steps to reproduce:

1. setup tuning-box
2. restart nailgun
3. configure keystone service for tuning-box
4. create ConfigDB component:
   fuel2 config comp create -n comp -
5. create ConfigDB resource:
   fuel2 config def create -i COMPONENT_ID -n res1 -p '{"a": "b"}' -t json
6. create ConfigDB environment:
   fuel2 config env create -i COMPONENT_ID
7. set resource value for nonexistent level:
   fuel2 config set -e 11 -r 7 -k a -v val_b -t str -l fake_level=xx

Expected result:
Error message about wrong level

Actual result:
Value is set without level.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tuning-box (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tuning-box (master)

Reviewed: https://review.openstack.org/371527
Committed: https://git.openstack.org/cgit/openstack/tuning-box/commit/?id=9390d0ad2bcaf21efad6312bb2dc8c59610c3284
Submitter: Jenkins
Branch: master

commit 9390d0ad2bcaf21efad6312bb2dc8c59610c3284
Author: Alexander Kislitsky <email address hidden>
Date: Fri Sep 16 16:07:55 2016 +0300

    Fix for levels mismatch in set request and environment

    Error is rased now if nonexistent level specified in the set
    resource value request. For instance we have env levels: ['a'].
    Request to set resource value with levels ['a', 'b'] raises error
    now.

    Change-Id: I6ce8dc99b288196092a7e4cf69be9756d5b0f6dd
    Closes-Bug: #1624271
    Closes-Bug: #1614551

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Alexey. Kalashnikov (akalashnikov) wrote :

verified on 9.2

shotgun2 report:
http://paste.openstack.org/show/586692/

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
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.