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

Test noobaa db activitylogs table for unnecessary logs when in default log level #9720

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

mashetty330
Copy link
Contributor

@mashetty330 mashetty330 commented Apr 24, 2024

@mashetty330 mashetty330 self-assigned this Apr 24, 2024
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines label Apr 24, 2024
@mashetty330 mashetty330 marked this pull request as ready for review April 29, 2024 07:01
@mashetty330 mashetty330 requested a review from a team as a code owner April 29, 2024 07:01
@PrasadDesala PrasadDesala added team/e2e E2E team related issues/PRs Customer defects Defects automated aspart of GSS closed loop labels Apr 30, 2024
sync_object_directory(
awscli_pod_session, AWSCLI_TEST_OBJ_DIR, full_objectpath, mcg_obj
)
logger.info("uploaded objects to the bucket")
Copy link
Contributor

Choose a reason for hiding this comment

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

how many objects will it upload?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually im not sure. its everything that is present in the /test_objects directory

), "Object deletion event is being logged in activitylogs table"
logger.info(
"No object upload/deletion info is being updated in the activitylogs table"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no need to check for the DB activitylogs size?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. we only need to make sure that the activity logs doesn't include the updates for simplest operations like object upload/delete when the log level is at default mode. size of the logs can be subjective and there is no parameter to benchmark it.

@tiffanyn108
Copy link
Contributor

I would suggest to upload and delete a large number of objects and check the activitylogs size after the operation to ensure the activitylogs size doesn't grow intensively.

@mashetty330
Copy link
Contributor Author

I would suggest to upload and delete a large number of objects and check the activitylogs size after the operation to ensure the activitylogs size doesn't grow intensively.

I dont think this is needed because the aim of the fix was to eliminate the activity logs pertaining to object upload, delete etc. It doesn't matter how many number of objects you upload.

@sagihirshfeld
Copy link
Contributor

sagihirshfeld commented Jun 11, 2024

Please add a validation run for the new test

Copy link
Member

@keesturam keesturam 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

openshift-ci bot commented Jun 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: keesturam, mashetty330, PrasadDesala

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

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: mashetty-vmj221
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/object/mcg/test_write_to_bucket.py::TestBucketIO::test_nb_db_activity_logs_on_io
Additional Test Params:
OCP VERSION: 4.16
OCS VERSION: 4.16
tested against branch: master

Job PASSED.

@mashetty330 mashetty330 added the Verified Mark when PR was verified and log provided label Jun 25, 2024
@PrasadDesala PrasadDesala merged commit 4821e84 into red-hat-storage:master Jun 26, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer defects Defects automated aspart of GSS closed loop lgtm size/M PR that changes 30-99 lines team/e2e E2E team related issues/PRs Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants