From 03951300db870cb339dd8736a2acf9c340a8ca98 Mon Sep 17 00:00:00 2001 From: Joe Talerico aka rook Date: Tue, 17 Dec 2024 14:38:36 -0500 Subject: [PATCH] acking the 4.18 and 4.19 issues Acking the current issues we have identified in 4.18 and 4.19. Signed-off-by: Joe Talerico aka rook --- ack/4.18_cluster-density_ack.yaml | 5 +++++ ack/4.18_crd-scale_ack.yaml | 1 + ack/4.18_node-density_ack.yaml | 5 +++++ ack/4.19_cluster-density_ack.yaml | 5 +++++ ack/4.19_crd-scale_ack .yaml | 1 + ack/4.19_node-density_ack.yaml | 1 + orion.py | 2 +- pkg/algorithms/edivisive/edivisive.py | 2 +- pkg/config.py | 11 +++++++++-- 9 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 ack/4.18_cluster-density_ack.yaml create mode 100644 ack/4.18_crd-scale_ack.yaml create mode 100644 ack/4.18_node-density_ack.yaml create mode 100644 ack/4.19_cluster-density_ack.yaml create mode 100644 ack/4.19_crd-scale_ack .yaml create mode 100644 ack/4.19_node-density_ack.yaml diff --git a/ack/4.18_cluster-density_ack.yaml b/ack/4.18_cluster-density_ack.yaml new file mode 100644 index 0000000..ea2bb4d --- /dev/null +++ b/ack/4.18_cluster-density_ack.yaml @@ -0,0 +1,5 @@ +--- +ack: + - uuid: 7f7337aa-cee3-4a36-b154-a7c48ed1fb75 + metric: etcdCPU_avg + reason: "Below 10%" \ No newline at end of file diff --git a/ack/4.18_crd-scale_ack.yaml b/ack/4.18_crd-scale_ack.yaml new file mode 100644 index 0000000..73b314f --- /dev/null +++ b/ack/4.18_crd-scale_ack.yaml @@ -0,0 +1 @@ +--- \ No newline at end of file diff --git a/ack/4.18_node-density_ack.yaml b/ack/4.18_node-density_ack.yaml new file mode 100644 index 0000000..ea2bb4d --- /dev/null +++ b/ack/4.18_node-density_ack.yaml @@ -0,0 +1,5 @@ +--- +ack: + - uuid: 7f7337aa-cee3-4a36-b154-a7c48ed1fb75 + metric: etcdCPU_avg + reason: "Below 10%" \ No newline at end of file diff --git a/ack/4.19_cluster-density_ack.yaml b/ack/4.19_cluster-density_ack.yaml new file mode 100644 index 0000000..0515af1 --- /dev/null +++ b/ack/4.19_cluster-density_ack.yaml @@ -0,0 +1,5 @@ +--- +ack : + - uuid: cfae6e1e-8c47-4628-be52-8705c8c64285 + metric: kubelet_avg + reason: "kube-burner change which increased cpu for kubelet, it was reverted." \ No newline at end of file diff --git a/ack/4.19_crd-scale_ack .yaml b/ack/4.19_crd-scale_ack .yaml new file mode 100644 index 0000000..73b314f --- /dev/null +++ b/ack/4.19_crd-scale_ack .yaml @@ -0,0 +1 @@ +--- \ No newline at end of file diff --git a/ack/4.19_node-density_ack.yaml b/ack/4.19_node-density_ack.yaml new file mode 100644 index 0000000..73b314f --- /dev/null +++ b/ack/4.19_node-density_ack.yaml @@ -0,0 +1 @@ +--- \ No newline at end of file diff --git a/orion.py b/orion.py index d9a21b9..3690213 100644 --- a/orion.py +++ b/orion.py @@ -124,7 +124,7 @@ def cmd_analysis(**kwargs): logger_instance = SingletonLogger(debug=level, name="Orion") logger_instance.info("🏹 Starting Orion in command-line mode") if len(kwargs["ack"]) > 1 : - kwargs["ackMap"] = load_ack(kwargs["ack"]) + kwargs["ackMap"] = load_ack(kwargs["ack"]) kwargs["configMap"] = load_config(kwargs["config"]) output, regression_flag = run(**kwargs) if output is None: diff --git a/pkg/algorithms/edivisive/edivisive.py b/pkg/algorithms/edivisive/edivisive.py index ea2a6aa..224858d 100644 --- a/pkg/algorithms/edivisive/edivisive.py +++ b/pkg/algorithms/edivisive/edivisive.py @@ -22,7 +22,7 @@ def _analyze(self): # Process if we have ack'ed regression ackSet = set() - if len(self.options["ack"]) > 1 : + if len(self.options["ack"]) > 1 and self.options["ackMap"] is not None: for ack in self.options["ackMap"]["ack"]: pos = series.find_by_attribute("uuid",ack["uuid"]) ackSet.add(str(pos[0]) + "_" + ack["metric"]) diff --git a/pkg/config.py b/pkg/config.py index de8a17d..ee7dfc1 100644 --- a/pkg/config.py +++ b/pkg/config.py @@ -55,6 +55,15 @@ def load_config(config: str, parameters: Dict= None) -> Dict[str, Any]: return rendered_config def load_ack(ack: str) -> Dict[str,Any]: + """Loads ack file + + Args: + config (str): path to config file + + Returns: + dict: dictionary of the config file + """ + logger_instance = SingletonLogger.getLogger("Orion") try: with open(ack, "r", encoding="utf-8") as template_file: @@ -67,8 +76,6 @@ def load_ack(ack: str) -> Dict[str,Any]: logger_instance.error("An error occurred: %s", e) sys.exit(1) - required_parameters = get_template_variables(template_content) - rendered_config = yaml.safe_load(template_content) return rendered_config