Delete commands for fuel config cli don't work if resource name is used

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

Bug Description

Detailed bug description:
Delete commands for fuel config cli 'fuel2 config del' and 'fuel2 config rm override' don't work if resource name is used instead resource id. No error messages present but value is still in the list.

Steps to reproduce:
1. set config with key a and value 1
2. delete config with key a
3. set config with key b and value 2
4. override config with key b to value 3
5 delete override config with key b

Expected results:
2. config with key a is removed from the list
5. override config with key b is removed, value is 2

Actual result:
2. config with key a is still in the list
5. for key b - value is still 3

# fuel2 config get --env 3 --resource re_1

+-------+-------+
| Field | Value |
+-------+-------+
| a | 1 |
| b | 3 |
+-------+-------+

[root@nailgun tuning-box]# fuel2 config del -e 3 -r re_1 -k a
ResourceValue for key a was deleted

[root@nailgun tuning-box]# fuel2 config get --env 3 --resource re_1
+-------+-------+
| Field | Value |
+-------+-------+
| a | 1 |
| b | 3 |
+-------+-------+

Workaround:
Use resource id instead of resource name

9.1 snapshot #280 with latest tuning-box

[root@nailgun tuning-box]# shotgun2 short-report
cat /etc/fuel_build_id:
 495
cat /etc/fuel_build_number:
 495
cat /etc/fuel_release:
 9.1
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-release-9.0.0-1.mos6356.noarch
 fuel-library9.0-9.0.0-1.mos8599.noarch
 fuel-openstack-metadata-9.0.0-1.mos8859.noarch
 rubygem-astute-9.0.0-1.mos770.noarch
 python-packetary-9.0.0-1.mos149.noarch
 fuel-migrate-9.0.0-1.mos8599.noarch
 fuel_plugin_example_v4_hotpluggable-4.0-4.0.0-1.noarch
 shotgun-9.0.0-1.mos90.noarch
 fuel-utils-9.0.0-1.mos8599.noarch
 fuel-mirror-9.0.0-1.mos149.noarch
 fuel-notify-9.0.0-1.mos8599.noarch
 network-checker-9.0.0-1.mos74.x86_64
 python-fuelclient-9.0.0-1.mos355.noarch
 fuel-agent-9.0.0-1.mos291.noarch
 fuel-misc-9.0.0-1.mos8599.noarch
 fuel-9.0.0-1.mos6356.noarch
 fuel-bootstrap-cli-9.0.0-1.mos291.noarch
 fuel-ui-9.0.0-1.mos2814.noarch
 fuel-nailgun-9.0.0-1.mos8859.noarch
 fuelmenu-9.0.0-1.mos275.noarch
 fuel-setup-9.0.0-1.mos6356.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8859.noarch
 fuel-ostf-9.0.0-1.mos944.noarch
 nailgun-mcagents-9.0.0-1.mos770.noarch

Changed in fuel:
importance: Undecided → High
assignee: nobody → Alexander Kislitsky (akislitsky)
milestone: none → 9.2
status: New → Confirmed
importance: High → Medium
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/372589

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

Reviewed: https://review.openstack.org/372589
Committed: https://git.openstack.org/cgit/openstack/tuning-box/commit/?id=3d9f3d4d4eac3dbfab1627a45c5113b2a40f9633
Submitter: Jenkins
Branch: master

commit 3d9f3d4d4eac3dbfab1627a45c5113b2a40f9633
Author: Alexander Kislitsky <email address hidden>
Date: Mon Sep 19 18:33:16 2016 +0300

    Additional redirects on resource name removed

    We don't need to redirect client if name is passed instead
    of the resource id. After redirect we will fetch exactly the
    same object. So with redirects we had only overhead with API
    requests handling and loading objects from the DB.

    Change-Id: Id36de2f961a45c479dbab3dd2e842a5a5a4f71f6
    Closes-Bug: #1625223

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Tatyana Kuterina (tkuterina) wrote :

Verified on 9.1 snapshot #294 with latest tuning-box

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