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/05/10 18:48:04 UTC

[GitHub] [cloudstack] weizhouapache opened a new pull request, #6371: agent: enable ssl only for kvm agent (not in system vms)

weizhouapache opened a new pull request, #6371:
URL: https://github.com/apache/cloudstack/pull/6371

   ### Description
   
   This PR fixes the issue that template cannot be downloaded from https site in 4.17.0.0 RC2.
   
   <!--- 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)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] 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
   - [ ] Minor
   
   #### Bug Severity
   
   - [x] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- 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] acs-robot commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#issuecomment-1123417883

   Found UI changes, kicking a new UI QA build
   @blueorangutan ui


-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] blueorangutan commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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 pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @blueorangutan ubuntu20 kvm-ubuntu20


-- 
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] rohityadavcloud commented on a diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869634355


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {
+            s_logger.info("This is not a cloudstack kvm agent, ignoring");
+            return;
+        }

Review Comment:
   @nvazquez @weizhouapache Could this cause an issue with (a) direct download, (b) ssl enabled cpvm and ssvm. Should we attempt to fix the issue by importing or referencing the system keystore too where java/ca certs are stored and imported (for x1/letsencrypt) @Pearl1594 ?



-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] nvazquez commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   Verified HTTPS templates working on KVM env with this fix


-- 
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 diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869645924


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {
+            s_logger.info("This is not a cloudstack kvm agent, ignoring");
+            return;
+        }

Review Comment:
   @rohityadavcloud @nvazquez @Pearl1594 
   this part of code was introduced in #6200 which aims to fix an issue with direct download on KVM.
   with this pr, SSL is still enabled on KVM hosts, but not in system VMs where Java process load key store realhostip.keystone (same as the behavior without #6200 )



-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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 pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] sonarcloud[bot] commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#issuecomment-1122795368

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6371)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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


-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6371 (SL-JID-1547)


-- 
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] rohityadavcloud commented on a diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869884921


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {
+            s_logger.info("This is not a cloudstack kvm agent, ignoring");
+            return;
+        }

Review Comment:
   Makes sense if this was relatively newer code.



-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   <b>Trillian test result (tid-4166)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 37350 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6371-t4166-kvm-centos7.zip
   Smoke tests completed. 96 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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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 pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] sonarcloud[bot] commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#issuecomment-1123507959

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6371)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6371&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6371&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6371&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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 a diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
nvazquez commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r870113689


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {

Review Comment:
   +1



-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   <b>Trillian test result (tid-4161)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35729 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6371-t4161-kvm-centos7.zip
   Smoke tests completed. 83 look OK, 5 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_05_stop_ssvm | `Error` | 29.77 | test_ssvm.py
   test_06_stop_cpvm | `Error` | 3.00 | test_ssvm.py
   test_07_reboot_ssvm | `Error` | 3.00 | test_ssvm.py
   test_08_reboot_cpvm | `Error` | 3.00 | test_ssvm.py
   test_09_reboot_ssvm_forced | `Error` | 3.00 | test_ssvm.py
   test_10_reboot_cpvm_forced | `Error` | 3.00 | test_ssvm.py
   test_11_destroy_ssvm | `Error` | 3.00 | test_ssvm.py
   test_12_destroy_cpvm | `Error` | 3.00 | test_ssvm.py
   test_13_ss_nfs_version_on_ssvm | `Error` | 3.00 | test_ssvm.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 27.97 | test_kubernetes_clusters.py
   test_07_deploy_kubernetes_ha_cluster | `Failure` | 57.66 | test_kubernetes_clusters.py
   test_08_upgrade_kubernetes_ha_cluster | `Failure` | 34.02 | test_kubernetes_clusters.py
   test_09_delete_kubernetes_ha_cluster | `Failure` | 31.93 | test_kubernetes_clusters.py
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 116.86 | test_kubernetes_clusters.py
   ContextSuite context=TestPrivateVlansL2Networks>:setup | `Error` | 836.82 | test_network.py
   test_hostha_enable_ha_when_host_disconected | `Error` | 788.40 | test_hostha_kvm.py
   test_hostha_enable_ha_when_host_in_maintenance | `Error` | 303.82 | test_hostha_kvm.py
   test_01_deploy_vm_on_specific_host | `Error` | 1.16 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 0.20 | test_vm_deployment_planner.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.

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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] blueorangutan commented on pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

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

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


-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   <b>Trillian test result (tid-4158)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 36897 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6371-t4158-kvm-centos7.zip
   Smoke tests completed. 96 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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @acs-robot a Jenkins job has been kicked to build UI QA env. 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 closed pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
weizhouapache closed pull request #6371: agent: enable ssl only for kvm agent (not in system vms)
URL: https://github.com/apache/cloudstack/pull/6371


-- 
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 diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869957067


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {

Review Comment:
   @rohityadavcloud 
   I will move all these codes to `LibvirtComputingResource` which makes more sense.
   I will verify the issue fixed by #6200 as well.



-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

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


-- 
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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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 #6371: agent: enable ssl only for kvm agent (not in system vms)

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

   @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] rohityadavcloud commented on a diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869884772


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {

Review Comment:
   The use of `LIBVIRT_COMPUTING_RESOURCE` or `com.cloud.hypervisor.kvm.resource.LibvirtComputingResource` may be misleading (for ex. what if this isn't the resource name? for example, we do support lxc etc?).
   
   Can you simply add a check if the agent is either is in systemvm (for ex. /etc/cloudstack-release would exist) or if we're on a KVM host (check for /dev/kvm exists or libvirt running)? (Depending on what we're trying to achieve here). The other option usually is to check the resource class via some method.
   
   What do you think @weizhouapache @nvazquez ?



-- 
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 diff in pull request #6371: agent: enable ssl only for kvm agent (not in system vms)

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on code in PR #6371:
URL: https://github.com/apache/cloudstack/pull/6371#discussion_r869645924


##########
agent/src/main/java/com/cloud/agent/AgentShell.java:
##########
@@ -399,12 +401,17 @@ public void init(String[] args) throws ConfigurationException {
         _backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
     }
 
-    private void enableSSL() {
+    private void enableSSLForKvmAgent() {
         final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
         if (agentFile == null) {
             s_logger.info("Failed to find agent.properties file");
             return;
         }
+        final String resource = getProperty(null, "resource");
+        if (!LIBVIRT_COMPUTING_RESOURCE.equalsIgnoreCase(resource)) {
+            s_logger.info("This is not a cloudstack kvm agent, ignoring");
+            return;
+        }

Review Comment:
   @rohityadavcloud @nvazquez @Pearl1594 
   this part of code was introduced in #6200 which aims to fix an issue with direct download on KVM.
   with this pr, SSL is still enabled on KVM hosts, but not in system VMs where Java process load key store real hostile.keystone (same as the behavior without #6200 )



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