mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-03-26 05:17:32 +00:00
Resiliency Score krknctl compatibility fixes (#1195)
* added console log of the resiliency score when mode is "detailed" Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * base image krknctl input Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> resiliency score flag Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * removed json print in run_krkn.py Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * unit test fix Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> --------- Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com>
This commit is contained in:
committed by
GitHub
parent
cb368a2f5c
commit
62dadfe25c
@@ -558,5 +558,31 @@
|
||||
"separator": ",",
|
||||
"default": "False",
|
||||
"required": "false"
|
||||
},
|
||||
{
|
||||
"name": "resiliency-score",
|
||||
"short_description": "Enable resiliency score calculation",
|
||||
"description": "The system outputs a detailed resiliency score as a single-line JSON object, facilitating easy aggregation across multiple test scenarios.",
|
||||
"variable": "RESILIENCY_SCORE",
|
||||
"type": "boolean",
|
||||
"required": "false"
|
||||
},
|
||||
{
|
||||
"name": "disable-resiliency-score",
|
||||
"short_description": "Disable resiliency score calculation",
|
||||
"description": "Disable resiliency score calculation",
|
||||
"variable": "DISABLE_RESILIENCY_SCORE",
|
||||
"type": "boolean",
|
||||
"required": "false"
|
||||
},
|
||||
{
|
||||
"name": "resiliency-file",
|
||||
"short_description": "Resiliency Score metrics file",
|
||||
"description": "Custom Resiliency score file",
|
||||
"variable": "RESILIENCY_FILE",
|
||||
"type": "file",
|
||||
"required": "false",
|
||||
"mount_path": "/home/krkn/resiliency-file.yaml"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -320,7 +320,7 @@ class Resiliency:
|
||||
)
|
||||
detailed = self.get_detailed_report()
|
||||
|
||||
if run_mode == "controller":
|
||||
if run_mode == "detailed":
|
||||
# krknctl expects the detailed report on stdout in a special format
|
||||
try:
|
||||
detailed_json = json.dumps(detailed)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
duration: 60
|
||||
duration: 10
|
||||
workers: '' # leave it empty '' node cpu auto-detection
|
||||
hog-type: cpu
|
||||
image: quay.io/krkn-chaos/krkn-hog
|
||||
|
||||
@@ -597,7 +597,7 @@ class TestFinalizeAndSave(unittest.TestCase):
|
||||
prom_cli=self.mock_prom,
|
||||
total_start_time=self.start,
|
||||
total_end_time=self.end,
|
||||
run_mode="controller",
|
||||
run_mode="detailed",
|
||||
)
|
||||
|
||||
mock_print.assert_called()
|
||||
|
||||
Reference in New Issue
Block a user