Skip to content

PDLC NETMA CR exception when CR is not ready

Description

Some times the NETMA CR (netma-topology) makes PDLC cause an exception—possibly when the CR is not fully created.

The logs exception is the following:

Traceback (most recent call last):
  File "/app/server.py", line 57, in <module>
    cluster_sample = get_sample()
                     ^^^^^^^^^^^^
  File "/app/k8s_calling/sample.py", line 364, in get_sample
    cluster_sample = get_netma_information()        # Get the initial information of the sample
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/k8s_calling/sample.py", line 269, in get_netma_information
    sum += int(link["ibw"][:-1])
               ~~~~^^^^^^^
KeyError: 'ibw'

Possible Solution

PDLC should handle this by retrying until it gets the correct CR.

Edited by Panagiotis Karamolegkos