From 8b87e301970ab7e2af7d0e433ead597d922a8f0a Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 14 Aug 2012 10:53:04 +0200 Subject: [PATCH] Removed roles/publications. --- components/checker/checkercomponent.cpp | 6 +- components/cibsync/cibsynccomponent.cpp | 4 -- components/delegation/delegationcomponent.cpp | 2 +- components/demo/democomponent.cpp | 1 - components/discovery/discoverycomponent.cpp | 65 +----------------- components/discovery/discoverycomponent.h | 2 - components/discovery/discoverymessage.cpp | 9 --- components/discovery/discoverymessage.h | 3 - configure.ac | 1 + doc/icinga2-config.odt | Bin 31455 -> 31313 bytes icinga-app/icinga-checker1.conf | 6 -- icinga-app/icinga-checker2.conf | 6 -- icinga-app/icinga-standalone.conf | 27 ++------ icinga-app/icinga1.conf | 16 ----- icinga-app/icinga2.conf | 7 -- icinga-app/icinga3.conf | 6 -- icinga/endpoint.cpp | 59 ---------------- icinga/endpoint.h | 10 --- icinga/jsonrpcendpoint.cpp | 8 +-- 19 files changed, 17 insertions(+), 221 deletions(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index fe12717d5..ed98ee86d 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -24,7 +24,11 @@ using namespace icinga; void CheckerComponent::Start(void) { m_Endpoint = boost::make_shared(); - m_Endpoint->RegisterPublication("checker::ServiceStateChange"); + + /* dummy registration so the delegation module knows this is a checker + TODO: figure out a better way for this */ + m_Endpoint->RegisterSubscription("checker"); + EndpointManager::GetInstance()->RegisterEndpoint(m_Endpoint); Service::OnCheckerChanged.connect(bind(&CheckerComponent::CheckerChangedHandler, this, _1)); diff --git a/components/cibsync/cibsynccomponent.cpp b/components/cibsync/cibsynccomponent.cpp index ecd4ebf57..a44a168fb 100644 --- a/components/cibsync/cibsynccomponent.cpp +++ b/components/cibsync/cibsynccomponent.cpp @@ -36,12 +36,8 @@ void CIBSyncComponent::Start(void) DynamicObject::OnUnregistered.connect(boost::bind(&CIBSyncComponent::LocalObjectUnregisteredHandler, this, _1)); DynamicObject::OnTransactionClosing.connect(boost::bind(&CIBSyncComponent::TransactionClosingHandler, this, _1)); - m_Endpoint->RegisterPublication("config::ObjectUpdate"); - m_Endpoint->RegisterPublication("config::ObjectRemoved"); - EndpointManager::GetInstance()->OnNewEndpoint.connect(boost::bind(&CIBSyncComponent::NewEndpointHandler, this, _2)); - m_Endpoint->RegisterPublication("config::FetchObjects"); m_Endpoint->RegisterTopicHandler("config::ObjectUpdate", boost::bind(&CIBSyncComponent::RemoteObjectUpdateHandler, this, _2, _3)); m_Endpoint->RegisterTopicHandler("config::ObjectRemoved", diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp index bc4a053af..560dac591 100644 --- a/components/delegation/delegationcomponent.cpp +++ b/components/delegation/delegationcomponent.cpp @@ -33,7 +33,7 @@ void DelegationComponent::Start(void) bool DelegationComponent::IsEndpointChecker(const Endpoint::Ptr& endpoint) { - return (endpoint->HasPublication("checker::ServiceStateChange")); + return (endpoint->HasSubscription("checker")); } vector DelegationComponent::GetCheckerCandidates(const Service::Ptr& service) const diff --git a/components/demo/democomponent.cpp b/components/demo/democomponent.cpp index 5e7158b23..edeae95c2 100644 --- a/components/demo/democomponent.cpp +++ b/components/demo/democomponent.cpp @@ -29,7 +29,6 @@ void DemoComponent::Start(void) m_Endpoint = boost::make_shared(); m_Endpoint->RegisterTopicHandler("demo::HelloWorld", boost::bind(&DemoComponent::HelloWorldRequestHandler, this, _2, _3)); - m_Endpoint->RegisterPublication("demo::HelloWorld"); EndpointManager::GetInstance()->RegisterEndpoint(m_Endpoint); m_DemoTimer = boost::make_shared(); diff --git a/components/discovery/discoverycomponent.cpp b/components/discovery/discoverycomponent.cpp index a34f1ed82..cdbfddb88 100644 --- a/components/discovery/discoverycomponent.cpp +++ b/components/discovery/discoverycomponent.cpp @@ -28,11 +28,9 @@ void DiscoveryComponent::Start(void) { m_Endpoint = boost::make_shared(); - m_Endpoint->RegisterPublication("discovery::RegisterComponent"); m_Endpoint->RegisterTopicHandler("discovery::RegisterComponent", boost::bind(&DiscoveryComponent::RegisterComponentMessageHandler, this, _2, _3)); - m_Endpoint->RegisterPublication("discovery::NewComponent"); m_Endpoint->RegisterTopicHandler("discovery::NewComponent", boost::bind(&DiscoveryComponent::NewComponentMessageHandler, this, _3)); @@ -101,12 +99,6 @@ void DiscoveryComponent::NewEndpointHandler(const Endpoint::Ptr& endpoint) return; } - /* accept discovery::RegisterComponent messages from any endpoint */ - endpoint->RegisterPublication("discovery::RegisterComponent"); - - /* accept discovery::Welcome messages from any endpoint */ - endpoint->RegisterPublication("discovery::Welcome"); - String identity = endpoint->GetIdentity(); if (identity == EndpointManager::GetInstance()->GetIdentity()) { @@ -156,10 +148,6 @@ void DiscoveryComponent::NewEndpointHandler(const Endpoint::Ptr& endpoint) // register published/subscribed topics for this endpoint ComponentDiscoveryInfo::Ptr info = ic->second; - BOOST_FOREACH(String publication, info->Publications) { - endpoint->RegisterPublication(publication); - } - BOOST_FOREACH(String subscription, info->Subscriptions) { endpoint->RegisterSubscription(subscription); } @@ -180,9 +168,6 @@ void DiscoveryComponent::DiscoveryEndpointHandler(const Endpoint::Ptr& endpoint, for (i = endpoint->BeginSubscriptions(); i != endpoint->EndSubscriptions(); i++) info->Subscriptions.insert(*i); - - for (i = endpoint->BeginPublications(); i != endpoint->EndPublications(); i++) - info->Publications.insert(*i); } /** @@ -295,41 +280,12 @@ void DiscoveryComponent::SendDiscoveryMessage(const String& method, const String params.SetSubscriptions(subscriptions); - Dictionary::Ptr publications = boost::make_shared(); - BOOST_FOREACH(String publication, info->Publications) { - publications->Add(publication); - } - - params.SetPublications(publications); - if (recipient) EndpointManager::GetInstance()->SendUnicastMessage(m_Endpoint, recipient, request); else EndpointManager::GetInstance()->SendMulticastMessage(m_Endpoint, request); } -bool DiscoveryComponent::HasMessagePermission(const Dictionary::Ptr& roles, const String& messageType, const String& message) -{ - if (!roles) - return false; - - Value roleName; - BOOST_FOREACH(tie(tuples::ignore, roleName), roles) { - DynamicObject::Ptr role = DynamicObject::GetObject("Role", roleName); - Dictionary::Ptr permissions = role->Get(messageType); - if (!permissions) - continue; - - Value permission; - BOOST_FOREACH(tie(tuples::ignore, permission), permissions) { - if (Utility::Match(permission, message)) - return true; - } - } - - return false; -} - /** * Processes a discovery message by registering the component in the * discovery component registry. @@ -363,27 +319,13 @@ void DiscoveryComponent::ProcessDiscoveryMessage(const String& identity, const D Endpoint::Ptr endpoint = EndpointManager::GetInstance()->GetEndpointByIdentity(identity); - Dictionary::Ptr publications; - if (message.GetPublications(&publications)) { - Value publication; - BOOST_FOREACH(tie(tuples::ignore, publication), publications) { - if (trusted || HasMessagePermission(roles, "publications", publication)) { - info->Publications.insert(publication); - if (endpoint) - endpoint->RegisterPublication(publication); - } - } - } - Dictionary::Ptr subscriptions; if (message.GetSubscriptions(&subscriptions)) { Value subscription; BOOST_FOREACH(tie(tuples::ignore, subscription), subscriptions) { - if (trusted || HasMessagePermission(roles, "subscriptions", subscription)) { - info->Subscriptions.insert(subscription); - if (endpoint) - endpoint->RegisterSubscription(subscription); - } + info->Subscriptions.insert(subscription); + if (endpoint) + endpoint->RegisterSubscription(subscription); } } @@ -490,7 +432,6 @@ void DiscoveryComponent::DiscoveryTimerHandler(void) /* update LastSeen if we're still connected to this endpoint */ info->LastSeen = now; } else { - /* TODO: figure out whether we actually want to connect to this component */ /* try and reconnect to this component */ try { if (!info->Node.IsEmpty() && !info->Service.IsEmpty()) diff --git a/components/discovery/discoverycomponent.h b/components/discovery/discoverycomponent.h index 629d78b3e..1160a5884 100644 --- a/components/discovery/discoverycomponent.h +++ b/components/discovery/discoverycomponent.h @@ -74,8 +74,6 @@ private: void FinishDiscoverySetup(const Endpoint::Ptr& endpoint); - bool HasMessagePermission(const Dictionary::Ptr& roles, const String& messageType, const String& message); - static const int RegistrationTTL = 300; }; diff --git a/components/discovery/discoverymessage.cpp b/components/discovery/discoverymessage.cpp index 6f22c7bd8..fde9df491 100644 --- a/components/discovery/discoverymessage.cpp +++ b/components/discovery/discoverymessage.cpp @@ -69,12 +69,3 @@ void DiscoveryMessage::SetSubscriptions(const Dictionary::Ptr& value) Set("subscriptions", value); } -bool DiscoveryMessage::GetPublications(Dictionary::Ptr *value) const -{ - return Get("publications", value); -} - -void DiscoveryMessage::SetPublications(const Dictionary::Ptr& value) -{ - Set("publications", value); -} diff --git a/components/discovery/discoverymessage.h b/components/discovery/discoverymessage.h index 9d6379afe..6f984b451 100644 --- a/components/discovery/discoverymessage.h +++ b/components/discovery/discoverymessage.h @@ -43,9 +43,6 @@ public: bool GetSubscriptions(Dictionary::Ptr *value) const; void SetSubscriptions(const Dictionary::Ptr& value); - - bool GetPublications(Dictionary::Ptr *value) const; - void SetPublications(const Dictionary::Ptr& value); }; } diff --git a/configure.ac b/configure.ac index 5dea77e11..4d439c62e 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ AX_CXX_GCC_ABI_DEMANGLE AX_BOOST_BASE AX_BOOST_SIGNALS AX_BOOST_THREAD +AX_BOOST_SYSTEM AX_BOOST_UNIT_TEST_FRAMEWORK AX_CHECK_OPENSSL([], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application])]) AC_CHECK_LIB(ssl, SSL_new) diff --git a/doc/icinga2-config.odt b/doc/icinga2-config.odt index f6243285755f909eb07036141b840c270afc834a..1cba65153ea20facc80d86cf03b3fe055a8b8445 100644 GIT binary patch delta 9508 zcmZvC1yEhh(k<@p?jGDBc(6clmjl5af;$J-pa(d(CJ@|Rg1fuBTX2_`K(h@iRnI6!hR^e_T^JUk#b7*6Ql;Ghy1av;EYNf5*L=TEBbyI`LNqXZWeL>3lC zlsI$y_24#td($$R1nB3da@&nPsDhdLvmHuo;E7y`u=iNG^OF@>L_VK#T7K)*n4)4E zbsS`$~R)0li>DfP7eJZ+TN zJWxTopJ3;x?(wPcxTxl2NdL=&*Sfe3 zllNoWJ4yZb)oi9wA2Tzvvkc~{f41fC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 Tu3&!G4`5zzR2U-nzdZi~71kiG diff --git a/icinga-app/icinga-checker1.conf b/icinga-app/icinga-checker1.conf index b32ccb83a..c7c6f97a5 100644 --- a/icinga-app/icinga-checker1.conf +++ b/icinga-app/icinga-checker1.conf @@ -20,11 +20,5 @@ local object Component "discovery" { local object Endpoint "icinga-c1" { node = "192.168.5.46", service = 7777, - - roles = { "all" } } -local object Role "all" { - publications = { "*" }, - subscriptions = { "*" } -} diff --git a/icinga-app/icinga-checker2.conf b/icinga-app/icinga-checker2.conf index b249de745..70e8f9fc7 100644 --- a/icinga-app/icinga-checker2.conf +++ b/icinga-app/icinga-checker2.conf @@ -14,11 +14,5 @@ local object component "discovery" { local object endpoint "icinga-c1" { node = "192.168.5.46", service = 7777, - - roles = { "all" } } -local object role "all" { - publications = { "*" }, - subscriptions = { "*" } -} diff --git a/icinga-app/icinga-standalone.conf b/icinga-app/icinga-standalone.conf index 897efddfc..a6acc464a 100644 --- a/icinga-app/icinga-standalone.conf +++ b/icinga-app/icinga-standalone.conf @@ -3,7 +3,11 @@ local object Application "icinga" { ca = "ca.crt", node = "192.168.2.235", - service = 7777 + service = 7777, + + macros = { + plugindir = "/usr/local/icinga/libexec" + } } local object Component "discovery" { @@ -22,23 +26,6 @@ local object Component "compat" { } -local object Endpoint "icinga-c2" { - roles = { "all" } -} - -local object Endpoint "icinga-c3" { - roles = { "all" } -} - -local object Endpoint "icinga-c4" { - roles = { "all" } -} - -local object Role "all" { - publications = { "*" }, - subscriptions = { "*" } -} - object Host "localhost" { } @@ -46,10 +33,6 @@ object Host "localhost" { abstract object Service "nagios-service" { methods = { check = "native::NagiosCheck" - }, - - macros = { - plugindir = "/usr/local/icinga/libexec" } } diff --git a/icinga-app/icinga1.conf b/icinga-app/icinga1.conf index 35469dc4c..f24b3c11a 100644 --- a/icinga-app/icinga1.conf +++ b/icinga-app/icinga1.conf @@ -17,19 +17,3 @@ local object Component "discovery" { broker = 1 } -local object Endpoint "icinga-c2" { - roles = { "demo" } -} - -local object Endpoint "icinga-c3" { - roles = { "demo" } -} - -local object Role "broker" { - publications = { "discovery::NewComponent" } -} - -local object Role "demo" { - publications = { "demo::*" }, - subscriptions = { "demo::*" } -} diff --git a/icinga-app/icinga2.conf b/icinga-app/icinga2.conf index 0b0b85532..6dbee780c 100644 --- a/icinga-app/icinga2.conf +++ b/icinga-app/icinga2.conf @@ -22,13 +22,6 @@ local object component "discovery" { local object endpoint "icinga-c3" { node = "192.168.5.46", service = 9999, - - roles = { "all" } -} - -local object role "all" { - publications = { "*" }, - subscriptions = { "*" } } # -------------------------------------------- diff --git a/icinga-app/icinga3.conf b/icinga-app/icinga3.conf index 1793167f8..7e880b11b 100644 --- a/icinga-app/icinga3.conf +++ b/icinga-app/icinga3.conf @@ -19,11 +19,5 @@ local object component "discovery" { local object endpoint "icinga-c2" { node = "192.168.2.235", service = 7777, - - roles = { "all" } } -local object role "all" { - publications = { "*" }, - subscriptions = { "*" } -} diff --git a/icinga/endpoint.cpp b/icinga/endpoint.cpp index d5466e8ad..1209963df 100644 --- a/icinga/endpoint.cpp +++ b/icinga/endpoint.cpp @@ -72,37 +72,6 @@ bool Endpoint::HasSubscription(String topic) const return (m_Subscriptions.find(topic) != m_Subscriptions.end()); } -/** - * Registers a topic publication for this endpoint. - * - * @param topic The name of the topic. - */ -void Endpoint::RegisterPublication(String topic) -{ - m_Publications.insert(topic); -} - -/** - * Removes a topic publication from this endpoint. - * - * @param topic The name of the topic. - */ -void Endpoint::UnregisterPublication(String topic) -{ - m_Publications.erase(topic); -} - -/** - * Checks whether the endpoint has a publication for the specified topic. - * - * @param topic The name of the topic. - * @returns true if the endpoint is publishing this topic, false otherwise. - */ -bool Endpoint::HasPublication(String topic) const -{ - return (m_Publications.find(topic) != m_Publications.end()); -} - /** * Removes all subscriptions for the endpoint. */ @@ -111,14 +80,6 @@ void Endpoint::ClearSubscriptions(void) m_Subscriptions.clear(); } -/** - * Removes all publications for the endpoint. - */ -void Endpoint::ClearPublications(void) -{ - m_Publications.clear(); -} - /** * Returns the beginning of the subscriptions list. * @@ -139,26 +100,6 @@ Endpoint::ConstTopicIterator Endpoint::EndSubscriptions(void) const return m_Subscriptions.end(); } -/** - * Returns the beginning of the publications list. - * - * @returns An iterator that points to the first publication. - */ -Endpoint::ConstTopicIterator Endpoint::BeginPublications(void) const -{ - return m_Publications.begin(); -} - -/** - * Returns the end of the publications list. - * - * @returns An iterator that points past the last publication. - */ -Endpoint::ConstTopicIterator Endpoint::EndPublications(void) const -{ - return m_Publications.end(); -} - /** * Sets whether a welcome message has been received from this endpoint. * diff --git a/icinga/endpoint.h b/icinga/endpoint.h index d853dd61a..f6586bbe3 100644 --- a/icinga/endpoint.h +++ b/icinga/endpoint.h @@ -58,10 +58,6 @@ public: void UnregisterSubscription(String topic); bool HasSubscription(String topic) const; - void RegisterPublication(String topic); - void UnregisterPublication(String topic); - bool HasPublication(String topic) const; - virtual bool IsLocal(void) const = 0; virtual bool IsConnected(void) const = 0; @@ -71,21 +67,15 @@ public: virtual void Stop(void) = 0; void ClearSubscriptions(void); - void ClearPublications(void); ConstTopicIterator BeginSubscriptions(void) const; ConstTopicIterator EndSubscriptions(void) const; - ConstTopicIterator BeginPublications(void) const; - ConstTopicIterator EndPublications(void) const; - boost::signal OnSessionEstablished; private: set m_Subscriptions; /**< The topics this endpoint is subscribed to. */ - set m_Publications; /**< The topics this endpoint is - publishing. */ bool m_ReceivedWelcome; /**< Have we received a welcome message from this endpoint? */ bool m_SentWelcome; /**< Have we sent a welcome message to this diff --git a/icinga/jsonrpcendpoint.cpp b/icinga/jsonrpcendpoint.cpp index f392ccb30..e21215cc5 100644 --- a/icinga/jsonrpcendpoint.cpp +++ b/icinga/jsonrpcendpoint.cpp @@ -96,9 +96,6 @@ void JsonRpcEndpoint::NewMessageHandler(const MessagePart& message) if (!request.GetMethod(&method)) return; - if (!HasPublication(method)) - return; - String id; if (request.GetID(&id)) GetEndpointManager()->SendAnycastMessage(sender, request); @@ -119,10 +116,9 @@ void JsonRpcEndpoint::ClientClosedHandler(void) Logger::Write(LogWarning, "jsonrpc", "Lost connection to endpoint: identity=" + GetIdentity()); - // TODO: _only_ clear non-persistent publications/subscriptions - // unregister ourselves if no persistent publications/subscriptions are left (use a timer for that, once we have a TTL property for the topics) + // TODO: _only_ clear non-persistent subscriptions + // unregister ourselves if no persistent subscriptions are left (use a timer for that, once we have a TTL property for the topics) ClearSubscriptions(); - ClearPublications(); // remove the endpoint if there are no more subscriptions */ if (BeginSubscriptions() == EndSubscriptions()) { -- 2.40.0