From 5f6a9fa7a0e09a2a4874dd3e22afef55033c24b4 Mon Sep 17 00:00:00 2001 From: Hitoshi Mitake Date: Thu, 27 Oct 2016 14:07:30 +0900 Subject: [PATCH] orchestrator: a new option for enabling/disabling orchestration initially --- nmz/orchestrator/orchestrator.go | 1 + nmz/util/config/config.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/nmz/orchestrator/orchestrator.go b/nmz/orchestrator/orchestrator.go index f5b7438..d8b3466 100644 --- a/nmz/orchestrator/orchestrator.go +++ b/nmz/orchestrator/orchestrator.go @@ -124,6 +124,7 @@ func (orc *Orchestrator) Start() { orc.endpointEventCh, orc.controlCh = endpoint.StartAll(orc.endpointActionCh, orc.cfg) orc.policyActionCh = orc.policy.ActionChan() orc.dumbPolicyActionCh = orc.dumbPolicy.ActionChan() + orc.enabled = !orc.cfg.GetBool("skipInitOrchestrator") go orc.eventRoutine() go orc.actionRoutine() go orc.controlRoutine() diff --git a/nmz/util/config/config.go b/nmz/util/config/config.go index aa94a29..07de490 100644 --- a/nmz/util/config/config.go +++ b/nmz/util/config/config.go @@ -94,6 +94,10 @@ func New() Config { "ethernetNFQNumber": 42, "procWatchInterval": time.Second, }) + + // if skipInitOrchestrator is true, orchestrator is disabled at its initialization time + cfg.SetDefault("skipInitOrchestrator", false) + return cfg }