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/03/29 15:04:02 UTC

[GitHub] [cloudstack] GutoVeronezi opened a new pull request #4881: Externalize OOBM background task's interval

GutoVeronezi opened a new pull request #4881:
URL: https://github.com/apache/cloudstack/pull/4881


   ### Description
   On `BackgroundPollManagerImpl`, each submitted task needs to implement delay's configuration; otherwise it will assume the delay (which acts like the execution interval, not an actual delay) `4000ms` (hardcoded).
   
   This PR intends to externalize the OOBM delay's configuration.
   
   ### 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
   
   ### How Has This Been Tested?
   
   It has been tested locally on a test lab.
   1. I enabled a zone;
   2. i configured the OOBM in the host;
   2. I observed the log. It will log in intervals according to the configuration set.


-- 
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] GutoVeronezi commented on pull request #4881: Externalize OOBM background task's interval

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


   @DaanHoogland any update here?


-- 
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 #4881: Externalize OOBM background task's interval

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


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 507


-- 
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 #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       @GutoVeronezi it is just the convention for settings throughout the system. No one will die either way.




-- 
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 #4881: Externalize OOBM background task's interval

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


   <b>Trillian test result (tid-626)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 44592 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4881-t626-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
   Smoke tests completed. 87 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_07_deploy_kubernetes_ha_cluster | `Failure` | 3601.21 | test_kubernetes_clusters.py
   test_08_deploy_and_upgrade_kubernetes_ha_cluster | `Failure` | 0.05 | test_kubernetes_clusters.py
   test_09_delete_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 70.29 | test_kubernetes_clusters.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



[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #4881: Externalize OOBM background task's interval

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



##########
File path: server/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceImpl.java
##########
@@ -578,7 +578,7 @@ protected void runInContext() {
 
         @Override
         public Long getDelay() {
-            return null;
+            return OutOfBandManagementBackgroundTaskExecutionInterval.value() * 1000L;

Review comment:
       @rhtyd The default value when it returns null, in poll manager, is 4s. The proposal of this changes is to externalize the configuration of OOBM interval to the operators, but keeping the same behavior as before if it is not changed.




-- 
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 #4881: Externalize OOBM background task's interval

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


   not sure what happened here, pylint fails while no python or travis related changes in this.


-- 
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 #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       sorry, i now see, you had't sorry. You should have.




-- 
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 #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       no @GutoVeronezi you had my ok from the start ;)




-- 
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] GutoVeronezi commented on pull request #4881: Externalize OOBM background task's interval

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


   @DaanHoogland @GabrielBrascher @rhtyd is there anything else to do?


-- 
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 #4881: Externalize OOBM background task's interval

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


   


-- 
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 closed pull request #4881: Externalize OOBM background task's interval

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


   


-- 
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 #4881: Externalize OOBM background task's interval

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


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 439


-- 
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 pull request #4881: Externalize OOBM background task's interval

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


   All checks are green and it has two LGTMs as well. Do we need to run integration tests here? @DaanHoogland @rhtyd
   
   If there are no objections I will be merging this one in 24 hours.


-- 
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] GutoVeronezi commented on a change in pull request #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       @DaanHoogland Why this should initiate with a capital letter?




-- 
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 #4881: Externalize OOBM background task's interval

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


   re-kicking travis


-- 
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] rhtyd commented on a change in pull request #4881: Externalize OOBM background task's interval

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



##########
File path: server/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceImpl.java
##########
@@ -578,7 +578,7 @@ protected void runInContext() {
 
         @Override
         public Long getDelay() {
-            return null;
+            return OutOfBandManagementBackgroundTaskExecutionInterval.value() * 1000L;

Review comment:
       When this returns null, I think the poll manager uses some default value (I think 5s?). If the default config value is 4s, it may not make much difference.




-- 
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 #4881: Externalize OOBM background task's interval

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


   I think we can merge @GutoVeronezi . @rhtyd no more comments?


-- 
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 #4881: Externalize OOBM background task's interval

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


   @GabrielBrascher 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] GutoVeronezi commented on a change in pull request #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       @DaanHoogland Alright, done. Is there something else?




-- 
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 #4881: Externalize OOBM background task's interval

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


   @GutoVeronezi not from me. taking @rhtyd 's silence as a concurrance.


-- 
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 pull request #4881: Externalize OOBM background task's interval

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


   @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 #4881: Externalize OOBM background task's interval

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


   <b>Trillian test result (tid-593)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 36359 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4881-t593-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_with_userdata.py
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_projects.py
   Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
   Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
   Smoke tests completed. 83 look OK, 5 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestDeployVmWithUserData>:setup | `Error` | 0.00 | test_deploy_vm_with_userdata.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_09_project_suspend | `Error` | 0.07 | test_projects.py
   test_10_project_activation | `Error` | 0.06 | test_projects.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   ContextSuite context=TestRAMCPUResourceAccounting>:setup | `Error` | 0.00 | test_resource_accounting.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



[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #4881: Externalize OOBM background task's interval

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



##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       @DaanHoogland Alright, done.




-- 
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 #4881: Externalize OOBM background task's interval

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



##########
File path: server/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceImpl.java
##########
@@ -578,7 +578,7 @@ protected void runInContext() {
 
         @Override
         public Long getDelay() {
-            return null;
+            return outOfBandManagementBackgroundTaskExecutionInterval.value() * 1000L;

Review comment:
       ```suggestion
               return OutOfBandManagementBackgroundTaskExecutionInterval.value() * 1000L;
   ```

##########
File path: api/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementService.java
##########
@@ -33,6 +33,9 @@
     ConfigKey<Integer> SyncThreadPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "outofbandmanagement.sync.poolsize", "50",
             "The out of band management background sync thread pool size", true, ConfigKey.Scope.Global);
 
+    ConfigKey<Integer> outOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",

Review comment:
       ```suggestion
       ConfigKey<Integer> OutOfBandManagementBackgroundTaskExecutionInterval = new ConfigKey<>("Advanced", Integer.class, "outofbandmanagement.background.task.execution.interval", "4",
   ```

##########
File path: server/src/main/java/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceImpl.java
##########
@@ -534,7 +534,7 @@ public String getConfigComponentName() {
 
     @Override
     public ConfigKey<?>[] getConfigKeys() {
-        return new ConfigKey<?>[] {ActionTimeout, SyncThreadPoolSize};
+        return new ConfigKey<?>[] {ActionTimeout, SyncThreadPoolSize, outOfBandManagementBackgroundTaskExecutionInterval};

Review comment:
       ```suggestion
           return new ConfigKey<?>[] {ActionTimeout, SyncThreadPoolSize, OutOfBandManagementBackgroundTaskExecutionInterval};
   ```




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