2512 Commits

Author SHA1 Message Date
Chandan Kumar (raukadah)
7fcca0cc46 Enable prometheus and node_exporter from devstack-plugin-prometheus
https://opendev.org/openstack/devstack-plugin-prometheus is the new
devstack plugin providing functionality to install/configure
prometheus/node_exporter.

It will replace sg_core devstack plugin in future.

Depends-On: https://review.opendev.org/c/openstack/watcher/+/938893
Depends-On: https://review.opendev.org/c/openstack/devstack-plugin-prometheus/+/940426

Change-Id: Ia75e6597275b36c04cde653c16f7d45ed23bc261
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2025-02-19 08:49:53 -03:00
Takashi Kajinami
5f6fbaea56 Remove unused os-api-ref from test requirements
It is used when building API reference but is not used in any testing.

Change-Id: I6af7c7b110b338acad10eccf42344a338afbc915
2025-02-09 08:14:17 +09:00
Takashi Kajinami
6b81b34b27 Drop import fallback for Python 2
cPickle no longer exists in Python 3 and pickle should be used always.

Change-Id: I5ddedb3e996d9a0679bab38ea94263886274ece4
2025-02-09 08:04:36 +09:00
Zuul
961bbb9460 Merge "Update master for stable/2024.2" 2025-02-06 08:07:22 +00:00
Zuul
d56e8ee65a Merge "X-Project-Name key in test code was duplicated" 2025-02-03 18:29:23 +00:00
Zuul
4527f89d8d Merge "Add support for instance metrics to prometheus datasource" 2025-02-03 13:22:28 +00:00
Zuul
e535177bc0 Merge "Remove ceilometer datasource" 2025-01-29 13:22:46 +00:00
Zuul
022d150d20 Merge "Add prometheus data source for watcher decision engine" 2025-01-24 13:46:32 +00:00
Alfredo Moralejo
136e5d927c Add support for instance metrics to prometheus datasource
In order to support vm_workload_consolidation, workload_balance and
workload_stabilization strategis some instance metrics are required.
This patch is adding support for them.

Implementation is based on a prometheus store populated using sg-core
from ceilometer metrics with Pollster source.

- instance_ram_usage: rely on ceilometer_memory_usage metrics created from
  ceilometer memory.usage meter.
- instance_ram_allocated: rely on the memory value provided by the
  inventory created from nova and placement APIs.
- instance_cpu_usage: rely on ceilometer_cpu metric created from
  ceilometer cpu meter. A max value of 100 is set in the query.
- instance_root_disk_size: rely on the `disk` value provided by the
  inventory created from nova and placement APIs.

A new parameterer `instance_uuid_label` has been added to the prometheus
datasource configuration to identify the label used to store the value of the
OpenStack instance uuid for eache instance metric in prometheus. Default
value is `resource`.

Change-Id: I2f2b56aa002014e511a5e48398ef1da43fc4f5e2
2025-01-23 13:23:04 +01:00
Chandan Kumar (raukadah)
1968334b29 Drop bandit B320 profile to fix tox -e bandit interface
e4da0b351f
drops B320 profile from blacklist. Bandit no longer identify this
profile leading to tox -e bandit failure.

This profile is not listed here
https://bandit.readthedocs.io/en/latest/plugins/index.html#complete-test-plugin-listing.
so dropping it fixes the issue.

Closes-Bug: #2094789

Change-Id: I8543a507757a22b69d9b8fda500910d2246028c4
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2025-01-14 16:05:19 +05:30
Zuul
0b78f31e3a Merge "Add Tempest test for Prometheus integration" 2025-01-10 17:04:02 +00:00
Ronelle Landy
56b8c1211a Add Tempest test for Prometheus integration
This review adds a base job to test Watcher,
via devstack/tempest installation) and the
intreraction with the newly added
Prometheus data source.

Related change:
https://review.opendev.org/c/openstack/watcher/+/934423

Change-Id: Id9d7d2ded1aae160a97a5f0aa0f7048a9c38e87d
2025-01-10 08:50:04 -05:00
m
3f26dc47f2 Add prometheus data source for watcher decision engine
This adds a new data source for the Watcher decision engine that
implements the watcher.decision_engine.datasources.DataSourceBase.

related spec was merged at [1].

Implements: blueprint prometheus-datasource

[1] https://review.opendev.org/c/openstack/watcher-specs/+/933300

Change-Id: I6a70c4acc70a864c418cf347f5f6951cb92ec906
2025-01-10 15:20:37 +02:00
OpenStack Proposal Bot
1b6f723cc3 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2f92bde2f6eb0d479d0b56742c530a747fa64a70
2025-01-10 04:28:40 +00:00
Zuul
d6cb38289e Merge "reno: Update master for unmaintained/2023.1" 2025-01-10 00:25:12 +00:00
Zuul
406be36c45 Merge "reno: Update master for unmaintained/zed" 2025-01-10 00:25:11 +00:00
Zuul
6bb761a803 Merge "reno: Update master for unmaintained/yoga" 2025-01-10 00:25:09 +00:00
Zuul
a169d42b1f Merge "reno: Update master for unmaintained/xena" 2025-01-10 00:25:08 +00:00
Zuul
4827d6e766 Merge "reno: Update master for unmaintained/victoria" 2025-01-10 00:25:07 +00:00
Zuul
2a2db362e3 Merge "Replace deprecated LegacyEngineFacade" 2025-01-10 00:19:56 +00:00
Zuul
32756dc7b4 Merge "Replace deprecated configure_auth_token_middleware" 2025-01-10 00:06:14 +00:00
Zuul
ee447a2281 Merge "Remove default override for config options policy_file" 2025-01-09 23:35:04 +00:00
Zuul
4d8bb57c8d Merge "tox: Drop envdir" 2025-01-09 23:32:26 +00:00
Zuul
70ba13ca6d Merge "Update python versions, drop py3.8" 2024-12-21 01:58:27 +00:00
Takashi Kajinami
da23fdc621 Remove ceilometer datasource
This datasource requires Ceilometer API which was already removed some
years ago. The implementation should have been removed when dependency
on ceilometerclient was removed by [1].

Also remove some job definitions which are not actually used.

[1] 01d74d0a87abe7d89a6ce14ca18c9fc40ae188ef

Change-Id: I29c3865dc1207f1bbbb266e4217cf8888afebfb6
2024-12-16 23:51:27 +09:00
Jiri Podivin
2ab27c0dfe X-Project-Name key in test code was duplicated
Change-Id: Ie4938edd4b606c7b84c09c191508b72b8bc8fa52
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
2024-12-04 14:05:12 +01:00
Zuul
811a704f80 Merge "Update gate jobs as per the 2025.1 cycle testing runtime" 2024-12-02 19:52:04 +00:00
Zuul
99fea33fac Merge "Fix incompatiablity between apscheduler and eventlet" 2024-12-02 19:13:24 +00:00
Zuul
9d37d705e4 Merge "[pre-commit] enforce pre-commit checks in ci" 2024-12-02 18:37:40 +00:00
Douglas Viroel
fbb290b223 Fix create_continuous_audit_with_wrong_interval test assert
"test_create_continuous_audit_with_wrong_interval" is failing
to validate the expected error message when creating a continuous
audit with a wrong interval. The error message is now slightly
different, since "croniter" was bumped to latest version in openstack
requirements[1].

Closes-Bug: #2089866

[1] 868e0ae644

Change-Id: I33029d224577bd1d5124947f1e6150fe2dbc9456
2024-11-29 10:09:14 -03:00
Ghanshyam Mann
c80c940a4f Update gate jobs as per the 2025.1 cycle testing runtime
As per 2025.1 testing runtime[1], we need to test on Ubuntu
Noble (which will be taken care by depends-on tempest and devstack
patches to move base jobs to Noble) and at least single job to run on
Ubuntu Jammy (for smooth upgrade from previous releases).

This commit adds a new job to run on Jammy which can be removed
in future cycle when testing runtime test next version of Ubuntu
as default.

Depends-On: https://review.opendev.org/c/openstack/tempest/+/932156
Depends-On: https://review.opendev.org/c/openstack/watcher/+/933062

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

Change-Id: I1bc11633f4739bc87c7741496a2972ab99c9b08b
2024-11-25 18:27:25 +00:00
Sean Mooney
f07694ba6c Fix incompatiablity between apscheduler and eventlet
The apscheduler background scheduler spawns a native thread
which is not monkey patched which interacts with shared module
level objects like the module level LOG instances and sqlachmey
engine facades.

This is unsafe and leads to mixing patched and unpatched
code in the same thread.

This manifests in 2 ways:
1.) https://paste.opendev.org/show/bGPgfURx1cZYOsgmtDyw/
sqlalchmey calls can fail due to a time.sleep(0) in oslo.db being invoked
using the unpatched time modules in an eventlet greenthrad.
2.) https://paste.opendev.org/show/b5C2Zz4A4BFIGbKLKrQU/
over time that caused the sqlalchmy connection queuepool to fill up preventing
backgound tasks form running like reconsiling audits.

This change adresses this by overloading the background scheduler _main_loop
to monkey patch the main loop if the calling thread was monkey patched.

Closes-Bug: #2086710
Change-Id: I672c183274b0a17cb40d7b5ab8c313197760b5a0
2024-11-25 18:27:18 +00:00
Sean Mooney
9abec18c8b [pre-commit] enforce pre-commit checks in ci
This change moves all style checks to be run via pre-commit.

To enable this in existing ci and preserve the standard developer flow
the tox pep8 target is updated to run all checks via pre-commit.

developers can optionally install pre-commit and/or the pre-commit
commit hook to automatically or manually run the precommit hooks.

Change-Id: I6ee6ed853dbf60339e7bf3da66b2e5914c218f76
2024-11-19 00:43:39 +00:00
Sean Mooney
1f8d06e075 [docs] apply sphinx-lint to docs
This change corrects the detected sphinx-linit issue in the existing
docs and updates the contributor devstack guide to call out
required and advanced.

mostly the changes were simple fixes like replacing the configurable
default rule with explict literal syntax `term` -> ``term``

some inline Note: comments have been promoted to .. note:: blocks
and literal blocks ::  have been promoted to .. code-block:: <language>
directives.

Change-Id: I6320c313d22bf542ad407169e6538dc6acf79901
2024-11-19 00:43:36 +00:00
Takashi Kajinami
29c94c102b Replace deprecated configure_auth_token_middleware
It was deprecated some years ago by [1].

[1] https://review.opendev.org/628651

Change-Id: Id5bb081a745a0698ce0d297c098394bfd1ad6788
2024-11-15 17:36:18 +09:00
3f3e660367 reno: Update master for unmaintained/2023.1
Update the 2023.1 release notes configuration to build from
unmaintained/2023.1.

Change-Id: I99964d16a09d6b24505eda8444f074a38ce4a2d7
2024-11-12 16:44:04 +00:00
Ghanshyam Mann
2eefaeed14 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: I46cc9e05fbc8f6c95c0b2d50093ecfb070a4170f
2024-11-10 21:36:55 -08:00
Sean Mooney
5fadd0de57 [pre-commit] Fix execute and shebang lines
This commit removes the execute bit from several files
and remove the shebang lines from the devstack plugin.

While the devstack plugin is written in bash, it is not an executable
script. The devstack plugin is sourced by devstack as needed,
as such it is not executed in a subshell and the #!/bin/bash
lines are not used even when present.

Change-Id: I82ca22b7a47bf267fe6cf11f3e3519510108c146
2024-11-07 20:12:59 +00:00
Sean Mooney
c5edad2246 [eventlet] Ensure unit tests are monkey patched
This change refactors how watcher manages monkey_patching
modules to achieve 2 goals.

First, we want to ensure the watcher code is tested as it is used
in production. While many tests can run without eventlet,
the existing unit tests depend on eventlet monkey patching
indirectly by importing watcher code that uses eventlet.spawn and
greenthread executors. While that mostly functions today it has
incorrect and inconsistent behaviour on Python 3.9 vs Python 3.12.

Second, the unit tests that test the cmd module were indirectly
monkey patching the test executor during the execution of the tests
as a side effect of importing watcher.cmd. As such the order the tests
execute in and how they are distributed across test workers changed
if the test was monkey-patched or not.

This change makes all tests run with monkey_patching by adding
monkey patching in the watcher/tests/__init__.py
This change also splits the monkey patching from the import
in preparation for an eventual removal of eventlet in a future
release.

Change-Id: I967f3469bd66e69c00863d553bc859343afbb3ff
2024-11-07 19:50:59 +00:00
Sean Mooney
405bb93030 [tox] update tox.ini to enable debugging
This change adds supprot for OS_DEBUG and also configures
default testing timeouts and log capture.

Change-Id: I685fee4081cdee82c508b6d25c534483f2caf09b
2024-11-07 19:50:33 +00:00
Sean Mooney
5f79ab87c7 [pre-commit] fix typos and configure codespell
This chanage enabled codespell in precommit and
fixes the existing typos.

A followup commit will enable this in tox and ci.

Change-Id: I0a11bcd5a88247a48d3437525fc8a3cb3cdd4e58
2024-11-07 19:50:21 +00:00
Zuul
4d5022ab94 Merge "reno: Update master for unmaintained/wallaby" 2024-11-07 18:08:05 +00:00
Martin Kopec
6adaedf696 Update python versions, drop py3.8
The current testing runtime [1] states testing from py3.9
to 3.12. The patch updates setup.cfg to reflect the correct
python versions.

The patch also drops python 3.8 support following [2].

[1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html
[2] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/FOWV4UQZTH4DPDA67QDEROAESYU5Z3LE/

Change-Id: I2d13409c9bfffc866e31af52611a26f6037021cc
2024-11-06 16:00:11 +01:00
f3ff65f233 Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.

Sem-Ver: feature
Change-Id: I84f9b0b1aa9749fee8ac174ae6d15c62a934d641
2024-11-01 13:48:05 +01:00
Takashi Kajinami
b5e45b43b9 Drop unnecessary 'x' bit from doc config file
This file is not actually executable.

Trivial-Fix

Change-Id: I64352c3c5c6bfd5d08aa4cee873016e02d736a2e
2024-10-28 13:13:24 +00:00
Zuul
61afdd3df7 Merge "Update master for stable/2024.1" 2024-10-28 01:16:55 +00:00
Zuul
e8f9e31541 Merge "[pre-commit] Add initial pre-commit config" 2024-10-24 04:23:49 +00:00
Ghanshyam Mann
38288dd9c8 Run watcher-db-manage in grenade testing from venv
grenade install and run everything from virtual env

- https://review.opendev.org/c/openstack/grenade/+/930507

watcher-db-manage in watcher grenade job needs to be run accordingly
and not from system level. Otherwise it will fail with below error
- https://zuul.opendev.org/t/openstack/build/02c3bd4814ea4d0580f7dfd346416425/log/controller/logs/grenade.sh_log.txt

Depends-On: https://review.opendev.org/c/openstack/watcher/+/933062

Change-Id: I73e94222c89c6a12a6006d42637cd194a09005ac
2024-10-23 18:34:43 +00:00
Sean Mooney
9d8b990fd1 [pre-commit] Add initial pre-commit config
This change adds configuration for the pre-commit tool,
follow-up changes will address the remaining issues in a phased
approach to make the reviews simpler.

This is based on the pre-commit config used in nova
with some additional hooks.

Follow-up changes will address the FIXME comments
related to sphinx-lint and codespell, as well as update tox
to enforce these checks in ci.

Change-Id: I87681a19f7fa88366c2b0d310c8b3153aa6a137b
2024-10-22 20:12:53 +01:00
Zuul
0f96f99404 Merge "Convert CRLF to LF" 2024-10-17 03:11:48 +00:00