Merge pull request #40209 from sofixa/2016.11

change InfluxDB get_version to expect status code 204
This commit is contained in:
Erik Johnson 2017-03-21 16:42:25 -05:00 committed by GitHub
commit 0b00489eb2

View file

@ -110,7 +110,7 @@ def _get_version(host, port, user, password):
# check the InfluxDB version via the HTTP API
try:
result = requests.get("http://{0}:{1}/ping".format(host, port), auth=(user, password))
if result.status_code == 200 and influxDBVersionHeader in result.headers:
if result.status_code == 204 and influxDBVersionHeader in result.headers:
version = result.headers[influxDBVersionHeader]
except Exception as ex:
log.critical('Failed to query InfluxDB version from HTTP API within InfluxDB returner: {0}'.format(ex))