From a731a43302a0525affd3bd1253d901ad99786453 Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Fri, 3 Nov 2017 12:59:04 +0100 Subject: [PATCH 1/2] Guard against tags being nil in EC2 discovery Fixes #3001 --- discovery/ec2/ec2.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discovery/ec2/ec2.go b/discovery/ec2/ec2.go index b96cdc449..902c67d7b 100644 --- a/discovery/ec2/ec2.go +++ b/discovery/ec2/ec2.go @@ -200,6 +200,9 @@ func (d *Discovery) refresh() (tg *config.TargetGroup, err error) { } for _, t := range inst.Tags { + if t == nil || t.Key == nil || t.Value == nil { + continue + } name := strutil.SanitizeLabelName(*t.Key) labels[ec2LabelTag+model.LabelName(name)] = model.LabelValue(*t.Value) } From d7e9cca287966a80cb070a6a0975b57275a1dba2 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Sat, 4 Nov 2017 11:49:35 +0100 Subject: [PATCH 2/2] Cut 1.8.2 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fd50286..264756d2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.2 / 2017-11-04 + +* [BUGFIX] EC2 service discovery: Do not crash if tags are empty. + ## 1.8.1 / 2017-10-19 * [BUGFIX] Correctly handle external labels on remote read endpoint diff --git a/VERSION b/VERSION index a8fdfda1c..53adb84c8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.1 +1.8.2