Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread_lock added to all PrometheusAPI calls #8553

Merged

Conversation

DanielOsypenko
Copy link
Contributor

@DanielOsypenko DanielOsypenko commented Sep 21, 2023

To avoid concurrency issues when oc cmd called same time when PrometheusAPI constructor logs in via oc we need to pass threading_lock every PrometheusAPI call, otherwise unauthorized user issues and other not expected issues may happen.

Fixes #4621

@DanielOsypenko DanielOsypenko self-assigned this Sep 21, 2023
@DanielOsypenko DanielOsypenko requested review from a team as code owners September 21, 2023 17:39
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines label Sep 21, 2023
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation on existing cluster

Cluster Name: dosypenk-209
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/
Additional Test Params:
OCP VERSION: 4.14
OCS VERSION: 4.14
tested against branch: master

Job UNSTABLE (some or all tests failed).

fbalak
fbalak previously approved these changes Sep 22, 2023
@DanielOsypenko
Copy link
Contributor Author

DanielOsypenko commented Sep 24, 2023

tier1 build vSphere - https://ocs4-jenkins-csb-odf-qe.apps.ocp-c1.prod.psi.redhat.com/job/qe-deploy-ocs-cluster/29691/ --- one threading lock issue with 205 tests ran (193 passed, 43 skipped, 12 failed, 6 errors)
error addressed in the next commit

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation on existing cluster

Cluster Name: dosypenk-249
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/manage/monitoring/test_workload_fixture.py::test_workload_rbd_cephfs_10g
Additional Test Params:
OCP VERSION: 4.14
OCS VERSION: 4.14
tested against branch: master

Job UNSTABLE (some or all tests failed).

@DanielOsypenko
Copy link
Contributor Author

thread_lock added to all PrometheusAPI calls

found that all tests using workload_fio_storageutilization where missing thread_lock. added with last commit

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation on existing cluster

Cluster Name: dosypenk-249
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/manage/monitoring/test_workload_fixture.py::test_workload_rbd_cephfs_10g
Additional Test Params:
OCP VERSION: 4.14
OCS VERSION: 4.14
tested against branch: master

Job PASSED.

ebondare
ebondare previously approved these changes Sep 29, 2023
@DanielOsypenko
Copy link
Contributor Author

@ebenahar @PrasadDesala @jilju @sidhant-agrawal @fbalak @paraggit @prsurve @ramkiperiy
Please check this PR.
PR may resolve some odd issues we get across regression.

fbalak
fbalak previously approved these changes Oct 3, 2023
Copy link
Contributor

@fbalak fbalak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Daniel Osypenko <dosypenk@redhat.com>
Signed-off-by: Daniel Osypenko <dosypenk@redhat.com>
Signed-off-by: Daniel Osypenko <dosypenk@redhat.com>
@openshift-ci openshift-ci bot added the lgtm label Oct 10, 2023
Copy link
Contributor

@sagihirshfeld sagihirshfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@yitzhak12 yitzhak12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@DanielOsypenko DanielOsypenko added the Verified Mark when PR was verified and log provided label Oct 18, 2023
@openshift-ci
Copy link

openshift-ci bot commented Oct 19, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: DanielOsypenko, ebenahar, ebondare, fbalak, sagihirshfeld, sidhant-agrawal, vkathole, yitzhak12

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ebenahar ebenahar merged commit 79f00fc into red-hat-storage:master Oct 19, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/L PR that changes 100-499 lines Squad/Blue Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mitigate unexpected behavior when 2 oc commands are executed at the same time
9 participants