Skip to content

Commit

Permalink
fix rollover
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
  • Loading branch information
pavolloffay committed Aug 11, 2021
1 parent dd7664c commit e9b5bdb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/storage/es/esRollover.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ def get_request_session(username, password, tls, ca, cert, key, skipHostVerify):
def get_version(client):
esVersion = os.getenv('ES_VERSION')
if esVersion is None or esVersion == '':
esVersion = client.info()['version']['number'][0]
pingResult = client.info()
if "OpenSearch" in pingResult['tagline'] and pingResult['version']['number'][0] == '1':
print('Detected openSearch Version {}'.format(pingResult['version']))
return 7
esVersion = pingResult['version']['number'][0]
print('Detected ElasticSearch Version {}'.format(esVersion))
esVersion = int(esVersion)
return esVersion
Expand Down

0 comments on commit e9b5bdb

Please sign in to comment.