API openstack-config allow to upload 2 config for the same entity

Bug #1522069 reported by Bartosz Kupidura
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Saprykin

Bug Description

Openstack-config API allows to upload 2 different configurations for the same entity (role/cluster/node_id).

This can lead to merge conflicts.

fuel openstack-config --file asd.yaml --env 1 --node 1 --upload
fuel openstack-config --file bsd.yaml --env 1 --node 1 --upload

[root@fuel ~]# curl 10.20.0.2:8000/api/v1/openstack-config/3
{"created_at": "2015-12-02T14:57:25.519280", "is_active": true, "config_type": "node", "node_id": 1, "cluster_id": 1, "configuration": {"nova_config": {"DEFAULT/debug": {"value": true}}, "neutron_config": {"DEFAULT/debug": {"value": true}}}, "id": 3, "node_role": null}[root@fuel ~]#
[root@fuel ~]# curl 10.20.0.2:8000/api/v1/openstack-config/4
{"created_at": "2015-12-02T15:11:33.484528", "is_active": true, "config_type": "node", "node_id": 1, "cluster_id": 1, "configuration": {"nova_config": {"DEFAULT/debug": {"value": true}}}, "id": 4, "node_role": null}[root@fuel ~]#

API should disable previous configuration for entity when uploading new one

Changed in fuel:
status: New → Confirmed
milestone: none → 8.0
tags: added: feature-openstack-config-change team-mixed
tags: added: area-python
Changed in fuel:
assignee: Fuel Mixed (fuel-mixed-team) → Alexander Saprykin (cutwater)
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/252967

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

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

commit 9e104fffc0e8355a634650212b9354eb3651579b
Author: Alexander Saprykin <email address hidden>
Date: Thu Dec 3 15:03:56 2015 +0100

    Do not include openstack configuration into filters

    Pop configuration out of filters to avoid searching
    for an existing configuration by its value.

    Change-Id: I1c6ef5546950b5be8b95e9e3b7e381b9b22caa5a
    Closes-Bug: #1522069

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

Verify the issue with ISO#307

Steps:

* Create 2 yaml files and upload both to the same role/node/env
* Check list and verify there is only one config for the entity

[root@nailgun ~]# fuel openstack-config list --env 1
id | is_active | config_type | cluster_id | node_id | node_role
---|-----------|-------------|------------|---------|----------
5 | True | node | 1 | 2 | None
7 | True | role | 1 | None | compute
9 | True | cluster | 1 | None | None

Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

This bug is covered in autotests econfigure_overcommit_ratio from groups=["services_reconfiguration", "reconfigure_overcommit_ratio"]

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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