-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
False
-
None
-
False
-
NEW
-
NEW
Every 15 minutes the curator job runs (as created by the OpenShift ElasticSearch Operator, version 5.4.2). In the /tmp/scripts/indexManagement shell script, if an index returns "false" when rollover is checked then some code is run to increment the index number. This code assumes that there are no hyphens in the index name (i.e. assumes "app-001234", not "app-smr-e2e-002243"). The code takes the text after the 1st hyphen (and up to the 2nd if present) as the number (here it would be "001234" in the first example, "smr" in the second) . It then tries to increment that "number", which obviously fails in the second example. When this happens, the script terminates early and doesn't process any remaining indices.
The actual code is at about line 84 of /tmp/scripts/indexManagement
if [ "$responseRollover" == False ] ; then # already in bad state echo "Calculating next write index based on current write index..." indexGeneration="$(echo $writeIndex | cut -d'-' -f2)" writeBase="$(echo $writeIndex | cut -d'-' -f1)" # if we don't strip off the leading 0s it does math wrong... generation="$(echo $indexGeneration | sed 's/^0*//')" # pad the index name again with 0s nextGeneration="$(printf '%06g' $(($generation + 1)))" nextIndex="$writeBase-$nextGeneration" else
- duplicates
-
LOG-2644 [elasticsearch-operator] index rollover cronjob fails on openshift-logging operator
- Closed