red-hat-storage / ocs-ci

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

Update noobaa tests/util functions to support external postgresql db #9487

Closed petr-balogh closed 3 months ago

petr-balogh commented 8 months ago

After merge of this PR: https://github.com/red-hat-storage/ocs-ci/pull/9360

I have noticed that there might be several problematic places where we trying to do something with DB Pod.:

git grep NOOBAA_DB_LABEL_47_AND_ABOVE
ocs_ci/helpers/helpers.py:        noobaa_label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE
ocs_ci/ocs/constants.py:NOOBAA_DB_LABEL_47_AND_ABOVE = "noobaa-db=postgres"
ocs_ci/ocs/resources/pod.py:        label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
ocs_ci/ocs/resources/pod.py:            constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
ocs_ci/ocs/resources/pod.py:            nb_pod_labels.remove(constants.NOOBAA_DB_LABEL_47_AND_ABOVE)
ocs_ci/ocs/resources/storage_cluster.py:        else constants.NOOBAA_DB_LABEL_47_AND_ABOVE
ocs_ci/ocs/resources/storage_cluster.py:        constants.NOOBAA_DB_LABEL_47_AND_ABOVE: 1,
ocs_ci/ocs/resources/storage_cluster.py:        del resources_dict[constants.NOOBAA_DB_LABEL_47_AND_ABOVE]
ocs_ci/ocs/utils.py:        else constants.NOOBAA_DB_LABEL_47_AND_ABOVE
ocs_ci/utility/utils.py:            label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
tests/cross_functional/conftest.py:                label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
tests/functional/object/mcg/test_bucket_replication.py:                    label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
tests/functional/object/mcg/test_host_node_failure.py:        constants.NOOBAA_DB_STATEFULSET: constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
tests/functional/object/mcg/test_mcg_resources_disruptions.py:        else constants.NOOBAA_DB_LABEL_47_AND_ABOVE
tests/functional/object/mcg/test_object_versioning.py:            label=constants.NOOBAA_DB_LABEL_47_AND_ABOVE,
tests/functional/z_cluster/test_scc.py:            constants.NOOBAA_DB_LABEL_47_AND_ABOVE,

So someone have to take a look and update the function to not use DB Pod but rather directly use DB commands probably in postgres which should be probably implemented under this new module: ocs_ci/utility/pgsql.py

github-actions[bot] commented 5 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.

github-actions[bot] commented 3 months ago

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.