mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 00:24:23 +02:00
Ensure that type names are lower cases for Redis lookups
This commit is contained in:
parent
33a00e4b5a
commit
8c38c7eddc
@ -120,7 +120,7 @@ void RedisWriter::UpdateAllConfigObjects(void)
|
|||||||
if (!ctype)
|
if (!ctype)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String typeName = type->GetName();
|
String typeName = type->GetName().ToLower();
|
||||||
|
|
||||||
/* replace into aka delete insert is faster than a full diff */
|
/* replace into aka delete insert is faster than a full diff */
|
||||||
ExecuteQuery({ "DEL", "icinga:config:" + typeName, "icinga:config:" + typeName + ":checksum", "icinga:status:" + typeName });
|
ExecuteQuery({ "DEL", "icinga:config:" + typeName, "icinga:config:" + typeName + ":checksum", "icinga:status:" + typeName });
|
||||||
@ -157,6 +157,10 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran
|
|||||||
|
|
||||||
UpdateObjectAttrs("icinga:config:", object, FAConfig);
|
UpdateObjectAttrs("icinga:config:", object, FAConfig);
|
||||||
|
|
||||||
|
Type::Ptr type = object->GetReflectionType();
|
||||||
|
|
||||||
|
String typeName = type->GetName().ToLower();
|
||||||
|
|
||||||
// /* Serialize config object attributes */
|
// /* Serialize config object attributes */
|
||||||
// Dictionary::Ptr objectAttrs = SerializeObjectAttrs(object, FAConfig);
|
// Dictionary::Ptr objectAttrs = SerializeObjectAttrs(object, FAConfig);
|
||||||
//
|
//
|
||||||
@ -199,7 +203,6 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran
|
|||||||
// ExecuteQuery({ "HSET", "icinga:config:" + typeName + ":checksum", objectName, checkSumBody });
|
// ExecuteQuery({ "HSET", "icinga:config:" + typeName + ":checksum", objectName, checkSumBody });
|
||||||
|
|
||||||
if (runtimeUpdate) {
|
if (runtimeUpdate) {
|
||||||
Type::Ptr type = object->GetReflectionType();
|
|
||||||
ExecuteQuery({ "PUBLISH", "icinga:config:update", type->GetName() + ":" + object->GetName() });
|
ExecuteQuery({ "PUBLISH", "icinga:config:update", type->GetName() + ":" + object->GetName() });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +218,7 @@ void RedisWriter::SendConfigDelete(const ConfigObject::Ptr& object)
|
|||||||
if (!m_Context)
|
if (!m_Context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String typeName = object->GetReflectionType()->GetName();
|
String typeName = object->GetReflectionType()->GetName().ToLower();
|
||||||
String objectName = object->GetName();
|
String objectName = object->GetName();
|
||||||
|
|
||||||
ExecuteQueries({
|
ExecuteQueries({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user