-
Sub-task
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
1
-
False
-
None
-
False
-
-
The cluster count is still aggregating during the monthly resolution. The problem is probably originating here:
https://github.com/project-koku/koku/blob/main/koku/api/report/ocp/capacity/cluster_capacity.py#L190
We probably need to update the `add_count` logic to include the node:
https://github.com/project-koku/koku/blob/main/koku/api/report/ocp/capacity/cluster_capacity.py#L102-L107C13
Then in add_count make sure we only add the count for that node only once for the count_total far, we can also rename it if we want.
def _add_count(self, cluster_mapping_value, usage_start, cluster_key): """Adds the count value to all count resolution variants.""" if cluster_mapping_value: self.count_total += cluster_mapping_value self.count_by_date_cluster[usage_start][cluster_key] += cluster_mapping_value self.count_by_date[usage_start] += cluster_mapping_value self.count_by_cluster[cluster_key] += cluster_mapping_value
However, we will need to update everywhere count_total is being used including:
https://github.com/project-koku/koku/blob/main/koku/api/report/ocp/capacity/cluster_capacity.py#L225