Skip to content

[Bug] Klue looks for non-existent infrastructure_description.json when running with --skip-tracer #8

@Mapalmeira

Description

@Mapalmeira

When running the emulator with the --skip-tracer flag, Klue attempts to read infrastructure_description.json from /tmp instead of the data_path provided via CLI.

Command executed:

./execute-emulation.sh \
  --sim \
  --use-cluster minikube \
  --data-path ../data-example \
  --use-karpenter \
  --nodepool-path ../data-example/nodepools.yaml \
  --skip-tracer

Error thrown:

Traceback (most recent call last):
  File "<dir>/emulador-klue/src/main.py", line 95, in <module>
    main_instance.run_manager()
  File "<dir>/emulador-klue/src/main.py", line 64, in run_manager
    manager = Manager(karpenter=self.karpenter, infrastructure=self.infrastructure, workload=self.workload)
  File "<dir>/emulador-klue/src/manager.py", line 32, in __init__
    self.infrastructure_manager = InfrastructureManager(f"{data_path}/infrastructure_description.json", karpenter, infrastructure)
  File "<dir>/emulador-klue/src/infrastructure/manager.py", line 25, in __init__
    with open(data_path, 'r', encoding="utf-8") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/infrastructure_description.json'

However, infrastructure_description.json does exist inside the directory passed via --data-path.

In src/main.py, the Manager is instantiated without passing data_path:

def run_manager(self):
    manager = Manager(karpenter=self.karpenter, infrastructure=self.infrastructure, workload=self.workload)
    manager.run(

In src/manager.py, the constructor defaults to:

def __init__(self, data_path='/tmp', karpenter=True, infrastructure=None, workload=None):

Therefore, Manager always receives data_path="/tmp".

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