openstack-config handle conflicts for role entity

Bug #1524284 reported by Bartosz Kupidura
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Saprykin
8.0.x
Fix Released
High
Alexander Saprykin

Bug Description

When you upload openstack configuration for 2 roles with the same variable, it will lead to 'random merge' in case when 1 node have those 2 roles assigned.

Ex.
openstack-config for role cinder: nova_config -> DEFAULT/debug = True
openstack-config for role compute: nova_config -> DEFAULT/debug = False

If you have single node with both roles, which value should be used? We need to create some way to solve conflicts.

We can use some sort algorithm based on role-name.

tags: added: area-python
Changed in fuel:
assignee: nobody → Fuel Mixed (fuel-mixed-team)
Changed in fuel:
assignee: Fuel Mixed (fuel-mixed-team) → Alexander Saprykin (cutwater)
status: New → In Progress
description: updated
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/255236

tags: added: feature-openstack-config-change team-mixed
removed: feature-openstack-config
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/255236
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=138f8cbf7965425da75b8f790e051e68f939f147
Submitter: Jenkins
Branch: master

commit 138f8cbf7965425da75b8f790e051e68f939f147
Author: Alexander Saprykin <email address hidden>
Date: Wed Dec 9 13:33:29 2015 +0100

    Sort configurations to merge roles in a correct order

    Multiple configurations for node roles are merged
    into one single configuration during serialization process.
    It is required to keep the same order of configurations
    to have a predictable behavior.

    Change-Id: I649cccc73ae406a1f6953ad8139910bb18acc95f
    Closes-Bug: #1524284

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

ISO version: http://paste.openstack.org/show/483967/

Steps:

  1. Create config file controller.yaml: http://paste.openstack.org/show/483968/ and mongo.yaml: http://paste.openstack.org/show/483966/

  2. Upload config for controller and mongo roles:

    fuel openstack-config --role controller --env 1 --upload --file controller.yaml
    fuel openstack-config --role mongo --env 1 --upload --file mongo.yaml

  3. List configs:

    [root@nailgun ~]# fuel openstack-config --list --env 1
    id | is_active | config_type | cluster_id | node_id | node_role
    ---|-----------|-------------|------------|---------|-----------
    4 | True | role | 1 | None | mongo
    5 | True | role | 1 | None | controller

3. Execute config on node with this 2 roles:

    [root@nailgun ~]# date
    Fri Jan 15 07:40:19 UTC 2016
    [root@nailgun ~]# fuel openstack-config --execute --env 1 --node 1

4. Wait when deployemnt task will be finished and check hiere on that node:

root@node-1:~# cat /etc/hiera/override/configuration/role.yaml
configuration:
  nova_config:
    DEFAULT/debug: {value: true}
root@node-1:~#

Here we can see that only second config was applied. In Nova.conf only first parameter was changed

Changed in fuel:
status: Fix Committed → Confirmed
Changed in fuel:
importance: Medium → High
tags: removed: on-verification
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/268177

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/268177
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=8e65af9e316f8ec91cd0e42f49804c86e3f727e9
Submitter: Jenkins
Branch: master

commit 8e65af9e316f8ec91cd0e42f49804c86e3f727e9
Author: Alexander Saprykin <email address hidden>
Date: Fri Jan 15 15:58:03 2016 +0100

    Fix configuration merging for multiple roles

    Serializer used incorrect logic to merge configuration
    dictionaries. It did merging on the first nesting level
    while it is required to do it on the second.

    Change-Id: I1ef13bc80098d6e9b1f450ea35d4ec8b32d6171d
    Closes-Bug: #1524284

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/270746

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/8.0)

Reviewed: https://review.openstack.org/270746
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=a48da802d2a20514648c1ca2d9f89b9da1039492
Submitter: Jenkins
Branch: stable/8.0

commit a48da802d2a20514648c1ca2d9f89b9da1039492
Author: Alexander Saprykin <email address hidden>
Date: Fri Jan 15 15:58:03 2016 +0100

    Fix configuration merging for multiple roles

    Serializer used incorrect logic to merge configuration
    dictionaries. It did merging on the first nesting level
    while it is required to do it on the second.

    Change-Id: I1ef13bc80098d6e9b1f450ea35d4ec8b32d6171d
    Closes-Bug: #1524284
    (cherry picked from commit 8e65af9e316f8ec91cd0e42f49804c86e3f727e9)

tags: added: on-verification
Revision history for this message
Sergey Novikov (snovikov) wrote :

Verified on VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "491"
  build_id: "491"
  fuel-nailgun_sha: "b900f9d9de4d2b6ccf27f4addf3f0e38502a0bac"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "e869072139670bb8bbfde00ef04dec3d189f5927"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "f7a008e6801ba0072b08302a740174aec506078a"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "fac143f4dfa75785758e72afbdc029693e94ff2b"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6b993b3004e8d97d840b672d6c1d44c320975cd9"

STV:

            1. Deploy cluster with 3 controller and 2 compute+cinder nodes
            2. Upload a new openstack configuration for compute role
                ---
               configuration:
                 nova_config:
                   DEFAULT/default_ephemeral_format:
                     value: "ext4"
                   DEFAULT/verbose:
                     value: "False"

            3. Upload a new openstack configuration for cinder role
                ---
               configuration:
                 nova_config:
                   DEFAULT/default_ephemeral_format:
                     value: "ext3"
                   DEFAULT/debug:
                     value: "False"

            4. Wait for configuration applying
            5. Get uptime of process "nova-compute"
            6. Check settings on node with roles "compute, cinder". It should match
                ---
               configuration:
                 nova_config:
                   DEFAULT/default_ephemeral_format:
                     value: "ext4"
                   DEFAULT/debug:
                     value: "False"
                   DEFAULT/verbose:
                     value: "False"

tags: removed: on-verification
Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

Verify on ISO 9.0 mos iso #416

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.