Misleading info log "admin endpoint config applied" in sysinv.log from conductor

Bug #2038948 reported by ayyappa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
ayyappa

Bug Description

Brief Description
-----------------
Misleading info log "admin endpoint config applied" in sysinv.log from conductor

Severity
------
Minor - this is a minor inconsistency, but is causing user confusion

Steps to Reproduce
-------------------
1) i noticed the following log in the sysinv.log

sysinv 2023-10-06 21:30:35.237 22002 INFO sysinv.conductor.manager [-] admin endpoint config applied
 {'personalities': ['controller'], 'host_uuids': ['13f3d7e8-6e30-4f6a-9de7-31fb5709bc5c'],
 'classes': ['platform::firewall::runtime'], 'force': False, 'config_type': 'config_apply_runtime_manifest',
 'created_at': datetime.datetime(2023, 10, 6, 21, 30, 35, 237289)}

In the above log only 'platform::firewall::runtime' puppet class is applied but not 'openstack::keystone::endpoint::runtime',

It is from the "_controller_config_active_apply" method from the sysinv/conductor/manager.py module
There is a race condition between sysinv/conductor/manager.py and sysinv/puppet/openstack.py

While applying 'platform::firewall::runtime' class , it seems that constants.ADMIN_ENDPOINT_CONFIG_REQUIRED is created by the sysinv/puppet/openstack.py and so it executes the following if condition

if os.path.isfile(constants.ADMIN_ENDPOINT_CONFIG_REQUIRED):
 LOG.info("admin endpoint config applied %s" % config_dict) os.remove(constants.ADMIN_ENDPOINT_CONFIG_REQUIRED)

so we should remove this log message here and add just "config applied" with class

Expected Behavior
----------------

proper log info should be shown in sysinv.log

Actual Behavior
--------------

misleading log info

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

System Configuration
------------------

DC systems

Load info (eg: 2022-03-10_20-00-07)

stx.8.0

Branch/Pull Time/Commit
-----------------------
NA.

Last Pass
--------
N/A Day one config

Timestamp/Logs
------------
NA.

Alarms
------
N/A

Test Activity
--------------
Debugging Request

Workaround
-----------
Not required.

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

Reviewed: https://review.opendev.org/c/starlingx/config/+/897852
Committed: https://opendev.org/starlingx/config/commit/352d1ce0b0acb538d5a715976cbb3c0c46cb8d28
Submitter: "Zuul (22348)"
Branch: master

commit 352d1ce0b0acb538d5a715976cbb3c0c46cb8d28
Author: amantri <email address hidden>
Date: Tue Oct 10 12:02:04 2023 -0400

    Fix misleading info log message in the conductor API

    The following is the misleading log

    sysinv 2023-10-06 21:30:35.237 22002 INFO
    sysinv.conductor.manager [-] admin endpoint config applied
    {'personalities': ['controller'],
    'host_uuids': ['13f3d7e8-6e30-4f6a-9de7-31fb5709bc5c'],
    'classes': ['platform::firewall::runtime'], 'force': False,
    'config_type': 'config_apply_runtime_manifest',
    'created_at': datetime.datetime(2023, 10, 6, 21, 30, 35, 237289)}

    While applying puppet class 'platform::firewall::runtime'
    the openstack module could set the
    constants.ADMIN_ENDPOINT_CONFIG_REQUIRED flag, this fix
    removes this and adds the proper log message.

    Testcases:
    PASS: Check sysinv.log and verify that misleading log is no
          shown

    Closes-bug: 2038948

    Change-Id: Ib475bea9a43bf3ff5b865af85a0b1558438f022b
    Signed-off-by: amantri <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
assignee: nobody → ayyappa (mantri425)
tags: added: stx.9.0 stx.config
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.