Setting a retention of 1h without altering the shard duration generates an exception
The following code in the Rakefile
unless default['duration'] == '1h' CLIENT.alter_retention_policy(default['name'], db, '1h', 1, true) end
Causes an exception
bundle exec rake rake aborted! InfluxDB::QueryError: retention policy duration must be greater than the shard duration
Apparently, changing the duration doesn't adjust the shardGroupDuration. And on my influx installation, the auto generated policy on the gitlab database had a shardGroupDuration of 168h0m0s
My workaround was to create a default policy, which allowed rake to finish.
CREATE RETENTION POLICY one_hour ON gitlab DURATION 1h REPLICATION 1 DEFAULT
I suggest either fixing the Rakefile to set the shardGroupDuratin, or to add that 1hr policy creation command in gitlab.com/help/administration/monitoring/performance/influxdb_configuration.md