red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
109 stars 166 forks source link

test_validate_ceph_config_values_in_rook_config_override fails because of incomplete expectations of default values for 4.15 #9503

Open suchita-g opened 5 months ago

suchita-g commented 5 months ago

https://reportportal-ocs4.apps.ocp-c1.prod.psi.redhat.com/ui/#ocs/launches/632/19266/935819/936088/log For 4.15 check the ceph default values and update ocs-ci with expected value

self = <tests.functional.z_cluster.test_ceph_default_values_check.TestCephDefaultValuesCheck object at 0x7f347200a580>

@tier1 @runs_on_provider @pytest.mark.skipif( config.DEPLOYMENT.get("ceph_debug"), reason="Ceph was configured with customized values by ocs-ci so there is point in validating its config values", ) def test_validate_ceph_config_values_in_rook_config_override(self): """ Test case for comparing the cluster's config values of Ceph, set by ceph-config-override configMap, with the static set of configuration saved in ocs-ci

"""
cm_obj = OCP(
    kind="configmap",
    namespace=config.ENV_DATA["cluster_namespace"],
    resource_name=constants.ROOK_CONFIG_OVERRIDE_CONFIGMAP,
)
config_data = cm_obj.get()["data"]["config"]
config_data = config_data.split("\n")
log.info(
    "Validating that the Ceph values, configured by ceph-config-override "
    "confiMap, match the ones stored in ocs-ci"
)
ocs_version = version.get_semantic_ocs_version_from_config()

if ocs_version == version.VERSION_4_8:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_48.split("\n")
elif ocs_version == version.VERSION_4_9:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_49.split("\n")
elif ocs_version == version.VERSION_4_10:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_410.split("\n")
elif ocs_version == version.VERSION_4_11:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_411.split("\n")
elif ocs_version == version.VERSION_4_12 or ocs_version == version.VERSION_4_13:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_412.split("\n")
elif ocs_version >= version.VERSION_4_14:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES_414.split("\n")
else:
    stored_values = constants.ROOK_CEPH_CONFIG_VALUES.split("\n")
log.info(f"OCS version is {ocs_version}")
log.info(f"Stored values are {stored_values}")

assert collections.Counter(config_data) == collections.Counter(stored_values), ( f"The Ceph config, set by {constants.ROOK_CONFIG_OVERRIDE_CONFIGMAP} " f"is different than the expected. Please inform OCS-QE about this discrepancy. " f"The expected values are:\n{stored_values}\n" f"The cluster's Ceph values are:{config_data}" ) E AssertionError: The Ceph config, set by rook-config-override is different than the expected. Please inform OCS-QE about this discrepancy. The expected values are: E ['', '[global]', 'bdev_flock_retry = 20', 'mon_osd_full_ratio = .85', 'mon_osd_backfillfull_ratio = .8', 'mon_osd_nearfull_ratio = .75', 'mon_max_pg_per_osd = 600', 'mon_pg_warn_max_object_skew = 0', 'mon_data_avail_warn = 15', '[osd]', 'osd_memory_target_cgroup_limit_ratio = 0.8', 'bluestore_prefer_deferred_size_hdd = 0', ''] E The cluster's Ceph values are:['', '[global]', 'bdev_flock_retry = 20', 'mon_osd_full_ratio = .85', 'mon_osd_backfillfull_ratio = .8', 'mon_osd_nearfull_ratio = .75', 'mon_max_pg_per_osd = 600', 'mon_pg_warn_max_object_skew = 0', 'mon_data_avail_warn = 15', 'mon_warn_on_pool_no_redundancy = false', 'bluestore_prefer_deferred_size_hdd = 0', '[osd]', 'osd_memory_target_cgroup_limit_ratio = 0.8', ''] E assert Counter({'': ...io = 0.8': 1}) == Counter({'': ..._hdd = 0': 1}) E Omitting 12 identical items, use -vv to show E Left contains 1 more item: E {'mon_warn_on_pool_no_redundancy = false': 1} E Full diff: E Counter({'': 2, E '[global]': 1, E 'bdev_flock_retry = 20': 1, E 'mon_osd_full_ratio = .85': 1, E 'mon_osd_backfillfull_ratio = .8': 1, E 'mon_osd_nearfull_ratio = .75': 1, E 'mon_max_pg_per_osd = 600': 1, E 'mon_pg_warn_max_object_skew = 0': 1, E 'mon_data_avail_warn = 15': 1, E + 'mon_warn_on_pool_no_redundancy = false': 1, E + 'bluestore_prefer_deferred_size_hdd = 0': 1, E '[osd]': 1, E - 'osd_memory_target_cgroup_limit_ratio = 0.8': 1, E + 'osd_memory_target_cgroup_limit_ratio = 0.8': 1}, E ? + E - 'bluestore_prefer_deferred_size_hdd = 0': 1}, E )

tests/functional/z_cluster/test_ceph_default_values_check.py:141: AssertionError

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.

abdulkandathil commented 1 month ago

This test is failing on 4.16 as well..

pintojoy commented 1 month ago

Closed for 4.16 as part of https://github.com/red-hat-storage/ocs-ci/pull/10043

ebenahar commented 2 weeks ago

@AviadP is the issue still relevant? Please update

ebenahar commented 2 weeks ago

@AviadP Looks like https://github.com/red-hat-storage/ocs-ci/pull/10043 required a cherry pick to release-4.15 branch