From 5d853423efdb4ba020f7a54f0b1295ef150a26f2 Mon Sep 17 00:00:00 2001 From: Rei Oliveira Date: Wed, 3 Apr 2024 19:20:06 -0300 Subject: [PATCH] Wrap 'classes' parameter as a list in config_dict object This change fixes a type mismatch bug introduced in [1]. A python list is expected but a python str is provided instead. [1] https://review.opendev.org/c/starlingx/config/+/893566 This type mismatch will result in the 'deadlock' prevention logic to never be invoked. In [2] below, the 'if classes' branch is never entered: [2] https://opendev.org/starlingx/config/src/commit/85a548ffcc77d708de848a4648352f8481543695/sysinv/sysinv/sysinv/sysinv/conductor/manager.py#L13481 Test plan: PASS: Run 'sudo chage -M 999 sysadmin; sudo chage -M 888 sysadmin; sudo chage -M 777 sysadmin'. Notice 'out of config alarm' in 'fm alarm-list'. Verify that it clears up after about 5 min. PASS: Verify in i_user db table and /etc/shadow that it correctly contains the last password age, 777 in this case. Note: In a managed subcloud, the value in /etc/shadow file will be changed again in about 20 min to sync with the sysadmin password and age in the system controller. Closes-Bug: 2034446 Signed-off-by: Rei Oliveira Change-Id: I24d9807e9eb2d94e026be7b8f3448a6cd42fcdd6 --- sysinv/sysinv/sysinv/sysinv/conductor/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 3d47d2f968..c1283c27cb 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -9562,7 +9562,7 @@ class ConductorManager(service.PeriodicService): config_dict = { "personalities": personalities, - "classes": self.PUPPET_RUNTIME_CLASS_USERS, + "classes": [self.PUPPET_RUNTIME_CLASS_USERS], puppet_common.REPORT_STATUS_CFG: puppet_common.REPORT_USER_CONFIG, }