use immutable identifier for node in network_metadata

Bug #1538220 reported by Sergey Vasilenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
High
Fuel Python (Deprecated)
Newton
Fix Committed
High
Georgy Kibardin

Bug Description

Currently as key for nodes-hash (into network_metadata) used short hostname string.
However we going to implement LCM feature. Changing hostname is one of potential ussues, related to LCM.

Currently hostname change after deploy is locked. But if this will be unlocked, some deployment tasks can't be executed properly.

Proposed solution:
* Each node has UID, uniq for whole master-node.
* use "node-${UID}" string (not hostname, just such string) as key for node identifying into network_metadata/nodes

such way is backward compatible, while hostname change after deploy is locked.

Dmitry Klenov (dklenov)
tags: added: area-python
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
status: New → Confirmed
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/263876
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=d89b25921c2cd982dca92a55a46b98ed50a060a2
Submitter: Jenkins
Branch: master

commit d89b25921c2cd982dca92a55a46b98ed50a060a2
Author: Sergey Vasilenko <email address hidden>
Date: Tue Jan 5 17:56:18 2016 +0300

    No more use nodes list.

    Nodes list is deprecated, beause incompatible with network-roles model.
    Network metadata should be used instead.

    This patchset implements:
    * remove nodes list from fixtures
    * remove unused function filter_nodes
    * remove some unused code, related to nodes list
    * new parser function get_node_key_name() for generating immutable node key name
    * fix parser function roles_include() for using network_metadata
    * use roles_include() if need instead directly lookup into network_metadata
    * fix some manifests for use network_matadata/nodes

    Change-Id: I2e6b1cd5cb75263efc995aa9f62bd3073abed1b8
    Related-bug: #1531128
    Related-bug: #1538220

Dmitry Pyzhov (dpyzhov)
tags: added: team-network
Revision history for this message
Sergey Vasilenko (xenolog) wrote :

Also such situation affects us if plugin modify network_metadata and end-user rename node after deploy (LCM).
Such scenario leads a to duplicate node record into the hiera_hash('network_metadata') call:

    network_metadata:
      nodes:
        node-1:
          swift_zone: '1'
          uid: '1'
          fqdn: node-1.test.domain.local
          user_node_name: Untitled (38:fb)
          node_roles:
            - primary-controller
            - plugin-modified-node_role_record
          name: node-1
        renamed_node-1:
          swift_zone: '1'
          uid: '1'
          fqdn: renamed_node-1.test.domain.local
          user_node_name: renamed_node-1 (38:fb)
          node_roles:
            - primary-controller
          name: renamed_node-1

Changed in fuel:
importance: Medium → High
Revision history for this message
Sergey Vasilenko (xenolog) wrote :

Proposed compromise solution:
* In the 9.0 use string "node-{uid}" as key into network_metadata/nodes
* In the 10.0 reduce these keys to string "{uid}"

Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Why don't reduce that to "{uid}" in 9.0? we have plenty of time. besides, I can't understand how "hostname" may affect you guys. Event if it's changed after deployment, astute.yaml will be regenerated according to that name. So it seems like a trying to fix not existed bug.

Revision history for this message
Aleksandr Didenko (adidenko) wrote :

It should be either "node-{uid}" or "{uid}", doesn't really matter, but it should not depend on hostname.

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

version

expected result

steps to reproduce

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
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Fix was committed to master/10.0: https://review.openstack.org/#/c/293780/

Need to backport it to 9.0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers