mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-08-25 09:27:36 +00:00
adding cluster events into file
Functional & Unit Tests / Functional & Unit Tests (push) Failing after 9m30s
Functional & Unit Tests / Generate Coverage Badge (push) Has been skipped
Functional & Unit Tests / Functional & Unit Tests (push) Failing after 9m30s
Functional & Unit Tests / Generate Coverage Badge (push) Has been skipped
Signed-off-by: Paige Patton <prubenda@redhat.com>
This commit is contained in:
committed by
Naga Ravi Chaitanya Elluri
parent
dd4d0d0389
commit
9061ddbb5b
@@ -103,7 +103,7 @@ class AbstractScenarioPlugin(ABC):
|
||||
|
||||
if events_backup:
|
||||
utils.populate_cluster_events(
|
||||
scenario_telemetry,
|
||||
krkn_config,
|
||||
parsed_scenario_config,
|
||||
telemetry.get_lib_kubernetes(),
|
||||
int(scenario_telemetry.start_timestamp),
|
||||
|
||||
@@ -3,10 +3,10 @@ from krkn_lib.k8s import KrknKubernetes
|
||||
from krkn_lib.models.telemetry import ScenarioTelemetry
|
||||
from krkn_lib.telemetry.ocp import KrknTelemetryOpenshift
|
||||
from tzlocal.unix import get_localzone
|
||||
|
||||
import logging
|
||||
|
||||
def populate_cluster_events(
|
||||
scenario_telemetry: ScenarioTelemetry,
|
||||
krkn_config: dict,
|
||||
scenario_config: dict,
|
||||
kubecli: KrknKubernetes,
|
||||
start_timestamp: int,
|
||||
@@ -31,8 +31,12 @@ def populate_cluster_events(
|
||||
namespace=namespace,
|
||||
)
|
||||
)
|
||||
|
||||
scenario_telemetry.set_cluster_events(events)
|
||||
archive_path = krkn_config["telemetry"]["archive_path"]
|
||||
file_path = archive_path + "/events.json"
|
||||
with open(file_path, "w+") as f:
|
||||
f.write("\n".join(str(item) for item in events))
|
||||
logging.info(f'Find cluster events in file {file_path}' )
|
||||
|
||||
|
||||
|
||||
def collect_and_put_ocp_logs(
|
||||
|
||||
Reference in New Issue
Block a user