dbca-utils 3.0.0__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/PKG-INFO +1 -1
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/pyproject.toml +1 -1
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/healthcheck/healthcheck.py +13 -10
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/LICENSE +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/README.md +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/__init__.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/apps.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/healthcheck/__init__.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/healthcheck/urls.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/middleware.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/models.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/src/dbca_utils/utils.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/__init__.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/apps.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/migrations/0001_initial.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/migrations/__init__.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/models.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/settings.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/templates/tests/test_model_list.html +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/tests.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/urls.py +0 -0
- {dbca_utils-3.0.0 → dbca_utils-3.0.2}/tests/views.py +0 -0
|
@@ -467,34 +467,34 @@ if WORKLOADS > 0 and WORKLOAD_DEPLOYMENT:
|
|
|
467
467
|
logger.debug("Get assigned workloads:{}".format(assignedworkloads))
|
|
468
468
|
datas = {}
|
|
469
469
|
index = 0
|
|
470
|
-
|
|
470
|
+
reassign_workloads = 0
|
|
471
471
|
for workloadname in WORKLOADNAMES:
|
|
472
472
|
servername = assignedworkloads.get(workloadname)
|
|
473
473
|
if not servername:
|
|
474
474
|
#workloadname is not assined to a server
|
|
475
|
-
|
|
475
|
+
reassign_workloads += 1
|
|
476
476
|
continue
|
|
477
477
|
|
|
478
478
|
#workload name is assigned to a server
|
|
479
479
|
if servername not in servers_res :
|
|
480
480
|
#the server is not available
|
|
481
|
-
|
|
481
|
+
reassign_workloads += 1
|
|
482
482
|
continue
|
|
483
483
|
|
|
484
484
|
datas[servername] = servers_res[servername]
|
|
485
485
|
if servers_res[servername][0] in OFFLINE_STATUSCODE_LIST:
|
|
486
486
|
#Related workload is offline, need to reassign another workload
|
|
487
|
-
|
|
487
|
+
reassign_workloads += 1
|
|
488
488
|
del servers_res[servername]
|
|
489
489
|
|
|
490
490
|
assignedworkloads_changed = False
|
|
491
|
-
if
|
|
491
|
+
if reassign_workloads > 0:
|
|
492
492
|
#Some workloads are not assigned a workload name or are not available
|
|
493
493
|
#Using the following to replace the exisint one with new one if possible
|
|
494
494
|
#Step 1: Replace the unavailable server with a new one
|
|
495
495
|
#Step 2: Assign the new server to the missing assignedworkloads(missed in the assignedworkloads before)
|
|
496
496
|
step = 0
|
|
497
|
-
while
|
|
497
|
+
while reassign_workloads > 0:
|
|
498
498
|
step += 1
|
|
499
499
|
for workloadname in WORKLOADNAMES:
|
|
500
500
|
servername = assignedworkloads.get(workloadname)
|
|
@@ -525,10 +525,10 @@ if WORKLOADS > 0 and WORKLOAD_DEPLOYMENT:
|
|
|
525
525
|
assignedworkloads_changed = True
|
|
526
526
|
|
|
527
527
|
if servers_res:
|
|
528
|
-
|
|
528
|
+
reassign_workloads -= 1
|
|
529
529
|
else:
|
|
530
|
-
|
|
531
|
-
if
|
|
530
|
+
reassign_workloads = 0
|
|
531
|
+
if reassign_workloads == 0:
|
|
532
532
|
break
|
|
533
533
|
|
|
534
534
|
if assignedworkloads_changed:
|
|
@@ -544,9 +544,12 @@ if WORKLOADS > 0 and WORKLOAD_DEPLOYMENT:
|
|
|
544
544
|
result[workloadname] = "Can't find an available host for this non-assigned host.registered workloads: {0}, assigned workloads:{1}".format(str_workloads(workloads),assignedworkloads)
|
|
545
545
|
elif servername not in datas:
|
|
546
546
|
result[workloadname] = "Can't find an available host for this assigned offline host({2}).registered workloads: {0}, assigned workloads:{1}".format(str_workloads(workloads),assignedworkloads,servername)
|
|
547
|
-
|
|
547
|
+
elif datas[servername][0] == 200:
|
|
548
548
|
result[workloadname] = datas[servername][1]
|
|
549
549
|
result[workloadname]["hostname"] = servername
|
|
550
|
+
else:
|
|
551
|
+
result[workloadname] = "{}: {}".format(servername,datas[servername][1])
|
|
552
|
+
|
|
550
553
|
|
|
551
554
|
datas.clear()
|
|
552
555
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|