Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-3011

OCP tag report shows incorrect tag values after resummary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 2022Q3
    • None
    • None

      When we resummarize an OCP source, the OCP tag/cost report shows not only OCP tag values, but also tag values from correlated cloud source.

      This was introduced by the commit c3685a5a2e36c469557d6e7ab1b7b5ed5e20cf71

       

      Steps to reproduce:

      1. ingest correlated ocp and aws sources (e.g., use cost_ocp_on_aws_source_static and cost_aws_source_static fixtures)
      2. http://localhost:8000/api/cost-management/v1/tags/openshift/?limit=100

      you will see 5 enabled ocp tags (app, git, stack, test, volume) and their values (expected)

       "data": [
              {
                  "key": "app",
                  "values": [
                      "nod"
                  ],
                  "enabled": true
              },
              {
                  "key": "git",
                  "values": [
                      "commit"
                  ],
                  "enabled": true
              },
              {
                  "key": "stack",
                  "values": [
                      "overflow"
                  ],
                  "enabled": true
              },
              {
                  "key": "test",
                  "values": [
                      "nice"
                  ],
                  "enabled": true
              },
              {
                  "key": "volume",
                  "values": [
                      "stor_nod"
                  ],
                  "enabled": true
              }
          ]
      } 

      For example for tag:app we only have one value: "nod"

       

      3. for future reference, check ocp on aws tags:

      http://localhost:8000/api/cost-management/v1/tags/openshift/infrastructures/aws/?limit=100

      For example, for tag:app we have four values

      {
                  "key": "app",
                  "values": [
                      "hcs_test",
                      "hcs_test_negative",
                      "nod",
                      "slatt"
                  ],
                  "enabled": true
              }, 

       

      4. Resummarize OCP source

      5. check ocp tags:

      http://localhost:8000/api/cost-management/v1/tags/openshift/?limit=100

      We still have the same 5 tags  (app, git, stack, test, volume) as in step 2

      But now we see not only OCP values, but also AWS tag values - for example for the tag:app, we see "hcs_test", "hcs_test_negative" and "slatt"

       {
                  "key": "app",
                  "values": [
                      "hcs_test",
                      "hcs_test_negative",
                      "nod",
                      "slatt"
                  ],
                  "enabled": true
              }, 

       

            aberglun@redhat.com Andrew Berglund
            rhn-support-esebesto Eva Šebestová
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: