diff --git a/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py b/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py index ed6ee75b..c5fab51e 100644 --- a/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py +++ b/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py @@ -75,6 +75,7 @@ def collect_cluster_metadata(self, chaos_telemetry: ChaosRunTelemetry): chaos_telemetry.network_plugins = ( self.__ocpcli.get_cluster_network_plugins() ) + vm_number = self.get_vm_number() if vm_number > 0: chaos_telemetry.kubernetes_objects_count[ @@ -254,6 +255,7 @@ def get_vm_number(self) -> int: json_obj = ast.literal_eval(data[0]) return len(json_obj["items"]) - except Exception as e: - logging.error(f"failed to parse virtualmachines API: {e}") + except Exception: + logging.info("failed to parse virtualmachines API") return 0 + return 0