mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Handle icingadb- / icinga-type mismatches
fixes servicedowntimes being written to hostdowntimes (and vice versa)
This commit is contained in:
parent
3c651b4c99
commit
5e3e114a16
@ -98,6 +98,8 @@ void RedisWriter::UpdateAllConfigObjects()
|
|||||||
auto checksums = std::vector<String>({"HMSET", m_PrefixConfigCheckSum + lcType});
|
auto checksums = std::vector<String>({"HMSET", m_PrefixConfigCheckSum + lcType});
|
||||||
|
|
||||||
for (const ConfigObject::Ptr& object : type.first->GetObjects()) {
|
for (const ConfigObject::Ptr& object : type.first->GetObjects()) {
|
||||||
|
if (lcType != GetLowerCaseTypeNameDB(object))
|
||||||
|
continue;
|
||||||
CreateConfigUpdate(object, lcType, attributes, customVars, checksums, false);
|
CreateConfigUpdate(object, lcType, attributes, customVars, checksums, false);
|
||||||
SendStatusUpdate(object);
|
SendStatusUpdate(object);
|
||||||
bulkCounter++;
|
bulkCounter++;
|
||||||
@ -165,7 +167,6 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool runtime
|
|||||||
void RedisWriter::MakeTypeChecksums(const ConfigObject::Ptr& object, std::set<String>& propertiesBlacklist, Dictionary::Ptr& checkSums)
|
void RedisWriter::MakeTypeChecksums(const ConfigObject::Ptr& object, std::set<String>& propertiesBlacklist, Dictionary::Ptr& checkSums)
|
||||||
{
|
{
|
||||||
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
|
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
|
||||||
|
|
||||||
if (endpoint) {
|
if (endpoint) {
|
||||||
auto endpointZone(endpoint->GetZone());
|
auto endpointZone(endpoint->GetZone());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user