Skip to content

[Bug] pods_allocation.csv coming out empty #14

@Mapalmeira

Description

@Mapalmeira

When running emulations that use tracer_cluster_autoscaler.py / tracer_karpenter.py / tracer_kwok.py, the method process_and_save_pods_allocation() can produce an empty pods_allocation.csv, leading to pods_and_nodes_map.csv also becoming empty, which causes all initial pods to not enter the emulation.

This happens in the following section of code

        df_pods_allocation = self.df_final[self.df_final['timestamp'] == self.df_final['timestamp'].min()]

        df_pods_allocation = df_pods_allocation[~df_pods_allocation["node"].isin(["unallocated"]) & ~df_pods_allocation["instance_type"].isin(["unallocated"])]

        # Remove nodes that occur in just one timestamp
        node_counts = df_pods_allocation.groupby('node')['timestamp'].nunique()
        nodes_with_single_timestamp = node_counts[node_counts == 1].index.tolist()
        df_pods_allocation = df_pods_allocation[~df_pods_allocation['node'].isin(nodes_with_single_timestamp)]

First, df_final is being filtered down to a single snapshot (the first timestamp). Later, all nodes which appear in only one timestamp are deleted. As every node in df_pods_allocation is within one timestamp (because only the first timestamp was selected), every node gets deleted and df_pods_allocation becomes empty.

Question: why is it necessary to remove the nodes that appear in just one timestamp?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions