From eaafe4db6f221991cbd62a2a65d7209f0a29b69f Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 25 Mar 2018 09:02:36 +0100 Subject: [PATCH 1/2] copy Shortcut property in Report.Copy() This was causing shortcut reports to be delivered as normal reports. This got broken in 0ecb908c229, when Report.BackwardCompatible(), which does a Copy(), was introduced in the publishing path. Fixes #3113. --- report/report.go | 1 + 1 file changed, 1 insertion(+) diff --git a/report/report.go b/report/report.go index 759ad2b47..ac70aade6 100644 --- a/report/report.go +++ b/report/report.go @@ -259,6 +259,7 @@ func (r Report) Copy() Report { DNS: r.DNS.Copy(), Sampling: r.Sampling, Window: r.Window, + Shortcut: r.Shortcut, Plugins: r.Plugins.Copy(), ID: fmt.Sprintf("%d", rand.Int63()), } From 076acdb3193d41b269eadf68caf6c019f6101827 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 25 Mar 2018 09:08:45 +0100 Subject: [PATCH 2/2] send shortcut reports on all container state changes This got broken in cec750049f1. --- probe/docker/registry.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/probe/docker/registry.go b/probe/docker/registry.go index 223b11575..d399da3eb 100644 --- a/probe/docker/registry.go +++ b/probe/docker/registry.go @@ -373,11 +373,9 @@ func (r *registry) updateContainerState(containerID string, intendedState *strin } // Trigger anyone watching for updates - if err != nil { - node := c.GetNode() - for _, f := range r.watchers { - f(node) - } + node := c.GetNode() + for _, f := range r.watchers { + f(node) } // And finally, ensure we gather stats for it