209 Commits

Author SHA1 Message Date
Takashi Kajinami
ab98b1e8b6 Loose lower bound of python-dateutil
Current minimum version is set without any specific reason. Lower down
the version to the one currently used in octavia-tempest-plugin to
validate timestamp fields.

Change-Id: I6b0412ae09bb65c966955dc6586f4b300f367e12
2025-01-20 21:37:15 +09:00
Zuul
a6a89a6d4c Merge "Remove default override for config options policy_file" 2024-11-18 07:50:29 +00:00
Ghanshyam Mann
e71c19732e Remove default override for config options policy_file
olso.policy 4.5.0[1] changed the config options policy_file
default value to 'policy.yaml', which means it is changed
for all the OpenStack services and they do not need to
override the default anymore.

NOTE: There is no change in behaviour here, oslo.policy provides
the same configuration that services have overridden till now.

[1] https://review.opendev.org/c/openstack/releases/+/934012
[2] https://review.opendev.org/c/openstack/requirements/+/934295

Change-Id: Iba548429fefef53d043d42de4d12554d77e4591a
2024-11-10 21:38:03 -08:00
Takashi Kajinami
ca2401aa8d Add note about lower bound of requirements
Since we removed lower-constrants job, the lower bound is no longer
tested. Import the note from the other project to declare that it is
maintained on bast effort basis.

Also add license information to all libraries .

Change-Id: Ia05b31061485e613634b27e96b904ad3ebe8fa33
2024-10-17 11:03:55 +09:00
Zuul
bbea5a8752 Merge "Remove Python 3.8 support" 2024-10-14 14:29:46 +00:00
Ghanshyam Mann
ab00dac26f Keep new RBAC disable by default
oslo.policy has enabled the new RBAC config options
enforce_scope and enforce_new_defaults by default[1][2].

Until Aodh is ready with the new RBAC, we need to continue
disable them by overriding their default values.

NOTE: there is no change in behaviour, aodh continue with the
old RBAC as default.

Needed-By: https://review.opendev.org/c/openstack/requirements/+/925464

[1] https://review.opendev.org/c/openstack/oslo.policy/+/924283
[2] https://review.opendev.org/c/openstack/releases/+/925032

Change-Id: Ifac31d1fc11b44fd6d3d18041f8bacee8287bccf
2024-08-01 12:31:49 -07:00
Takashi Kajinami
88c2fd905a Remove Python 3.8 support
Python 3.8 is no longer part of the tested runtimes for 2024.2[1]
because its EOL is coming soon.

[1] https://governance.openstack.org/tc/reference/runtimes/2024.2.html

Change-Id: I3e9ba41b542ea6309a7415337f60fd37bc9adebc
2024-06-25 11:18:49 +09:00
Zuul
b8347142f8 Merge "Use zoneinfo instead of pytz if available" 2024-06-05 14:10:51 +00:00
Takashi Kajinami
fd87af8719 Replace md5 with oslo version
This follows what was already done in the other projects like [1].

In FIPS mode, md5 is allowed only in non-security contexts. This
change disables the security context in the md5 call to determine
the hash for workload partitioning, because this usage does not
involve any security risks.

[1] 8027d907109b6b3c96623f9793aff752cec8ed12

Change-Id: I7d622a6e7d324a765760819c024295b57990f95c
2024-01-31 08:01:46 +00:00
Takashi Kajinami
6b312d0a5c Use zoneinfo instead of pytz if available
The zoneinfo module was introduced in Python 3.9. We can use that
built-in module instead of the 3rd party library (pytz).

This is based on change I1f88bdadc68bfa726eac1da1c5824c1ed352ad98 in
oslo.utils.

Change-Id: If6aeb6c837d413c9d9a544a80c4c736efc8455fc
2024-01-27 20:26:39 +09:00
Stephen Finucane
6c032153bf setup: Remove unused dependencies
None of oslo.context, debtcollector or testresources are used by aodh.
Remove them, along with the warnings about requirements order that no
longer applies with the "new" dependency resolver introduced in pip
20.3.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I37a1ffe9c9617262eb5e40fc3ad1b02277a11513
2023-11-16 14:52:35 +00:00
Martin Mágr
f932265290 Add Prometheus evaluator
This patch adds threshold evaluator for Prometheus metrics.
Alarms are based on Prometheus query only. The library
python-observabilityclient is used for querying Prometheus.

Co-authored-by: Jaromír Wysoglad <jwysogla@redhat.com>
Depends-On: Ie7477e0b11479449f7f13c7a784737ac70059964
Change-Id: I72e124cca4398b78f7ed12e1db3f66bdbfcb196e
2023-11-07 06:22:28 +00:00
Erno Kuvaja
ab29096236 Revert "Fix docs job"
The actual cause is been solved here
Depends-on: https://review.opendev.org/c/openstack/requirements/+/896195

This reverts commit 2a2958bd6338ed8b98fa165309fa8b44d83ac974.

Change-Id: I29123962edc4b0e1423dbbf1b2705a4692adbf6c
2023-09-22 16:18:15 +01:00
Dmitriy Rabotyagov
800402e7ad Add check-requirements job
This job is maintained by requirements team and ensures that
requirements and constraints have proper format and do not conflict
with guidelines.

Co-Authored-By: Erno Kuvaja <jokke@usr.fi>
Change-Id: I3dd8b1b1826473495725bb8cff2c42c6aa7b35f1
2023-05-10 13:31:18 +01:00
Erno Kuvaja
0782615601 Drop tenacity cap to align with global_requirements
The cap does not seem to be needed anymore.

Change-Id: Iaff14e4b004e8562b41f8c94e40c2ee595884f6e
2023-04-28 11:24:46 +01:00
Takashi Kajinami
6648f6b684 Bump minimum version of gnocchiclient for aggregats API support
The commit 74eadfbd58359b7ebe9e1e40ae6b6ff245146bb8 introduced usage
of aggregates API, which is available since gnocchiclient 6.0.0 .

This change bumps the minimum version to ensure the API is available.

Change-Id: I64a984fe64c8fe69856980df9e28a67f5eb29b58
2022-04-18 12:50:38 +09:00
Zuul
9fa5ad045b Merge "Introduce Guru Meditation Reports into Aodh" 2021-09-29 07:57:26 +00:00
Zuul
85882a3fc2 Merge "Revert "Support Ceilometer API"" 2021-08-26 10:20:15 +00:00
Takashi Kajinami
0416ccec8c Introduce Guru Meditation Reports into Aodh
This change introduces support for Guru Meditation Report(GMR) into
Aodh, using oslo.reportis library.
With this change, each service prints GMR to stderr or file when
the service receives SIGUSR1.

The same was introduced into Cilometer a long ago[1], and this change
is based on the change made in Ceilometer.
 [1] https://review.opendev.org/c/openstack/ceilometer/+/196369

Change-Id: I7f67acd98c2089bb248d3249159719a3979d27e7
2021-08-15 03:23:23 +09:00
Zuul
10383f4d5b Merge "Fix oslo policy DeprecatedRule warnings" 2021-07-14 07:34:12 +00:00
Matthias Runge
7a166e05f7 Replace oslo_utils.fnmatch with fnmatch
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.

SQLAlchemy url is now immutable
Use URL.set to update

Co-authored by: Takashi Kajinami
[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b

Change-Id: I59c4d93a5914b8e14f7ef93bcaff8d1caaf5e75a
2021-07-09 12:47:17 +02:00
Ghanshyam Mann
082f6cf0ae Fix oslo policy DeprecatedRule warnings
Since 3.7.0, oslo policy started the DeprecationWarning[1] if
deprecated_reason and deprecated_since param are not passed
in DeprecatedRule or they are passed in RuleDefault object.

These warnings are logged for every test which increase the
log size and sometime can full the log buffer and fail the
job.

[1] https://github.com/openstack/oslo.policy/blob/3.7.0/oslo_policy/policy.py#L1538

Change-Id: I8b9f0611364f6857b86fc800c89fe403672af975
2021-07-06 16:52:33 +00:00
Matthias Runge
95d616dc90 sqlalchemy is used but not declared
in requirements.

It is used e.g. in
aodh/storage/sqlalchemy/models.py

Change-Id: I3677fddb70b4b2b0452e37a2a512997e7e4b5f0c
2021-05-19 11:15:14 +02:00
Matthias Runge
9cf69d72d2 Cap tenacity < 7.0.0
https://github.com/jd/tenacity/pull/274/files removed code
which was still in use.

Change-Id: Ib7c0be686aaf542a483a426c1966ad067a5fe3eb
2021-03-22 11:43:03 +01:00
Matthias Runge
9b50734bf7 Revert "Support Ceilometer API"
ceilometerclient is deprecated and not supported since 2017.

This reverts commit d32ca244539650aaa2e6e85d438a79600e7cb701.

Change-Id: Id5bac2f317deceefe625d91f0dc91b071a6f8037
2021-03-01 18:21:09 +01:00
Ghanshyam Mann
5e7a0519cf [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ia0fa4ba1fecf2740a291c5a65b906b089c95404d
2020-12-25 16:41:53 +00:00
Zuul
0bac3700b3 Merge "Update requirements to implement secure RBAC" 2020-12-11 08:59:44 +00:00
wangzihao
a2d9f3ce50 Remove six
Remove six.moves Replace the following items with Python 3 style code.

- six.moves.range
- six.moves.xrange
- six.text_type
- six.PY2
- six.PY3
- six.moves.urllib
- six.string_types
- six.iteritems
- six.add_metaclass
- six.moves.map
- six.with_metaclass
- six.iterkeys
- six.itervalues

Change-Id: I469b49772899672c05f869c6870512fddfc6183d
2020-12-04 01:35:57 +00:00
Lance Bragstad
b99761d38f Update requirements to implement secure RBAC
This commit bumps the versions for oslo.policy, oslo.log, and
keystonemiddleware. It also adds a dependency on oslo.context so that we
can re-use context objects to make authorization decisions in
oslo.policy, instead of building authorization information from the
request manually, which is error-prone and redundant.

The versions bumps for these libraries are necessary to provide better
default policies through deprecations and enhanced scope checking.

Change-Id: I1bdecf2e762e2b7652a411efd03210ea51575ada
2020-12-01 15:38:47 +00:00
Hervé Beraud
32e956517b Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I6e47beaf0a5f2e455db5828dd2381d98aba25bd8
2020-05-26 21:45:41 +02:00
Lingxian Kong
d32ca24453 Support Ceilometer API
This patch adds the Ceilometer API support back to Aodh.

Change-Id: I7b3301fd0569e041218196f1d05047ae7a6138e4
2019-11-22 15:38:10 +13:00
Ghanshyam Mann
95c2b51463 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Aodh is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: I12158c5f382f832da50d5be90906ca4a7dd8ccdc
2019-10-30 07:21:50 +00:00
Eyal
c79990e8a3 Update jsonschema according to requirements
Change-Id: I8b0b07bdbe7145fb080e77726e76db5108a2c160
2019-09-10 12:47:35 +03:00
Lingxian Kong
a8285b564d Support Heat auto-healing notifier
The auto-healing notifier works together with loadbalancer_member_health
evaluator.

Presumably, the end user defines a Heat template which contains an
autoscaling group and all the members in the group are joined in an
Octavia load balancer in order to expose service to the outside, so that
when the stack scales up or scales down, Heat makes sure the new members
are joining the load balancer automatically and the old members are
removed.

However, this notifier deals with the situation that when some member
fails, the stack could be recovered by marking the given autoscaling
group member unhealthy, then update Heat stack in place.

Change-Id: I6e92d1fc2125e155bb5068ff2c14fa318b126442
2019-05-16 11:26:13 +12:00
Lingxian Kong
018b7d45fe Add load balancer pool member evaluator
This patch is adding a new evaluator for the alarms of type
'loadbalancer_member_health' which evaluates the alarm by checking
the operating status of the members in a given load balancer pool.

A new config option 'member_creation_time' is introduced in order to
ignore the members in initialization status.

This is the first part of the auto-healing solution.

Change-Id: I57b848e6dc6aa5e79af1c17dbf1a42a9f068f174
2019-04-16 21:15:44 +12:00
akhiljain23
bef0f9bfd0 Add framework for aodh-status upgrade check
This commit adds the functionality of aodh-status CLI for performing
upgrade checks as part of the Stein cycle upgrade-checkers goal.
It only includes a sample check which must be replaced by real checks in
future.

Change-Id: I21e331266ab061a41d0ffe3c179b10f777af44f5
Story: 2003657
Task: 27733
2019-04-10 10:43:37 +00:00
Nagasai Vinaykumar Kapalavai
701e05bb38 Validation Check for 'query' params of alarm type 'event'
Currently an alarm rule is created even though the query is not
adhered to the format.
Now it does a validation check against the input and gives a
http 400 error message.

Closes-Bug: #1467317

Change-Id: Ibfca9c7e4ec0c1b37272fc410df36ff43a3eb3f2
2018-07-13 02:22:56 +00:00
Mehdi Abaakouk
b53d862bb5 Remove ceilometer-api alarm type
This change removes the deprecated 'threshold' alarm type from Aodh.

This also removes the useless ceilometerclient dependency.

Depends-On: Id89130fd8a782dea863c85b37a919fbf0f0897dd
Change-Id: I7ccf930f2ad0316dbda0675a2ec0344e61986022
2018-01-12 21:03:25 +01:00
gordon chung
4f16ed6c34 Revert "Replace jsonutils by ujson"
This reverts commit 17feef6c66c552f3b747fd24e4dc7ec46a526b4f.

ujson isn't necessary required and ubuntu packagers raised concerned.
replace with json

Change-Id: Ia53fc9226ab7a8348bf134b3b3aaf37927398cd3
related-bug: #1737989
2018-01-03 13:39:23 +00:00
Mehdi Abaakouk
607d4e876c don't use last keystonemiddleware
Related-bug: #1737115
Change-Id: Id8368c0091ef8eb6a567ba9036bd11d656bcf8d4
2017-12-12 19:04:57 +01:00
unknown
17feef6c66 Replace jsonutils by ujson
ujson is faster than jsonutils, and we do not need any fancy feature jsonutils
might offer.

This also has the benefit of removing a big dependency on Aodh.

Change-Id: I4773ac55a5aedf4960c4ce611873813922ca01e5
2017-11-01 21:06:20 +08:00
gord chung
3227ae9377 remove gnocchiclient cap
fix remaining usage of recently changed client init interface.
fix req as we don't need it anymore.

Related-Bug: #1714483
Change-Id: I3d7652d294d8082a5ef526d1e51add8056dc3114
2017-09-04 23:30:30 +00:00
gord chung
59355a39ea support new gnocchiclient interface
support for explicitly setting interface/regoin_name was changed in
gnocchiclient 3.1 and remove in gnocchiclient 4.
Closes-Bug: #1714483

Change-Id: I7ef25df606e07c6c235afa286ae83450488cd8e0
2017-09-01 20:23:36 +00:00
Jenkins
b154e48b22 Merge "deprecate threshold rule alarms" 2017-03-10 00:15:19 +00:00
alextricity25
60ad8b0afc Update pbr requirement to match global requirement
This is to match what is in the global-requirements.txt
in the requirements project.

Change-Id: I7ab338a27d22b60719798546206db776c6f70dd9
2017-03-06 16:09:11 -06:00
gord chung
69cfeca362 deprecate threshold rule alarms
ceilometer's api is deprecated, so threshold rule alarms cannot exist
either.

Change-Id: I69a5778edb62843acc36b5366947071745fb43b4
2017-02-28 11:14:02 -05:00
Julien Danjou
d09874ecf2 Add keystoneauth1 in requirements
It's actually imported by aodh.keystone_client directly. Version 2.1 seems to
be the minimal version to have it to work correctly.

Change-Id: Ia6fccd25a08adf46b3c21c49e775d1da5648899f
2017-02-17 18:12:00 +01:00
gord chung
bebe5204fc enable cachetools for gnocchi alarms
- set ttl to an hour since capabilities rarely change (if ever?)
- set cachetools to 1.1.6 since it has some ttl expiration
  improvements and it's a year old so why not.
- i give up trying to disable cache

Change-Id: I1b83ffd32cfd631fc340b068e71f61789388ee73
2017-01-17 00:25:01 +00:00
Julien Danjou
e86f216aa2 Enable healthcheck app to check API status
Change-Id: Ide2aa8613fe4767c9e93e1421dbf7ba7439bb3c7
2016-12-20 17:04:30 +01:00
Boden R
7587ab9bf3 Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project. Tenacity is a fork of retrying, but has improved the
interface and extensibility (see [1] for more details). Our end
goal here is removing the retrying package from our requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- Tenacity uses seconds rather than ms as retrying did.
- Tenacity has different kwargs for the decorator and
Retrying class itself.
- Tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- Tenacity defines 'time.sleep' as a default value for a kwarg.
That said consumers who need to mock patch time.sleep
need to account for this via mocking of time.sleep before
tenacity is imported.
- For retries that check a result, tenacity will raise if the retried
function raises, whereas retrying retried on all exceptions.

This patch updates all usages of retrying with tenacity.
Unit tests will be added where applicable.

Note: This change is not newton critical so projects are welcome
to hold off on committing until post-newton. Ideally this change
will merge by the first part of Ocata so dependant functionality
can land and have time to solidify for Ocata.

[1] https://github.com/jd/tenacity

Co-Authored-By: gordon chung <gord@live.ca>
Closes-Bug: #1635402
Change-Id: Ife452b18709ff34ec48a39bbe5407d69a5b2e3c2
2016-12-14 17:15:58 +00:00