Fix keystone-fernet-keys-rotate-active script

The keystone-fernet-keys-rotate-active script greps for Platform
CPU threshold exceeded alarm from the sysinv DB, while the alarm
tables had been moved to the FM DB. The script would attempts to
run the keystone key rotate command on an idle core, if the Platform
CPU threshold exceeded alarm was active on a standard AIO system

This update modifies keystone-fernet-keys-rotate-active script to
grep for alarms from the FM DB.

Change-Id: Ic43ba21acfe57f11bd60ad3c91b2588ebe8d4f7e
Closes-Bug: 1862825
Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
Tao Liu 2020-02-13 11:02:58 -05:00
parent e060017fb6
commit bda7fbe54d

View File

@ -29,7 +29,7 @@ then
fi
source ${KEYSTONE_KEYS_ROTATE_INFO}
sudo -u postgres psql -d sysinv -c "SELECT alarm_id, entity_instance_id from i_alarm;" | grep -P "^(?=.*100.101)(?=.*${HOSTNAME})" &>/dev/null
sudo -u postgres psql -d fm -c "SELECT alarm_id, entity_instance_id from alarm;" | grep -P "^(?=.*100.101)(?=.*${HOSTNAME})" &>/dev/null
if [ $? -eq 0 ]
then
source /etc/platform/platform.conf