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

RHCEPHQE-17658: [IO Tool Integration] - Including dbench & postgresIO workflow #4406

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

Manimaran-MM
Copy link
Contributor

@Manimaran-MM Manimaran-MM commented Jan 28, 2025

Description

Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs

Steps to configure dbench(from client node):

  1. dnf config-manager --add-repo=https://download.fedoraproject.org/pub/epel/9/Everything/x86_64/
  2. dnf install dbench
  3. Authorise client to use the fs (From Mon nodes)
  4. Run command "dbench 32 -t 1200 -D /mnt/mani1/"
  5. Run 32 clients in parallel for duration of 1200 seconds against the mount path

Steps to configure PostgresIO (from client node):

  1. Create a directory for PostgreSQL data on Client node under the mounted directory
  2. sudo mkdir -p /mnt/mani_fs_1/postgres_data
  3. Provide postgres user access to the folder
  4. chown -R postgres:postgres /mnt/mani_fs_1/postgres_data
  5. chmod 700 /mnt/mani_fs_1/postgres_data
  6. Install postgresql and postgres-server
  7. dnf install postgresql postgresql-server
  8. Point PostgreSQL to use the CephFS directory for its data
  9. sudo -u postgres /usr/bin/initdb -D /mnt/mani_fs_1/postgres_data
  10. Edit the PostgreSQL configuration file to use the CephFS data directory - vi /usr/lib/systemd/system/postgresql.service
  11. Environment=PGDATA=/mnt/mani_fs_1/postgres_data
  12. systemctl daemon-reload
  13. systemctl restart postgresql
  14. Restart will fail. Fix by disabling the enforce option
  15. Since you are running on RHEL, SELinux might be blocking access
  16. sestatus
  17. setenforce 0 (temporarily disable it for testing)
  18. systemctl restart postgresql
  19. If the service starts successfully, set the correct SELinux context for the data directory
  20. chcon -R -t postgresql_db_t /mnt/mani_fs_1
  21. setenforce 1
  22. systemctl restart postgresql
  23. Create a db
  24. sudo -u postgres psql
  25. CREATE DATABASE testdb;
  26. Run the initialization command
  27. pgbench -i --scale=100 -U postgres -d testdb
  28. The default pgbench transaction mix includes SELECT, INSERT, UPDATE, and DELETE operations.
  29. pgbench -c 50 -j 4 -T 300 -U postgres -d testdb
  30. This simulates 50 users performing mixed read/write transactions for 5 minutes

Code Changes - Summary

  • tests/cephfs/cephfs_vol_management/cephfs_vol_mgmt_fs_create_delete_loop.py
    • Include additional subvolume
    • Run dbench and health check in parallel on the newly created subvolume
    • Handle Cleanup
    • Include additional subvolume
    • Run PostgresIO and health check in parallel on the newly created subvolume
    • Handle Cleanup
  • tests/cephfs/cephfs_utilsV1.py
    • Add new entry for dbench and postgresIO in the existing io tools function
    • Include installation of dbench and postgres in the client nodes
    • Add a monitor function to check the health status while running IO parallely

Pass Logs:

click to expand checklist
  • Create a test case in Polarion reviewed and approved.
  • Create a design/automation approach doc. Optional for tests with similar tests already automated.
  • Review the automation design
  • Implement the test script and perform test runs
  • Submit PR for code review and approve
  • Update Polarion Test with Automation script details and update automation fields
  • If automation is part of Close loop, update BZ flag qe-test_coverage “+” and link Polarion test

@Manimaran-MM Manimaran-MM added Ceph-FS Ceph File System test-gap-analysis Test Cases Identified and Automated as part of Test Gaps found from Customer Issues or Upstream Test labels Jan 28, 2025
@Manimaran-MM Manimaran-MM self-assigned this Jan 28, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 28, 2025

@Manimaran-MM: This pull request references RHCEPHQE-17658 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "odf-4.18" version, but no target version was set.

In response to this:

Description

Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs

Steps to configure dbench(from client node):

  1. dnf config-manager --add-repo=https://download.fedoraproject.org/pub/epel/9/Everything/x86_64/
  2. dnf install dbench
  3. Authorise client to use the fs (From Mon nodes)
  4. Run command "dbench 32 -t 1200 -D /mnt/mani1/"
  5. Run 32 clients in parallel for duration of 1200 seconds against the mount path

Code Changes - Summary

  • tests/cephfs/cephfs_vol_management/cephfs_vol_mgmt_fs_create_delete_loop.py
    • Include additional subvolume
    • Run dbench and health check in parallel on the newly created subvolume
    • Handle Cleanup
  • tests/cephfs/cephfs_utilsV1.py
    • Add new entry for dbench in the existing io tools function
    • Include installation of dbench and postgres in the client nodes
    • Add a monitor function to check the health status while running IO parallely

Pass Logs:

click to expand checklist
  • Create a test case in Polarion reviewed and approved.
  • Create a design/automation approach doc. Optional for tests with similar tests already automated.
  • Review the automation design
  • Implement the test script and perform test runs
  • Submit PR for code review and approve
  • Update Polarion Test with Automation script details and update automation fields
  • If automation is part of Close loop, update BZ flag qe-test_coverage “+” and link Polarion test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@@ -202,6 +208,58 @@ def run(ceph_cluster, **kw):
long_running=True,
)

# Mounting Subvolume4 on Kernel - Run dbench
log.info(f"Mount subvolume {subvolume_name}_4 on Kernel Client")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add support to run dbench on fuse mounts too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added for dbench. For PosgresIO, not able to include FUSE mount. Need some more time to check on that

sudo=True,
cmd=(
"dnf config-manager "
"--add-repo=https://download.fedoraproject.org/pub/epel/9/Everything/x86_64/"
Copy link
Contributor

Choose a reason for hiding this comment

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

the repo file is specific to rhel-9, I think we need to check for the rhel versions and then replace 8 or 9 depending on the version installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Manimaran-MM Manimaran-MM changed the title RHCEPHQE-17658: [IO Tool Integration] - Including dbench workflow RHCEPHQE-17658: [IO Tool Integration] - Including dbench & postgresIO workflow Jan 29, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 29, 2025

@Manimaran-MM: This pull request references RHCEPHQE-17658 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "odf-4.18" version, but no target version was set.

In response to this:

Description

Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs

Steps to configure dbench(from client node):

  1. dnf config-manager --add-repo=https://download.fedoraproject.org/pub/epel/9/Everything/x86_64/
  2. dnf install dbench
  3. Authorise client to use the fs (From Mon nodes)
  4. Run command "dbench 32 -t 1200 -D /mnt/mani1/"
  5. Run 32 clients in parallel for duration of 1200 seconds against the mount path

Steps to configure PostgresIO (from client node):

  1. Create a directory for PostgreSQL data on Client node under the mounted directory
  2. sudo mkdir -p /mnt/mani_fs_1/postgres_data
  3. Provide postgres user access to the folder
  4. chown -R postgres:postgres /mnt/mani_fs_1/postgres_data
  5. chmod 700 /mnt/mani_fs_1/postgres_data
  6. Install postgresql and postgres-server
  7. dnf install postgresql postgresql-server
  8. Point PostgreSQL to use the CephFS directory for its data
  9. sudo -u postgres /usr/bin/initdb -D /mnt/mani_fs_1/postgres_data
  10. Edit the PostgreSQL configuration file to use the CephFS data directory - vi /usr/lib/systemd/system/postgresql.service
  11. Environment=PGDATA=/mnt/mani_fs_1/postgres_data
  12. systemctl daemon-reload
  13. systemctl restart postgresql
  14. Restart will fail. Fix by disabling the enforce option
  15. Since you are running on RHEL, SELinux might be blocking access
  16. sestatus
  17. setenforce 0 (temporarily disable it for testing)
  18. systemctl restart postgresql
  19. If the service starts successfully, set the correct SELinux context for the data directory
  20. chcon -R -t postgresql_db_t /mnt/mani_fs_1
  21. setenforce 1
  22. systemctl restart postgresql
  23. Create a db
  24. sudo -u postgres psql
  25. CREATE DATABASE testdb;
  26. Run the initialization command
  27. pgbench -i --scale=100 -U postgres -d testdb
  28. The default pgbench transaction mix includes SELECT, INSERT, UPDATE, and DELETE operations.
  29. pgbench -c 50 -j 4 -T 300 -U postgres -d testdb
  30. This simulates 50 users performing mixed read/write transactions for 5 minutes

Code Changes - Summary

  • tests/cephfs/cephfs_vol_management/cephfs_vol_mgmt_fs_create_delete_loop.py
    • Include additional subvolume
    • Run dbench and health check in parallel on the newly created subvolume
    • Handle Cleanup
    • Include additional subvolume
    • Run PostgresIO and health check in parallel on the newly created subvolume
    • Handle Cleanup
  • tests/cephfs/cephfs_utilsV1.py
    • Add new entry for dbench and postgresIO in the existing io tools function
    • Include installation of dbench and postgres in the client nodes
    • Add a monitor function to check the health status while running IO parallely

Pass Logs:

click to expand checklist
  • Create a test case in Polarion reviewed and approved.
  • Create a design/automation approach doc. Optional for tests with similar tests already automated.
  • Review the automation design
  • Implement the test script and perform test runs
  • Submit PR for code review and approve
  • Update Polarion Test with Automation script details and update automation fields
  • If automation is part of Close loop, update BZ flag qe-test_coverage “+” and link Polarion test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

mergify bot commented Jan 29, 2025

"This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes?"

@Manimaran-MM Manimaran-MM marked this pull request as draft January 29, 2025 10:44
@Manimaran-MM Manimaran-MM force-pushed the RHCEPHQE-17658 branch 2 times, most recently from 68a1797 to 3601117 Compare January 29, 2025 10:54
Signed-off-by: Manimaran M <[email protected]>
Signed-off-by: Manimaran M <[email protected]>
Signed-off-by: Manimaran M <[email protected]>
Copy link
Contributor

@neha-gangadhar neha-gangadhar left a comment

Choose a reason for hiding this comment

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

Approved

@openshift-ci openshift-ci bot added the lgtm Add this label when the PR is good to be merged label Jan 30, 2025
Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Manimaran-MM, neha-gangadhar

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

@mergify mergify bot merged commit 60b08ca into red-hat-storage:main Jan 30, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ceph-FS Ceph File System lgtm Add this label when the PR is good to be merged test-gap-analysis Test Cases Identified and Automated as part of Test Gaps found from Customer Issues or Upstream Test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants