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

GSS BZ-2120944 Test Large Omap Objects FS Meta Data #9157

Closed
wants to merge 7 commits into from
Closed
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import logging
import pytest


from ocs_ci.ocs import constants
from ocs_ci.framework.pytest_customization.marks import brown_squad
from ocs_ci.ocs.cluster import ceph_health_check
from ocs_ci.framework.testlib import (
ManageTest,
tier2,
bugzilla,
skipif_ocs_version,
)

log = logging.getLogger(__name__)


@brown_squad
@tier2
@bugzilla("2120944")
@skipif_ocs_version("<4.12")
@pytest.mark.polarion_id("OCS-5425")
class TestLargeOmapObjectsFsMetaData(ManageTest):
"""
Test Large Omap Objects FS Meta Data

"""

@pytest.fixture(autouse=True)
def teardown(self, request):
def finalizer():
ceph_health_check(tries=10, delay=30)

request.addfinalizer(finalizer)

def test_large_omap_objects_fs_meta_data(self, pvc_factory, pod_factory):
"""
Test Process:
1.Create pvc with ceph-fs storage class
2.Create NGINX pod
3.Create large number of files under a directory exceeding the mds configuration mds_bal_split_size.
4.Verify ceph status is ok

"""
pvc_obj = pvc_factory(
interface=constants.CEPHFILESYSTEM,
size="20",
)
pod_dict_path = constants.NGINX_POD_YAML
raw_block_pv = False
log.info(
f"Created new pod sc_name={constants.CEPHFILESYSTEM} size=20Gi, "
f"access_mode={constants.ACCESS_MODE_RWX}, volume_mode={constants.VOLUME_MODE_FILESYSTEM}"
)
self.pod_obj = pod_factory(
interface=constants.CEPHFILESYSTEM,
pvc=pvc_obj,
status=constants.STATUS_RUNNING,
pod_dict_path=pod_dict_path,
raw_block_pv=raw_block_pv,
)
log.info(
"Create large number of files under a directory exceeding the mds configuration mds_bal_split_size."
)
cmd = (
"mkdir -p /var/lib/www/html/dir3/.snap; for n in {1..100}; do touch /var/lib/www/html/dir3/file{0..11000}; "
"mkdir -p /var/lib/www/html/dir3/.snap/snap_$n; rm -f /var/lib/www/html/dir3/file{0..11000}; done"
)
self.pod_obj.exec_sh_cmd_on_pod(command=cmd, sh="bash", timeout=20000)
Loading