From 01422dfdf772322b2aae3c82bf7badb51eaad6da Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 22 Mar 2022 13:59:48 +0100 Subject: [PATCH] Request certificate renewal also master2->master1 not only sat->master to prevent master2's certificate from expiring. --- lib/remote/apilistener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index e798390cd..2bac6f11d 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -756,8 +756,9 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi } Zone::Ptr myZone = Zone::GetLocalZone(); + auto parent (myZone->GetParent()); - if (myZone->GetParent() == eZone) { + if (parent == eZone || !parent && eZone == myZone) { Log(LogInformation, "ApiListener") << "Requesting new certificate for this Icinga instance from endpoint '" << endpoint->GetName() << "'.";