diff --git a/lib/remote/apilistener-configsync.cpp b/lib/remote/apilistener-configsync.cpp index a0e992971..3a3fed389 100644 --- a/lib/remote/apilistener-configsync.cpp +++ b/lib/remote/apilistener-configsync.cpp @@ -53,7 +53,7 @@ void ApiListener::ConfigUpdateObjectHandler(const ConfigObject::Ptr& object, con if (object->IsActive()) { /* Sync object config */ listener->UpdateConfigObject(object, cookie); - } else { + } else if (!object->IsActive() && object->GetExtension("ConfigObjectDeleted")) { /* Delete object */ listener->DeleteConfigObject(object, cookie); } diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index e59868a74..77106cc8d 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -154,6 +154,9 @@ bool ConfigObjectUtility::DeleteObjectHelper(const ConfigObject::Ptr& object, bo ConfigItem::Ptr item = ConfigItem::GetByTypeAndName(type->GetName(), object->GetName()); try { + /* mark this object for cluster delete event */ + object->SetExtension("ConfigObjectDeleted", true); + /* triggers signal for DB IDO and other interfaces */ object->Deactivate(); if (item)