mirror of https://github.com/Icinga/icinga2.git
parent
e29e25aefd
commit
7c70d51b27
|
@ -97,6 +97,10 @@ void Application::Stop(bool runtimeRemoved)
|
||||||
Log(LogCritical, "Application", "Cannot update PID file. Aborting restart operation.");
|
Log(LogCritical, "Application", "Cannot update PID file. Aborting restart operation.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log(LogDebug, "Application")
|
||||||
|
<< "Keeping pid '" << m_ReloadProcess << "' open.";
|
||||||
|
|
||||||
ClosePidFile(false);
|
ClosePidFile(false);
|
||||||
} else
|
} else
|
||||||
ClosePidFile(true);
|
ClosePidFile(true);
|
||||||
|
|
|
@ -36,7 +36,7 @@ void ApiListener::ConfigGlobHandler(ConfigDirInformation& config, const String&
|
||||||
CONTEXT("Creating config update for file '" + file + "'");
|
CONTEXT("Creating config update for file '" + file + "'");
|
||||||
|
|
||||||
Log(LogNotice, "ApiListener")
|
Log(LogNotice, "ApiListener")
|
||||||
<< "Creating config update for file '" << file << "'";
|
<< "Creating config update for file '" << file << "'.";
|
||||||
|
|
||||||
std::ifstream fp(file.CStr(), std::ifstream::binary);
|
std::ifstream fp(file.CStr(), std::ifstream::binary);
|
||||||
if (!fp)
|
if (!fp)
|
||||||
|
@ -98,8 +98,17 @@ bool ApiListener::UpdateConfigDir(const ConfigDirInformation& oldConfigInfo, con
|
||||||
newTimestamp = newConfig->Get("/.timestamp");
|
newTimestamp = newConfig->Get("/.timestamp");
|
||||||
|
|
||||||
/* skip update if our config is newer */
|
/* skip update if our config is newer */
|
||||||
if (oldTimestamp >= newTimestamp)
|
if (oldTimestamp >= newTimestamp) {
|
||||||
|
/* TODO: Less ugly */
|
||||||
|
Log(LogInformation, "ApiListener")
|
||||||
|
<< "Old timestamp '" << std::setprecision(std::numeric_limits<double>::digits10 + 1)
|
||||||
|
<< oldTimestamp << "' is more recent than new one '" << newTimestamp << "'.";
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log(LogInformation, "ApiListener")
|
||||||
|
<< "New timestamp '" << std::setprecision (std::numeric_limits<double>::digits10 + 1) << newTimestamp
|
||||||
|
<< "' is more recent than old one '" << oldTimestamp << "'.";
|
||||||
|
|
||||||
{
|
{
|
||||||
ObjectLock olock(newConfig);
|
ObjectLock olock(newConfig);
|
||||||
|
@ -266,6 +275,10 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D
|
||||||
return Empty;
|
return Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log(LogInformation, "ApiListener")
|
||||||
|
<< "Applying config update from endpoint '" << origin->FromClient->GetEndpoint()->GetName() << "' of zone '"
|
||||||
|
<< origin->FromZone->GetName() << "'";
|
||||||
|
|
||||||
Dictionary::Ptr updateV1 = params->Get("update");
|
Dictionary::Ptr updateV1 = params->Get("update");
|
||||||
Dictionary::Ptr updateV2 = params->Get("update_v2");
|
Dictionary::Ptr updateV2 = params->Get("update_v2");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue