[GitHub] [cloudstack] shwstppr commented on a change in pull request #4116: cks: fix template, deployment issues

2020-07-30 Thread GitBox


shwstppr commented on a change in pull request #4116:
URL: https://github.com/apache/cloudstack/pull/4116#discussion_r462797409



##
File path: 
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##
@@ -300,8 +294,7 @@ private boolean 
isKubernetesServiceTemplateConfigured(DataCenter zone) {
 LOGGER.warn(String.format("Unable to find the template %s to 
be used for provisioning Kubernetes cluster nodes", templateName));
 return false;
 }
-List listZoneTemplate = 
templateZoneDao.listByZoneTemplate(zone.getId(), template.getId());
-if (listZoneTemplate == null || listZoneTemplate.isEmpty()) {
+if 
(CollectionUtils.isEmpty(templateJoinDao.newTemplateView(template, 
zone.getId(), true))) {

Review comment:
   @DaanHoogland I've checked this. `newTemplateView` is called here with 
`readyOnly=true` and deleted templates have `state=NULL`.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [cloudstack] shwstppr commented on a change in pull request #4116: cks: fix template, deployment issues

2020-06-24 Thread GitBox


shwstppr commented on a change in pull request #4116:
URL: https://github.com/apache/cloudstack/pull/4116#discussion_r445115883



##
File path: 
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##
@@ -300,8 +294,7 @@ private boolean 
isKubernetesServiceTemplateConfigured(DataCenter zone) {
 LOGGER.warn(String.format("Unable to find the template %s to 
be used for provisioning Kubernetes cluster nodes", templateName));
 return false;
 }
-List listZoneTemplate = 
templateZoneDao.listByZoneTemplate(zone.getId(), template.getId());
-if (listZoneTemplate == null || listZoneTemplate.isEmpty()) {
+if 
(CollectionUtils.isEmpty(templateJoinDao.newTemplateView(template, 
zone.getId(), true))) {

Review comment:
   @DaanHoogland thanks for pointing it. I'll check that again





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org