@@ -371,16 +371,28 @@ def get_node_status(spy_link):
371
371
372
372
node_log_url = PROW_VIEW_URL + spy_link [8 :] + \
373
373
"/artifacts/" + job_type + "/artifacts/oc_cmds/nodes"
374
+
375
+ pattern = r"(\d+\.\d+)"
376
+ match = re .search (pattern ,spy_link [8 :])
377
+ version = float (match .group (1 ))
378
+ if "upgrade" in spy_link :
379
+ version = version - 0.01
380
+
374
381
375
382
try :
376
383
node_log_response = requests .get (node_log_url , verify = False , timeout = 15 )
377
384
if "NAME" in node_log_response .text :
385
+ if version > 4.15 and job_platform == "libvirt" :
386
+ workers = "compute-"
387
+ else :
388
+ workers = "worker-"
389
+
378
390
response_str = node_log_response .text
379
391
if "NotReady" in response_str :
380
392
return "Some Nodes are in NotReady state"
381
393
elif response_str .count ("control-plane,master" ) != 3 :
382
394
return "Not all master nodes are up and running"
383
- elif ((job_platform == "mce" or "compact" in node_log_url ) and response_str .count ("worker" ) != 3 ) or ((job_platform != "mce" and "compact" not in node_log_url ) and response_str .count ("worker-" ) != 2 ):
395
+ elif ((job_platform == "mce" or "compact" in node_log_url ) and response_str .count ("worker" ) != 3 ) or ((job_platform != "mce" and "compact" not in node_log_url ) and response_str .count (workers ) != 2 ):
384
396
return "Not all worker nodes are up and running"
385
397
else :
386
398
return "Node details not found"
@@ -1098,7 +1110,7 @@ def get_next_page_first_build_date(ci_next_page_spylink,end_date):
1098
1110
def get_brief_job_info (build_list ,prow_ci_name ,zone = None ):
1099
1111
1100
1112
"""
1101
- Gets brief information of all the jobs.
1113
+ Gets brief information of all the jobs
1102
1114
1103
1115
Args:
1104
1116
build_list: list of builds
@@ -1110,7 +1122,7 @@ def get_brief_job_info(build_list,prow_ci_name,zone=None):
1110
1122
1111
1123
if isinstance (build_list ,str ):
1112
1124
print (build_list )
1113
- return 1
1125
+ return []
1114
1126
summary_list = []
1115
1127
1116
1128
i = 0
0 commit comments