You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/03/17 12:45:26 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Pearl1594 opened a new pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132


   
   ### Description
   
   This PR addresses: #6128 
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   Deployed a CKS cluster on an Advanced zone with security groups
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1080585295


   @Pearl1594 a Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1080584161


   @blueorangutan package


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] nvazquez commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1073429873


   @blueorangutan test


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r836278044



##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -652,3 +652,5 @@ INSERT INTO `cloud`.`user_vm_details`(`vm_id`, `name`, `value`)
         INNER JOIN `cloud`.`vm_instance` ON vm_instance.id = user_vm_details.vm_id
         WHERE ssh_keypairs.account_id = vm_instance.account_id;
 
+ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `security_group_id` bigint unsigned DEFAULT NULL;

Review comment:
       @Pearl1594 
   would be better to add foreign key ?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r830928938



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup("CKSSecurityGroup", "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException("Failed to create security group");

Review comment:
       ```suggestion
                   throw new CloudRuntimeException("Failed to create security group: CKSSecurityGroup");
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1070984238


   @blueorangutan package


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r837172783



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup(KubernetesClusterActionWorker.CKS_CLUSTER_SECURITY_GROUP_NAME.concat(Long.toHexString(System.currentTimeMillis())), "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException(String.format("Failed to create security group: %s", KubernetesClusterActionWorker.CKS_CLUSTER_SECURITY_GROUP_NAME));
+            }
+            List<String> cidrList = new ArrayList<>();
+            cidrList.add(NetUtils.ALL_IP4_CIDRS);
+            securityGroupService.authorizeSecurityGroupRule(securityGroupVO.getId(), NetUtils.TCP_PROTO, 22, 22, null, null, cidrList, null, SecurityRule.SecurityRuleType.IngressRule);

Review comment:
       @Pearl1594 
   can you define a constant in KubernetesClusterActionWorker  and use KubernetesClusterActionWorker.CLUSTER_API_PORT (6443) ?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1082133790


   <b>Trillian test result (tid-3747)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32465 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6132-t3747-kvm-centos7.zip
   Smoke tests completed. 92 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1071055869


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2918


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1070985694






-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r829090660



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup("CKSSecurityGroup", "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException("Failed to create security group");
+            }
+            List<String> cirdList = new ArrayList<>();
+            cirdList.add("0.0.0.0/0");

Review comment:
       we could define a constant in e.g. NetUtils for `0.0.0.0/0`




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1081520037


   @Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r837172783



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup(KubernetesClusterActionWorker.CKS_CLUSTER_SECURITY_GROUP_NAME.concat(Long.toHexString(System.currentTimeMillis())), "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException(String.format("Failed to create security group: %s", KubernetesClusterActionWorker.CKS_CLUSTER_SECURITY_GROUP_NAME));
+            }
+            List<String> cidrList = new ArrayList<>();
+            cidrList.add(NetUtils.ALL_IP4_CIDRS);
+            securityGroupService.authorizeSecurityGroupRule(securityGroupVO.getId(), NetUtils.TCP_PROTO, 22, 22, null, null, cidrList, null, SecurityRule.SecurityRuleType.IngressRule);

Review comment:
       @Pearl1594 
   can you define a constant in KubernetesClusterActionWorker  for port 22 and use KubernetesClusterActionWorker.CLUSTER_API_PORT (6443) ?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1070984238


   @blueorangutan package


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r836279076



##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -652,3 +652,5 @@ INSERT INTO `cloud`.`user_vm_details`(`vm_id`, `name`, `value`)
         INNER JOIN `cloud`.`vm_instance` ON vm_instance.id = user_vm_details.vm_id
         WHERE ssh_keypairs.account_id = vm_instance.account_id;
 
+ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `security_group_id` bigint unsigned DEFAULT NULL;

Review comment:
       Makes sense @weizhouapache 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r830929904



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -3476,8 +3476,7 @@ public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, Service
             List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
             HTTPMethod httpmethod, String userData, List<String> sshKeyPairs, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard,
             List<Long> affinityGroupIdList, Map<String, String> customParameters, String customId, Map<String, Map<Integer, String>> dhcpOptionMap,
-            Map<Long, DiskOffering> dataDiskTemplateToDiskOfferingMap, Map<String, String> userVmOVFProperties, boolean dynamicScalingEnabled, Long overrideDiskOfferingId) throws InsufficientCapacityException, ConcurrentOperationException,
-    ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
+            Map<Long, DiskOffering> dataDiskTemplateToDiskOfferingMap, Map<String, String> userVmOVFProperties, boolean dynamicScalingEnabled, Long overrideDiskOfferingId, String type) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {

Review comment:
       ```suggestion
               Map<Long, DiskOffering> dataDiskTemplateToDiskOfferingMap, Map<String, String> userVmOVFProperties, boolean dynamicScalingEnabled, Long overrideDiskOfferingId, String vmType) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1080618068


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2998


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1070985694


   @weizhouapache a Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r829090660



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup("CKSSecurityGroup", "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException("Failed to create security group");
+            }
+            List<String> cirdList = new ArrayList<>();
+            cirdList.add("0.0.0.0/0");

Review comment:
       we could define a constant in e.g. NetUtils for `0.0.0.0/0`




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1073804873


   <b>Trillian test result (tid-3674)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 31642 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6132-t3674-kvm-centos7.zip
   Smoke tests completed. 92 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r834985801



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup("CKSSecurityGroup", "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException("Failed to create security group");
+            }
+            List<String> cirdList = new ArrayList<>();
+            cirdList.add(NetUtils.ALL_IP4_CIDRS);
+            securityGroupService.authorizeSecurityGroupRule(securityGroupVO.getId(), NetUtils.ALL_PROTO, null, null, null, null, cirdList, null, SecurityRule.SecurityRuleType.IngressRule);

Review comment:
       Thanks @weizhouapache -  I was going to ask for advice on how open should the security group rules be - I'll make the necessary changes. Thanks 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1081517239


   @blueorangutan test


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1073430089


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#discussion_r833303424



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1035,17 +1043,34 @@ public KubernetesCluster createKubernetesCluster(CreateKubernetesClusterCmd cmd)
             logAndThrow(Level.ERROR, String.format("Creating Kubernetes cluster failed due to error while finding suitable deployment plan for cluster in zone : %s", zone.getName()));
         }
 
+        SecurityGroupVO securityGroupVO = null;
+        if (zone.isSecurityGroupEnabled()) {
+            securityGroupVO = securityGroupManager.createSecurityGroup("CKSSecurityGroup", "Security group for CKS nodes", owner.getDomainId(), owner.getId(), owner.getAccountName());
+            if (securityGroupVO == null) {
+                throw new CloudRuntimeException("Failed to create security group");
+            }
+            List<String> cirdList = new ArrayList<>();
+            cirdList.add(NetUtils.ALL_IP4_CIDRS);
+            securityGroupService.authorizeSecurityGroupRule(securityGroupVO.getId(), NetUtils.ALL_PROTO, null, null, null, null, cirdList, null, SecurityRule.SecurityRuleType.IngressRule);

Review comment:
       @Pearl1594 
   would it be better to allow only the ingress rule for tcp port 22 ?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132#issuecomment-1080443638


   @blueorangutan package


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] nvazquez merged pull request #6132: CKS: Support deployment of CKS clusters on Advanced zones with security groups

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #6132:
URL: https://github.com/apache/cloudstack/pull/6132


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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