|
@@ -454,14 +454,26 @@ public class DockerProjectCtrl { |
|
@@ -454,14 +454,26 @@ public class DockerProjectCtrl { |
454
|
return rtn;
|
454
|
return rtn;
|
455
|
}
|
455
|
}
|
456
|
|
456
|
|
457
|
- Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
457
|
+ //Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
|
|
458
|
+
|
|
|
459
|
+ /*
|
458
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
460
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
459
|
if(!normalStatusFlag){
|
461
|
if(!normalStatusFlag){
|
460
|
rtn.setCode(201);
|
462
|
rtn.setCode(201);
|
461
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
463
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
462
|
return rtn;
|
464
|
return rtn;
|
463
|
}
|
465
|
}
|
|
|
466
|
+ */
|
|
|
467
|
+
|
|
|
468
|
+ Map<String,Object> statusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
|
|
469
|
+
|
464
|
JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
470
|
JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
|
|
471
|
+ if(containerJa==null){
|
|
|
472
|
+ rtn.setCode(201);
|
|
|
473
|
+ rtn.setMessage("Docker服务修改镜像服务发生异常,获取容器描述为空");
|
|
|
474
|
+ return rtn;
|
|
|
475
|
+ }
|
|
|
476
|
+
|
465
|
boolean currentImageLatestFlag=dockerServerDeployService.checkImageLatestWithModifyFlag(clusterId, namespace, serviceName,imageStore, containerJa,false);
|
477
|
boolean currentImageLatestFlag=dockerServerDeployService.checkImageLatestWithModifyFlag(clusterId, namespace, serviceName,imageStore, containerJa,false);
|
466
|
if(currentImageLatestFlag){
|
478
|
if(currentImageLatestFlag){
|
467
|
//开始重新发布
|
479
|
//开始重新发布
|
|
@@ -540,7 +552,7 @@ public class DockerProjectCtrl { |
|
@@ -540,7 +552,7 @@ public class DockerProjectCtrl { |
540
|
rtn.setMessage("Docker服务不存在,请联系运维人员");
|
552
|
rtn.setMessage("Docker服务不存在,请联系运维人员");
|
541
|
return rtn;
|
553
|
return rtn;
|
542
|
}
|
554
|
}
|
543
|
-
|
555
|
+ /*
|
544
|
Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
556
|
Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
545
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
557
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
546
|
if(!normalStatusFlag){
|
558
|
if(!normalStatusFlag){
|
|
@@ -548,8 +560,15 @@ public class DockerProjectCtrl { |
|
@@ -548,8 +560,15 @@ public class DockerProjectCtrl { |
548
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
560
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
549
|
return rtn;
|
561
|
return rtn;
|
550
|
}
|
562
|
}
|
551
|
- JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
563
|
+ */
|
|
|
564
|
+ Map<String,Object> statusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
552
|
|
565
|
|
|
|
566
|
+ JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
|
|
567
|
+ if(containerJa==null){
|
|
|
568
|
+ rtn.setCode(201);
|
|
|
569
|
+ rtn.setMessage("Docker服务修改镜像服务发生异常,获取容器描述为空");
|
|
|
570
|
+ return rtn;
|
|
|
571
|
+ }
|
553
|
//更改路径,更改之后自动重新部署
|
572
|
//更改路径,更改之后自动重新部署
|
554
|
boolean currentImageLatestFlag=dockerServerDeployService.rollbackImageStore(clusterId, namespace, serviceName, containerJa,rollbackImageStore);
|
573
|
boolean currentImageLatestFlag=dockerServerDeployService.rollbackImageStore(clusterId, namespace, serviceName, containerJa,rollbackImageStore);
|
555
|
if(!currentImageLatestFlag){
|
574
|
if(!currentImageLatestFlag){
|
|
@@ -577,8 +596,8 @@ public class DockerProjectCtrl { |
|
@@ -577,8 +596,8 @@ public class DockerProjectCtrl { |
577
|
if(StringUtils.isBlank(clusterId)){
|
596
|
if(StringUtils.isBlank(clusterId)){
|
578
|
continue;
|
597
|
continue;
|
579
|
}
|
598
|
}
|
580
|
- List<String> statusAndCreateAt=dockerServerDeployService.queryAppStatus(clusterId,namespace,serviceName);
|
|
|
581
|
- statusMap.put(clusterId,statusAndCreateAt.get(0));
|
599
|
+ Map<String,Object> appStatusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
|
|
600
|
+ statusMap.put(clusterId,String.valueOf(appStatusMap.get("queryDesc")));
|
582
|
}
|
601
|
}
|
583
|
|
602
|
|
584
|
boolean allNormal=false;
|
603
|
boolean allNormal=false;
|