From 00c8026a7e4b2c9b0722a5740183089343a67ce3 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 27 Jan 2016 15:59:17 +0100 Subject: [PATCH 1/7] Bump version to 0.17.0rc1 --- version/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/VERSION b/version/VERSION index 2a0970ca7..aaaf2787d 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -0.16.1 +0.17.0rc1 From 999b1d23e0bcf437ee9450de8f6b1ab6deadcf45 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Sat, 10 Oct 2015 00:49:08 +0200 Subject: [PATCH 2/7] Add tarballs target to build release tarballs. --- Makefile | 7 ++++++- scripts/release_tarballs.sh | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 scripts/release_tarballs.sh diff --git a/Makefile b/Makefile index f76a5480e..d91dc8070 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,10 @@ build: @echo ">> building binaries" @./scripts/build.sh +tarballs: + @echo ">> building release tarballs" + @./scripts/release_tarballs.sh + docker: @docker build -t prometheus:$(shell git rev-parse --short HEAD) . @@ -50,4 +54,5 @@ assets: @go-bindata $(bindata_flags) -pkg ui -o web/ui/bindata.go -ignore '(.*\.map|bootstrap\.js|bootstrap-theme\.css|bootstrap\.css)' web/ui/templates/... web/ui/static/... -.PHONY: all style format build test vet docker assets +.PHONY: all style format build test vet docker assets tarballs + diff --git a/scripts/release_tarballs.sh b/scripts/release_tarballs.sh new file mode 100755 index 000000000..464a63546 --- /dev/null +++ b/scripts/release_tarballs.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# Copyright 2015 The Prometheus Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +version=$(cat version/VERSION) + +for GOOS in "darwin" "freebsd" "linux" "windows"; do + for GOARCH in "amd64" "386"; do + export GOARCH + export GOOS + make build + + tarball_dir="prometheus-${version}.${GOOS}-${GOARCH}" + tarball="${tarball_dir}.tar.gz" + + if [ "$(go env GOOS)" = "windows" ]; then + ext=".exe" + fi + + echo " > $tarball" + mkdir -p "${tarball_dir}" + cp -a "prometheus${ext}" "promtool${ext}" consoles console_libraries "${tarball_dir}" + tar --owner=root --group=root -czf "${tarball}" "${tarball_dir}" + rm -rf "${tarball_dir}" + rm "prometheus${ext}" "promtool${ext}" + done +done + +exit 0 From b040827945d2c22bda62efeb970e6fc64fb26b67 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 27 Jan 2016 16:09:38 +0100 Subject: [PATCH 3/7] Add changelog for 0.17.0 --- CHANGELOG.md | 54 +++++++++++++++++++++++++++++++++++++ scripts/release_tarballs.sh | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b296894e..d7a968008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,57 @@ +## 0.17.0 / 2016-01-27 + +This version no longer works with Alertmanager version 0.4.0 and earlier! +The alerting rule syntax has changed as well but the old syntax is supported +up until version 0.18. + +* [CHANGE] Integrate with Alertmanager version 0.1.0 and higher +* [CHANGE] Degraded storage mode renamed to rushed mode +* [CHANGE] New alerting rule syntax +* [CHANGE] Add label validation on ingestion +* [CHANGE] Regular expression matchers in PromQL are anchored +* [FEATURE] Send alert resolved notifications to Alertmanager +* [FEATURE] Allow millisecond precision in configuration file +* [FEATURE] Support AirBnB's Smartstack Nerve for service discovery +* [ENHANCEMENT] Storage switches less often between regular and rushed mode. +* [ENHANCEMENT] Storage switches into rushed mode if there are too many memory chunks. +* [ENHANCEMENT] Added more storage instrumentation +* [ENHANCEMENT] Improved instrumentation of notification handler +* [BUGFIX] Do not count head chunks as chunks waiting for persistence +* [BUGFIX] Handle OPTIOPNS HTTP requests to the API correctly +* [BUGFIX] Parsing of ranges in PromQL fixed +* [BUGFIX] Correctly validate URL flag paramters + +## 0.16.2 / 2016-01-18 + +* [FEATURE] Multiple authentication options for EC2 discovery added +* [FEATURE] Several meta labels for EC2 discovery added +* [FEATURE] Allow full URLs in static target groups (used e.g. by the `blackbox_exporter`) +* [FEATURE] Add Graphite remote-storage integration +* [FEATURE] Create separate Kubernetes targets for services and their endpoints +* [FEATURE] Add `clamp_{min,max}` functions to PromQL +* [FEATURE] Omitted time parameter in API query defaults to now +* [ENHANCEMENT] Less frequent time series file truncation +* [ENHANCEMENT] Instrument number of manually deleted time series +* [ENHANCEMENT] Ignore lost+found directory during storage version detection +* [CHANGE] Kubernetes `masters` renamed to `api_servers` +* [CHANGE] "Healthy" and "unhealthy" targets are now called "up" and "down" in the web UI +* [CHANGE] Remove undocumented 2nd argument of the `delta` function. + (This is a BREAKING CHANGE for users of the undocumented 2nd argument.) +* [BUGFIX] Return proper HTTP status codes on API errors +* [BUGFIX] Fix Kubernetes authentication configuration +* [BUGFIX] Fix stripped OFFSET from in rule evaluation and display +* [BUGFIX] Do not crash on failing Consul SD initialization +* [BUGFIX] Revert changes to metric auto-completion +* [BUGFIX] Add config overflow validation for TLS configuration +* [BUGFIX] Skip already watched Zookeeper nodes in serverset SD +* [BUGFIX] Don't federate stale samples +* [BUGFIX] Move NaN to end of result for `topk/bottomk/sort/sort_desc/min/max` +* [BUGFIX] Limit extrapolation of `delta/rate/increase` +* [BUGFIX] Fix unhandled error in rule evaluation + +Some changes to the Kubernetes service discovery were integration since +it was released as a beta feature. + ## 0.16.1 / 2015-10-16 * [FEATURE] Add `irate()` function. diff --git a/scripts/release_tarballs.sh b/scripts/release_tarballs.sh index 464a63546..b4b6b68e2 100755 --- a/scripts/release_tarballs.sh +++ b/scripts/release_tarballs.sh @@ -33,7 +33,7 @@ for GOOS in "darwin" "freebsd" "linux" "windows"; do echo " > $tarball" mkdir -p "${tarball_dir}" cp -a "prometheus${ext}" "promtool${ext}" consoles console_libraries "${tarball_dir}" - tar --owner=root --group=root -czf "${tarball}" "${tarball_dir}" + tar -czf "${tarball}" "${tarball_dir}" rm -rf "${tarball_dir}" rm "prometheus${ext}" "promtool${ext}" done From 6583928a04998ce4bb95e594afcec67a9b375d27 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 27 Jan 2016 17:37:40 +0100 Subject: [PATCH 4/7] Fix typos --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a968008..ad9604397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,9 @@ up until version 0.18. * [ENHANCEMENT] Added more storage instrumentation * [ENHANCEMENT] Improved instrumentation of notification handler * [BUGFIX] Do not count head chunks as chunks waiting for persistence -* [BUGFIX] Handle OPTIOPNS HTTP requests to the API correctly +* [BUGFIX] Handle OPTIONS HTTP requests to the API correctly * [BUGFIX] Parsing of ranges in PromQL fixed -* [BUGFIX] Correctly validate URL flag paramters +* [BUGFIX] Correctly validate URL flag parameters ## 0.16.2 / 2016-01-18 From d96dc7a4db5115c8f86f0638f1f7ada030e7a26a Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 28 Jan 2016 11:16:57 +0100 Subject: [PATCH 5/7] Changelog language fixes --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad9604397..d490e8d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ ## 0.17.0 / 2016-01-27 -This version no longer works with Alertmanager version 0.4.0 and earlier! +This version no longer works with Alertmanager 0.4.0 and earlier! The alerting rule syntax has changed as well but the old syntax is supported up until version 0.18. -* [CHANGE] Integrate with Alertmanager version 0.1.0 and higher +* [CHANGE] Integrate with Alertmanager 0.1.0 and higher * [CHANGE] Degraded storage mode renamed to rushed mode * [CHANGE] New alerting rule syntax * [CHANGE] Add label validation on ingestion From 667c2218162f563bc0b9e73774e7669a049c5bf4 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Fri, 5 Feb 2016 13:33:22 +0100 Subject: [PATCH 6/7] Bump version to 0.17.0rc2 --- version/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/VERSION b/version/VERSION index aaaf2787d..4de33f780 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -0.17.0rc1 +0.17.0rc2 From 4d1f7b49b6d7429d88cedee612ff90f60c0f9b73 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Mon, 22 Feb 2016 15:48:39 +0100 Subject: [PATCH 7/7] Fix a race condition in calculatePersistenceUrgencyScore --- storage/local/storage.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/local/storage.go b/storage/local/storage.go index 62453d89d..b10708b20 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -18,6 +18,7 @@ import ( "container/list" "fmt" "math" + "sync" "sync/atomic" "time" @@ -124,6 +125,7 @@ type memorySeriesStorage struct { numChunksToPersist int64 // The number of chunks waiting for persistence. maxChunksToPersist int // If numChunksToPersist reaches this threshold, ingestion will be throttled. rushed bool // Whether the storage is in rushed mode. + rushedMtx sync.Mutex // Protects entering and exiting rushed mode. throttled chan struct{} // This chan is sent to whenever NeedsThrottling() returns true (for logging). fpLocker *fingerprintLocker @@ -1248,6 +1250,9 @@ func (s *memorySeriesStorage) incNumChunksToPersist(by int) { // files should not by synced anymore provided the user has specified the // adaptive sync strategy. func (s *memorySeriesStorage) calculatePersistenceUrgencyScore() float64 { + s.rushedMtx.Lock() + defer s.rushedMtx.Unlock() + var ( chunksToPersist = float64(s.getNumChunksToPersist()) maxChunksToPersist = float64(s.maxChunksToPersist)