Merge "osprofiler: add patch to make compatible with modern elasticsearch"
This commit is contained in:
commit
0ec9ba4734
|
@ -0,0 +1,42 @@
|
|||
From 5833d9519a31665447250e9c734ca64c065dab64 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Wed, 5 Oct 2022 14:42:54 +0200
|
||||
Subject: [PATCH] Add default port to Elasticsearch connection url
|
||||
|
||||
This change makes it compatible with modern versions of elasticsearch.
|
||||
|
||||
Change-Id: I10b8b57432894e28d5da87eb6d886a053be776f0
|
||||
---
|
||||
osprofiler/drivers/elasticsearch_driver.py | 2 +-
|
||||
test-requirements.txt | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/osprofiler/drivers/elasticsearch_driver.py b/osprofiler/drivers/elasticsearch_driver.py
|
||||
index da9be17..deb42a3 100644
|
||||
--- a/osprofiler/drivers/elasticsearch_driver.py
|
||||
+++ b/osprofiler/drivers/elasticsearch_driver.py
|
||||
@@ -44,7 +44,7 @@ class ElasticsearchDriver(base.Driver):
|
||||
client_url = parser.urlunparse(parser.urlparse(self.connection_str)
|
||||
._replace(scheme="http"))
|
||||
self.conf = conf
|
||||
- self.client = Elasticsearch(client_url)
|
||||
+ self.client = Elasticsearch(client_url + ":9200")
|
||||
self.index_name = index_name
|
||||
self.index_name_error = "osprofiler-notifications-error"
|
||||
|
||||
diff --git a/test-requirements.txt b/test-requirements.txt
|
||||
index 3e1bbd8..52c1446 100644
|
||||
--- a/test-requirements.txt
|
||||
+++ b/test-requirements.txt
|
||||
@@ -13,7 +13,7 @@ bandit>=1.6.0,<1.7.0 # Apache-2.0
|
||||
pymongo!=3.1,>=3.0.2 # Apache-2.0
|
||||
|
||||
# Elasticsearch python client
|
||||
-elasticsearch>=2.0.0,<3.0.0 # Apache-2.0
|
||||
+elasticsearch>=2.0.0,<9.0.0 # Apache-2.0
|
||||
|
||||
# Redis python client
|
||||
redis>=2.10.0 # MIT
|
||||
--
|
||||
2.37.3
|
||||
|
|
@ -11,6 +11,8 @@ License: {{ license('Apache-2.0') }}
|
|||
Group: Development/Languages/Python
|
||||
URL: https://docs.openstack.org/osprofiler
|
||||
Source0: {{ source }}
|
||||
# https://review.opendev.org/c/openstack/osprofiler/+/860412
|
||||
Patch0: 0001-Add-default-port-to-Elasticsearch-connection-url.patch
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: {{ py3('PrettyTable') }}
|
||||
BuildRequires: {{ py3('WebOb') }}
|
||||
|
|
Loading…
Reference in New Issue