Duplicate region_config key in /etc/platform/platform.conf

Bug #1931529 reported by Dan Voiculeasa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Iago Regiani

Bug Description

Brief Description
-----------------

There are 2 region_config keys in /etc/platform/platform.conf. They are present since the bootstrap.yml is run, so the investigation should start here.

Python2 SafeConfigParser ignores duplicate keys, while Python3 SafeConfigParser will throw an error.

This was uncovered on centos8 branch where Python3 is used, while Python2 is used on the master branch.
The issue may be lurking here for quite a while.

controller-0:~$ cat /etc/platform/platform.conf
nodetype=controller
subfunction=controller,worker
system_type=All-in-one
security_profile=standard
management_interface=lo
http_port=8080
INSTALL_UUID=e4e95b54-045a-431c-b031-d1e60168582f
UUID=7ffcbb3c-9436-47c9-9ef5-181a213242c3
sdn_enabled=no
region_config=no
system_mode=simplex
sw_version=21.05
security_feature="nopti nospectre_v2 nospectre_v1"
vswitch_type=none
region_config=False
oam_interface=enp0s3
cluster_host_interface=lo

Severity
--------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
------------------
Deploy AIO-SX

Expected Behavior
------------------
One region_config key in platform.conf

Actual Behavior
----------------
Two region_config keys in platform.conf.

Reproducibility
---------------
100%

System Configuration
--------------------
Checked on 2 types: AIO-SX, AIO-DX, didn't check the others, but may be present.

Branch/Pull Time/Commit
-----------------------
Any June 2021 load.

Last Pass
---------
Didn't check, but I have a feeling this is old, very old.

Timestamp/Logs
--------------
Not needed.

Test Activity
-------------
Developer Testing

Workaround
----------
For python3 environments this commit will work around the issue, and use the last occurrence of the key: https://review.opendev.org/c/starlingx/config/+/795365

Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: stx.7.0 / medium as this is required for python3 which is currently planned for that release

Changed in starlingx:
importance: Undecided → Low
status: New → Triaged
tags: added: stx.config
Changed in starlingx:
importance: Low → Medium
tags: added: stx.7.0
Ghada Khalil (gkhalil)
tags: added: stx.python3
Iago Regiani (iregiani)
Changed in starlingx:
assignee: nobody → Iago Regiani (iregiani)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/802376
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/80fd1cc254aa75304456bc10961c9e2a31773ae2
Submitter: "Zuul (22348)"
Branch: master

commit 80fd1cc254aa75304456bc10961c9e2a31773ae2
Author: Iago Regiani <email address hidden>
Date: Mon Jul 26 13:56:02 2021 -0400

    Platform.conf has duplicated region_config entries

    Bootstrap playbook is currently writing two times the key, first by
    puppet and second on the task "Add new entries to platform.conf". This
    removes the second addition.

    Tested running the playbook on a SX, DC, on subcloud Backup & Restore,
    and re-ran it on the subcloud. In all cases the platform.conf file
    contains only one region_config and the subclouds were in sync with no
    unexpected alarms.

    Closes-bug: #1931529
    Change-Id: I55f17ddfdedf5cc6b16c7d55daa99e57bfbb38bc
    Signed-off-by: Iago Regiani <email address hidden>

Changed in starlingx:
status: In Progress → 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.