From 349febd88af09ac217f6025cc946508bd69652bc Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Fri, 7 Feb 2020 16:41:29 +0100
Subject: [PATCH] Use InfluxDB default [http]/max-row-limit setting

Since version 1.2.2, InfluxDB uses 0 (unlimited) as default value for
[http]/max-row-limit [1].

Using the default value resolves an issue with the CloudKitty v1 API
returning only 10000 dataframes.

[1] https://docs.influxdata.com/influxdb/v1.7/about_the_project/releasenotes-changelog/#v1-2-2-2017-03-14

Change-Id: I6eb8c1216e3a9295b7d8cb7fbcbb8778ae7caf7e
Closes-Bug: #1862358
(cherry picked from commit fc3492bcb18e74cb76753da46fd4ad0bb098b6bd)
---
 ansible/roles/influxdb/templates/influxdb.conf.j2         | 1 -
 .../remove-influxdb-max-row-limit-f814a310aa6bf6ab.yaml   | 8 ++++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 releasenotes/notes/remove-influxdb-max-row-limit-f814a310aa6bf6ab.yaml

diff --git a/ansible/roles/influxdb/templates/influxdb.conf.j2 b/ansible/roles/influxdb/templates/influxdb.conf.j2
index 799ce1b31f..964bac4333 100644
--- a/ansible/roles/influxdb/templates/influxdb.conf.j2
+++ b/ansible/roles/influxdb/templates/influxdb.conf.j2
@@ -42,7 +42,6 @@ reporting-disabled = true
   write-tracing = false
   pprof-enabled = false
   https-enabled = false
-  max-row-limit = 10000
 [[graphite]]
   enabled = false
 [[opentsdb]]
diff --git a/releasenotes/notes/remove-influxdb-max-row-limit-f814a310aa6bf6ab.yaml b/releasenotes/notes/remove-influxdb-max-row-limit-f814a310aa6bf6ab.yaml
new file mode 100644
index 0000000000..8142922dd8
--- /dev/null
+++ b/releasenotes/notes/remove-influxdb-max-row-limit-f814a310aa6bf6ab.yaml
@@ -0,0 +1,8 @@
+---
+fixes:
+  - |
+    Removes the ``[http]/max-row-limit = 10000`` setting from the default
+    InfluxDB configuration, which resulted in the CloudKitty v1 API returning
+    only 10000 dataframes when using InfluxDB as a storage backend. See `bug
+    1862358 <https://bugs.launchpad.net/kolla-ansible/+bug/1862358>`__ for
+    details.