config/sysinv
Heitor Matsui fd5d603d86 Fix runtime_config_get method to avoid type error
An issue was found when config_applied for a host assumed
the default value, which is the string "install" (refer to [1]),
returning a type error in runtime_config_get trying to compare
string "install" with a column "id" with type int.

This commit fixes runtime_config_get method by inverting the
logic: if the id passed is an int then compare with id, if it
is not then assume it is a string and compare with config_uuid
column.

[1] 15aefdc468/sysinv/sysinv/sysinv/sysinv/agent/manager.py (L116)

Test Plan
PASS: set config_applied="install" for a host, force inventory
      report and observe no more database errors on sysinv.log
PASS: install/bootstrap/unlock AIO-DX

Story: 2010676
Task: 49745

Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
Change-Id: I9c687a1eb67c62291f1d2aa9cef1d6fbe993d0fa
2024-03-21 17:12:17 -03:00
..
cert-alarm Update debian package versions to use git commits 2023-02-10 20:11:06 +00:00
cert-mon Update debian package versions to use git commits 2023-02-10 20:11:06 +00:00
cgts-client Merge "Revert "Modify Memory Field Names"" 2024-03-13 14:50:37 +00:00
ipsec-auth Add log messages to IPSec Auth Server and Client 2024-02-02 14:58:03 -03:00
sysinv Fix runtime_config_get method to avoid type error 2024-03-21 17:12:17 -03:00
sysinv-agent Update debian package versions to use git commits 2023-02-10 20:11:06 +00:00