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 2021/08/23 15:47:19 UTC

[GitHub] [cloudstack] SadiJr opened a new pull request #5357: Externalize VMWare stats time window config

SadiJr opened a new pull request #5357:
URL: https://github.com/apache/cloudstack/pull/5357


   ### Description
   
   CloudStack has a feature to get VM metrics, which, for VMWare, is collected from a time window of 5 minutes; This time window (5 minutes) is hard-coded and operators cannot choose which one to use. 
   
   In vCenter, VMWare has default metric collections time window of 5 minutes, however operators are able to change it, which may cause inconsistency with the hard-coded ACS's time window.
   
   This PR intends to externalize this configuration via `vmware.stats.time.window` option to allow operators to choose the time window to collect the metrics. Also, I added logs to alert operators in case window interval is not enabled in vCenter.
   
   Interesting links about this:
    - https://knowledge.broadcom.com/external/article/41027/the-vmware-probe-output-error-with-inval.html
    - https://www.veeam.com/kb1021
    - https://github.com/vmware/pyvmomi/issues/783
    - https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=646291e2-9c27-416f-b3e2-b408fd852cf3&CommunityKey=170eb4e5-a593-4af2-ad1d-f7655e31513b&tab=digestviewer
    - https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcenterhost.doc/GUID-5D85751A-2CE8-4FD5-83C8-90A17060631E.html
   
   ### 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
   
   - [ ] Major
   - [x] Minor
   
   ### How Has This Been Tested?
   
   - I created a VM in CloudStack and maked Network and Disk I/O operations;
   - I changed the value of configuration `vmware.stats.time.window`;
   - I checked if the error message appears in logs when the interval used is disabled in vCenter;
   - After that, I enabled the interval in vCenter;
   - I checked if metrics are now collected;
   - And checked if VM metrics in ACS are the same at the vCenter (a little difference, but this is expected because ACS call vCenter to collect metrics, when It responses, the VM metrics have changed a little);
   - Finally, for my tests, 20 seconds are the minimum acceptable by vCenter 6.5. Less than this result in errors.


-- 
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 #5357: Externalize VMWare stats time window config

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



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManager.java
##########
@@ -46,6 +46,10 @@
     static final ConfigKey<Integer> s_vmwareOVAPackageTimeout = new ConfigKey<Integer>(Integer.class, "vmware.package.ova.timeout", "Advanced", "3600",
             "Vmware script timeout for ova packaging process", true, ConfigKey.Scope.Global, 1000);
 
+    public static final ConfigKey<Integer> VMWARE_STATS_TIME_WINDOW = new ConfigKey<Integer>("Advanced", Integer.class, "vmware.stats.time.window", "300",

Review comment:
       ```suggestion
       public static final ConfigKey<Integer> s_vmwareStatsTimeWindow = new ConfigKey<Integer>("Advanced", Integer.class, "vmware.stats.time.window", "300",
   ```
   
   better to keep same format as other configs
   




-- 
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 #5357: Externalize VMWare stats time window config

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


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

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 #5357: Externalize VMWare stats time window config

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


   


-- 
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 #5357: Externalize VMWare stats time window config

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


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


-- 
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] GutoVeronezi commented on pull request #5357: Externalize VMWare stats time window config

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


   @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 #5357: Externalize VMWare stats time window config

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


   @blueorangutan test centos7 vmware-67u3


-- 
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 #5357: Externalize VMWare stats time window config

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


   <b>Trillian test result (tid-1756)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 37386 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5357-t1756-vmware-67u3.zip
   Intermittent failure detected: /marvin/tests/smoke/test_routers.py
   Smoke tests completed. 89 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.

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

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



[GitHub] [cloudstack] SadiJr commented on a change in pull request #5357: Externalize VMWare stats time window config

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



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManager.java
##########
@@ -46,6 +46,10 @@
     static final ConfigKey<Integer> s_vmwareOVAPackageTimeout = new ConfigKey<Integer>(Integer.class, "vmware.package.ova.timeout", "Advanced", "3600",
             "Vmware script timeout for ova packaging process", true, ConfigKey.Scope.Global, 1000);
 
+    public static final ConfigKey<Integer> VMWARE_STATS_TIME_WINDOW = new ConfigKey<Integer>("Advanced", Integer.class, "vmware.stats.time.window", "300",

Review comment:
       Hi @sureshanaparti, thanks for the review. About changing this to keep the format at the other configs, I really don't think this is a good action. This config is a constant, and, according to [Java naming conventions](https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html), and [ACS naming conventions](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Coding+conventions) , constants must be written in uppercase, separated by _. Keeping new settings in the old format does not sound like a good practice.




-- 
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 #5357: Externalize VMWare stats time window config

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


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) 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