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 2020/10/22 08:52:30 UTC

[GitHub] [cloudstack] davidjumani opened a new pull request #4420: Including instance details in KubernetesClusterResponse

davidjumani opened a new pull request #4420:
URL: https://github.com/apache/cloudstack/pull/4420


   ## Description
   Returning list of virtual machine nodes of a cluster rather than just their IDs. Simplifies the UI as well
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] 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)
   
   ## How Has This Been Tested?
   
   ```
   (kubeadmin) 🐱 > list kubernetesclusters id=3d2d10cd-db04-4c4f-87f0-7405d45333e8 
   {
     "count": 1,
     "kubernetescluster": [
       {
         .....
         "name": "cluster-1",
         "virtualmachines": [
           {
             .....
             "displayname": "cluster-1-master-1754f2cc2da",
             .....
           },
           {
            .....
             "displayname": "cluster-1-node-1754f2cd5f1",
             .....
           }
         ],
       }
     ]
   }
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] davidjumani edited a comment on pull request #4420: Including instance details in KubernetesClusterResponse

Posted by GitBox <gi...@apache.org>.
davidjumani edited a comment on pull request #4420:
URL: https://github.com/apache/cloudstack/pull/4420#issuecomment-717023545


   @shwstppr This is needed for the cluster auotscaler (rather return the entire result than give listVMs access to an external service)
   Also makes primate simpler (reduces backwards compatibility work)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4420: Including instance details in KubernetesClusterResponse

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



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -606,13 +610,20 @@ public KubernetesClusterResponse createKubernetesClusterResponse(long kubernetes
         response.setEndpoint(kubernetesCluster.getEndpoint());
         response.setNetworkId(ntwk.getUuid());
         response.setAssociatedNetworkName(ntwk.getName());
-        List<String> vmIds = new ArrayList<String>();
+        List<UserVmResponse> vmIds = new ArrayList<UserVmResponse>();
         List<KubernetesClusterVmMapVO> vmList = kubernetesClusterVmMapDao.listByClusterId(kubernetesCluster.getId());
+        ResponseView respView = ResponseView.Restricted;
+        Account caller = CallContext.current().getCallingAccount();
+        if (accountService.isRootAdmin(caller.getId())) {
+            respView = ResponseView.Full;
+        }
         if (vmList != null && !vmList.isEmpty()) {
             for (KubernetesClusterVmMapVO vmMapVO : vmList) {
-                UserVmVO userVM = userVmDao.findById(vmMapVO.getVmId());
+                UserVmJoinVO userVM = userVmJoinDao.findById(vmMapVO.getVmId());
                 if (userVM != null) {
-                    vmIds.add(userVM.getUuid());
+                    UserVmResponse vmResponse = ApiDBUtils.newUserVmResponse(respView, "virtualmachine", userVM,

Review comment:
       would like this string constant defined




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   @shwstppr This is needed for the cluster auotscaler (rather return the entire result than give listVMs access to an external service)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland merged pull request #4420: Including instance details in KubernetesClusterResponse

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


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2267


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   <b>Trillian test result (tid-3061)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 41056 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4420-t3061-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Smoke tests completed. 85 look OK, 0 have error(s)
   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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   @davidjumani a Jenkins job has been kicked to build packages. 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.

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   satisfied @shwstppr ? can we merge?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   @GabrielBrascher is this lgty?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   @davidjumani a Jenkins job has been kicked to build packages. 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.

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



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] GabrielBrascher commented on a change in pull request #4420: Including instance details in KubernetesClusterResponse

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



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -606,13 +610,20 @@ public KubernetesClusterResponse createKubernetesClusterResponse(long kubernetes
         response.setEndpoint(kubernetesCluster.getEndpoint());
         response.setNetworkId(ntwk.getUuid());
         response.setAssociatedNetworkName(ntwk.getName());
-        List<String> vmIds = new ArrayList<String>();
+        List<UserVmResponse> vmIds = new ArrayList<UserVmResponse>();

Review comment:
       @davidjumani considering that this variable has changed from a list of _VM IDs_ to a list of _VM Responses_ I would suggest renaming it.
   What do you think of _vmResponses_ or _vmResponseList_?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2262


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   @davidjumani a Jenkins job has been kicked to build packages. 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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4420: Including instance details in KubernetesClusterResponse

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


   <b>Trillian test result (tid-3045)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 39498 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4420-t3045-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Smoke tests completed. 83 look OK, 2 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_03_deploy_and_upgrade_kubernetes_cluster | `Failure` | 259.96 | test_kubernetes_clusters.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 301.90 | test_vpc_redundant.py
   


----------------------------------------------------------------
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:
users@infra.apache.org