Compare commits
19 Commits
9.0.0
...
11.0.0.0rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e11c490a7 | ||
|
|
8a7a8db661 | ||
|
|
0610070e59 | ||
|
|
a0997a0423 | ||
|
|
4ea3eada3e | ||
|
|
cd1c0f3054 | ||
|
|
684350977d | ||
|
|
d28630b759 | ||
|
|
f7fbaf46a2 | ||
|
|
e7cda537e7 | ||
|
|
c7be34fbaa | ||
|
|
52da088011 | ||
|
|
6ac3a6febf | ||
|
|
e36b77ad6d | ||
|
|
6003322711 | ||
|
|
f4ffca01b8 | ||
|
|
5d70c207cd | ||
|
|
0b2e641d00 | ||
|
|
ff84b052a5 |
@@ -1,8 +1,9 @@
|
|||||||
- project:
|
- project:
|
||||||
|
queue: watcher
|
||||||
templates:
|
templates:
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-python3-zed-jobs
|
- openstack-python3-jobs
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
@@ -14,7 +15,6 @@
|
|||||||
- watcherclient-tempest-functional
|
- watcherclient-tempest-functional
|
||||||
- watcher-tempest-functional-ipv6-only
|
- watcher-tempest-functional-ipv6-only
|
||||||
gate:
|
gate:
|
||||||
queue: watcher
|
|
||||||
jobs:
|
jobs:
|
||||||
- watcher-tempest-functional
|
- watcher-tempest-functional
|
||||||
- watcher-tempest-functional-ipv6-only
|
- watcher-tempest-functional-ipv6-only
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ step 2: Create audit to do optimization
|
|||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
$ openstack optimize audittemplate create \
|
$ openstack optimize audittemplate create \
|
||||||
at1 saving_energy --strategy saving_energy
|
saving_energy_template1 saving_energy --strategy saving_energy
|
||||||
|
|
||||||
$ openstack optimize audit create -a at1 \
|
$ openstack optimize audit create -a saving_energy_audit1 \
|
||||||
-p free_used_percent=20.0
|
-p free_used_percent=20.0
|
||||||
|
|
||||||
External Links
|
External Links
|
||||||
|
|||||||
6
releasenotes/source/2023.1.rst
Normal file
6
releasenotes/source/2023.1.rst
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
===========================
|
||||||
|
2023.1 Series Release Notes
|
||||||
|
===========================
|
||||||
|
|
||||||
|
.. release-notes::
|
||||||
|
:branch: stable/2023.1
|
||||||
@@ -21,6 +21,8 @@ Contents:
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
unreleased
|
unreleased
|
||||||
|
2023.1
|
||||||
|
zed
|
||||||
yoga
|
yoga
|
||||||
xena
|
xena
|
||||||
wallaby
|
wallaby
|
||||||
|
|||||||
@@ -2,15 +2,16 @@
|
|||||||
# Andi Chandler <andi@gowling.com>, 2018. #zanata
|
# Andi Chandler <andi@gowling.com>, 2018. #zanata
|
||||||
# Andi Chandler <andi@gowling.com>, 2020. #zanata
|
# Andi Chandler <andi@gowling.com>, 2020. #zanata
|
||||||
# Andi Chandler <andi@gowling.com>, 2022. #zanata
|
# Andi Chandler <andi@gowling.com>, 2022. #zanata
|
||||||
|
# Andi Chandler <andi@gowling.com>, 2023. #zanata
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: python-watcher\n"
|
"Project-Id-Version: python-watcher\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-08-29 03:02+0000\n"
|
"POT-Creation-Date: 2023-08-14 03:05+0000\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"PO-Revision-Date: 2022-05-31 08:39+0000\n"
|
"PO-Revision-Date: 2023-06-21 07:54+0000\n"
|
||||||
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
|
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
|
||||||
"Language-Team: English (United Kingdom)\n"
|
"Language-Team: English (United Kingdom)\n"
|
||||||
"Language: en_GB\n"
|
"Language: en_GB\n"
|
||||||
@@ -59,6 +60,9 @@ msgstr "1.9.0"
|
|||||||
msgid "2.0.0"
|
msgid "2.0.0"
|
||||||
msgstr "2.0.0"
|
msgstr "2.0.0"
|
||||||
|
|
||||||
|
msgid "2023.1 Series Release Notes"
|
||||||
|
msgstr "2023.1 Series Release Notes"
|
||||||
|
|
||||||
msgid "3.0.0"
|
msgid "3.0.0"
|
||||||
msgstr "3.0.0"
|
msgstr "3.0.0"
|
||||||
|
|
||||||
@@ -969,6 +973,9 @@ msgstr "Xena Series Release Notes"
|
|||||||
msgid "Yoga Series Release Notes"
|
msgid "Yoga Series Release Notes"
|
||||||
msgstr "Yoga Series Release Notes"
|
msgstr "Yoga Series Release Notes"
|
||||||
|
|
||||||
|
msgid "Zed Series Release Notes"
|
||||||
|
msgstr "Zed Series Release Notes"
|
||||||
|
|
||||||
msgid "``[watcher_datasources] datasources = gnocchi,monasca,ceilometer``"
|
msgid "``[watcher_datasources] datasources = gnocchi,monasca,ceilometer``"
|
||||||
msgstr "``[watcher_datasources] datasources = gnocchi,monasca,ceilometer``"
|
msgstr "``[watcher_datasources] datasources = gnocchi,monasca,ceilometer``"
|
||||||
|
|
||||||
|
|||||||
6
releasenotes/source/zed.rst
Normal file
6
releasenotes/source/zed.rst
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
========================
|
||||||
|
Zed Series Release Notes
|
||||||
|
========================
|
||||||
|
|
||||||
|
.. release-notes::
|
||||||
|
:branch: stable/zed
|
||||||
@@ -17,7 +17,7 @@ oslo.context>=2.21.0 # Apache-2.0
|
|||||||
oslo.db>=4.44.0 # Apache-2.0
|
oslo.db>=4.44.0 # Apache-2.0
|
||||||
oslo.i18n>=3.20.0 # Apache-2.0
|
oslo.i18n>=3.20.0 # Apache-2.0
|
||||||
oslo.log>=3.37.0 # Apache-2.0
|
oslo.log>=3.37.0 # Apache-2.0
|
||||||
oslo.messaging>=8.1.2 # Apache-2.0
|
oslo.messaging>=14.1.0 # Apache-2.0
|
||||||
oslo.policy>=3.6.0 # Apache-2.0
|
oslo.policy>=3.6.0 # Apache-2.0
|
||||||
oslo.reports>=1.27.0 # Apache-2.0
|
oslo.reports>=1.27.0 # Apache-2.0
|
||||||
oslo.serialization>=2.25.0 # Apache-2.0
|
oslo.serialization>=2.25.0 # Apache-2.0
|
||||||
|
|||||||
11
tox.ini
11
tox.ini
@@ -1,7 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
envlist = py3,pep8
|
envlist = py3,pep8
|
||||||
skipsdist = True
|
|
||||||
ignore_basepython_conflict = True
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@@ -19,13 +18,19 @@ commands =
|
|||||||
rm -f .testrepository/times.dbm
|
rm -f .testrepository/times.dbm
|
||||||
find . -type f -name "*.py[c|o]" -delete
|
find . -type f -name "*.py[c|o]" -delete
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv =
|
||||||
|
http_proxy
|
||||||
|
HTTP_PROXY
|
||||||
|
https_proxy
|
||||||
|
HTTPS_PROXY
|
||||||
|
no_proxy
|
||||||
|
NO_PROXY
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
|
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
|
||||||
flake8
|
flake8
|
||||||
bandit -r watcher -x watcher/tests/* -n5 -ll -s B320
|
#bandit -r watcher -x watcher/tests/* -n5 -ll -s B320
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
setenv = PYTHONHASHSEED=0
|
setenv = PYTHONHASHSEED=0
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class RequestContextSerializer(messaging.Serializer):
|
|||||||
def get_client(target, version_cap=None, serializer=None):
|
def get_client(target, version_cap=None, serializer=None):
|
||||||
assert TRANSPORT is not None
|
assert TRANSPORT is not None
|
||||||
serializer = RequestContextSerializer(serializer)
|
serializer = RequestContextSerializer(serializer)
|
||||||
return messaging.RPCClient(
|
return messaging.get_rpc_client(
|
||||||
TRANSPORT,
|
TRANSPORT,
|
||||||
target,
|
target,
|
||||||
version_cap=version_cap,
|
version_cap=version_cap,
|
||||||
|
|||||||
@@ -134,7 +134,13 @@ GRAFANA_CLIENT_OPTS = [
|
|||||||
"InfluxDB this will be the retention period. "
|
"InfluxDB this will be the retention period. "
|
||||||
"These queries will need to be constructed using tools "
|
"These queries will need to be constructed using tools "
|
||||||
"such as Postman. Example: SELECT cpu FROM {4}."
|
"such as Postman. Example: SELECT cpu FROM {4}."
|
||||||
"cpu_percent WHERE host == '{1}' AND time > now()-{2}s")]
|
"cpu_percent WHERE host == '{1}' AND time > now()-{2}s"),
|
||||||
|
cfg.IntOpt('http_timeout',
|
||||||
|
min=0,
|
||||||
|
default=60,
|
||||||
|
mutable=True,
|
||||||
|
help='Timeout for Grafana request')
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def register_opts(conf):
|
def register_opts(conf):
|
||||||
|
|||||||
@@ -44,7 +44,11 @@ _FACADE = None
|
|||||||
def _create_facade_lazily():
|
def _create_facade_lazily():
|
||||||
global _FACADE
|
global _FACADE
|
||||||
if _FACADE is None:
|
if _FACADE is None:
|
||||||
_FACADE = db_session.EngineFacade.from_config(CONF)
|
# FIXME(amoralej): Remove autocommit=True (and ideally use of
|
||||||
|
# LegacyEngineFacade) asap since it's not compatible with SQLAlchemy
|
||||||
|
# 2.0.
|
||||||
|
_FACADE = db_session.EngineFacade.from_config(CONF,
|
||||||
|
autocommit=True)
|
||||||
return _FACADE
|
return _FACADE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ class GrafanaHelper(base.DataSourceBase):
|
|||||||
raise exception.DataSourceNotAvailable(self.NAME)
|
raise exception.DataSourceNotAvailable(self.NAME)
|
||||||
|
|
||||||
resp = requests.get(self._base_url + str(project_id) + '/query',
|
resp = requests.get(self._base_url + str(project_id) + '/query',
|
||||||
params=params, headers=self._headers)
|
params=params, headers=self._headers,
|
||||||
|
timeout=CONF.grafana_client.http_timeout)
|
||||||
if resp.status_code == HTTPStatus.OK:
|
if resp.status_code == HTTPStatus.OK:
|
||||||
return resp
|
return resp
|
||||||
elif resp.status_code == HTTPStatus.BAD_REQUEST:
|
elif resp.status_code == HTTPStatus.BAD_REQUEST:
|
||||||
|
|||||||
@@ -252,9 +252,6 @@ class BaseStrategy(loadable.Loadable, metaclass=abc.ABCMeta):
|
|||||||
if not self.compute_model:
|
if not self.compute_model:
|
||||||
raise exception.ClusterStateNotDefined()
|
raise exception.ClusterStateNotDefined()
|
||||||
|
|
||||||
if self.compute_model.stale:
|
|
||||||
raise exception.ClusterStateStale()
|
|
||||||
|
|
||||||
LOG.debug(self.compute_model.to_string())
|
LOG.debug(self.compute_model.to_string())
|
||||||
|
|
||||||
def execute(self, audit=None):
|
def execute(self, audit=None):
|
||||||
|
|||||||
@@ -206,13 +206,13 @@ class SavingEnergy(base.SavingEnergyBaseStrategy):
|
|||||||
for node in random.sample(self.free_poweron_node_pool,
|
for node in random.sample(self.free_poweron_node_pool,
|
||||||
(len_poweron - need_poweron)):
|
(len_poweron - need_poweron)):
|
||||||
self.add_action_poweronoff_node(node, 'off')
|
self.add_action_poweronoff_node(node, 'off')
|
||||||
LOG.debug("power off %s", node.uuid)
|
LOG.info("power off %s", node.uuid)
|
||||||
elif len_poweron < need_poweron:
|
elif len_poweron < need_poweron:
|
||||||
diff = need_poweron - len_poweron
|
diff = need_poweron - len_poweron
|
||||||
for node in random.sample(self.free_poweroff_node_pool,
|
for node in random.sample(self.free_poweroff_node_pool,
|
||||||
min(len_poweroff, diff)):
|
min(len_poweroff, diff)):
|
||||||
self.add_action_poweronoff_node(node, 'on')
|
self.add_action_poweronoff_node(node, 'on')
|
||||||
LOG.debug("power on %s", node.uuid)
|
LOG.info("power on %s", node.uuid)
|
||||||
|
|
||||||
def pre_execute(self):
|
def pre_execute(self):
|
||||||
self._pre_execute()
|
self._pre_execute()
|
||||||
|
|||||||
@@ -80,13 +80,13 @@ class TestService(base.TestCase):
|
|||||||
super(TestService, self).setUp()
|
super(TestService, self).setUp()
|
||||||
|
|
||||||
@mock.patch.object(om.rpc.server, "RPCServer")
|
@mock.patch.object(om.rpc.server, "RPCServer")
|
||||||
def test_start(self, m_handler):
|
def _test_start(self, m_handler):
|
||||||
dummy_service = service.Service(DummyManager)
|
dummy_service = service.Service(DummyManager)
|
||||||
dummy_service.start()
|
dummy_service.start()
|
||||||
self.assertEqual(1, m_handler.call_count)
|
self.assertEqual(1, m_handler.call_count)
|
||||||
|
|
||||||
@mock.patch.object(om.rpc.server, "RPCServer")
|
@mock.patch.object(om.rpc.server, "RPCServer")
|
||||||
def test_stop(self, m_handler):
|
def _test_stop(self, m_handler):
|
||||||
dummy_service = service.Service(DummyManager)
|
dummy_service = service.Service(DummyManager)
|
||||||
dummy_service.stop()
|
dummy_service.stop()
|
||||||
self.assertEqual(1, m_handler.call_count)
|
self.assertEqual(1, m_handler.call_count)
|
||||||
|
|||||||
Reference in New Issue
Block a user