Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-3165 Attribute Azure node attached storage to OpenShift Projects
  3. COST-5242

QE - full smokes regressions: Azure SQL generators are uncorrelated using non-csi drivers in openshift volumes

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • 2024-Jul-19
    • None
    • None
    • None
    • 1
    • False
    • None
    • False
    • COST-5108 - Attribute node attached storage to OpenShift Projects

      While investigating regressions running full smokes locally  with the unattributed storage
      branch, we catched a regression likely caused by the resource matching

      Looks like Azure SQL generators are not correlated with OCP clusters anymore
      this genetors added their costs by using the special tag keys (openshift_node: node_name. openshift_project: project name)

      Reproducer:

      pull the MR: plopezpe/raw_calc_claimed_volume

      the ocp on azure multisources have been added the blanck attributes in OCP static files

      Enable the unattributed storage feature in unleash

      run the test:

      ENV_FOR_DYNACONF=local iqe tests plugin cost_management -k "test_api_ocp_on_azure_cost_negative_filtering_tags(" --pdb -raA

      wait for initial ingest and see the test fail because an specific API call has no data

      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-node] - AssertionError: The exclude cost is zero or less than the full cost
      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-project] - AssertionError: The exclude cost is zero or less than the full cost
      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-cluster] - AssertionError: The exclude cost is zero or less than the full cost
      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-services] - AssertionError: The exclude cost is zero or less than the full cost
      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-account] - AssertionError: The exclude cost is zero or less than the full cost
      FAILED tests/rest_api/v1/test__ocp_on_azure_cost_reports.py::test_api_ocp_on_azure_cost_negative_filtering_tags[exclude-tag:application-group_by-region] - AssertionError: The exclude cost is zero or less than the full cost

      We can see that the cause is that the SQL generators are not adding their costs to the path
      /reports/openshift/infrastructures/azure/storage
      when we are using non-csi drivers

       
      You can check that by using tags attached to such generators in clusters romeo, sierra, tango

      http://localhost:8000/api/cost-management/v1/reports/openshift/infrastructures/azure/costs/?group_by[tag:environment]=bravo2

       

      http://localhost:8000/api/cost-management/v1/reports/openshift/infrastructures/azure/costs/?group_by[tag:application]=b2

      this issue only happens in "old" way of disk storage provision, using black nise attributed

      I tested this using different special tags (openshift node, instead of project) and is still not working

      BUt adding a SQL generator to test_cost_ocp_on_azure_cluster azure file it does work

      http://localhost:8000/api/cost-management/v1/reports/openshift/infrastructures/azure/costs/?group_by[tag:environment]=bravo

       

              myersco Cody Myers
              rh-ee-plopezpe Pedro Lopez Perez
              Pedro Lopez Perez Pedro Lopez Perez
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: