You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2018/01/05 16:23:03 UTC

[cloudstack] branch master updated: CLOUDSTACK-10096 Can't reset integration.api.port and usage.sanity.check.interval (#2274)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new b16dcb7  CLOUDSTACK-10096 Can't reset integration.api.port and usage.sanity.check.interval (#2274)
b16dcb7 is described below

commit b16dcb7174cc493efc92f0960a8cac1d59c11b67
Author: SudharmaJain <su...@accelerite.com>
AuthorDate: Fri Jan 5 21:52:59 2018 +0530

    CLOUDSTACK-10096 Can't reset integration.api.port and usage.sanity.check.interval (#2274)
    
    Fix for CLOUDSTACK-7931 enforces a valid integer value to be configured for integration.api.port and usage.sanity.check.interval. These global configs can't be reset back to null(default).
---
 server/src/com/cloud/api/ApiServer.java        | 1 +
 server/src/com/cloud/configuration/Config.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index d9671e9..6411fe0 100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -338,6 +338,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
             final ConfigurationVO apiPortConfig = values.get(0);
             if (apiPortConfig.getValue() != null) {
                 apiPort = Integer.parseInt(apiPortConfig.getValue());
+                apiPort = (apiPort <= 0) ? null : apiPort;
             }
         }
 
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index bc8272a..a8e24a4 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -562,7 +562,7 @@ public enum Config {
             "The interval (in milliseconds) when host stats are retrieved from agents.",
             null),
     HostRetry("Advanced", AgentManager.class, Integer.class, "host.retry", "2", "Number of times to retry hosts for creating a volume", null),
-    IntegrationAPIPort("Advanced", ManagementServer.class, Integer.class, "integration.api.port", null, "Default API port", null),
+    IntegrationAPIPort("Advanced", ManagementServer.class, Integer.class, "integration.api.port", null, "Default API port. To disable set it to 0 or negative.", null),
     InvestigateRetryInterval(
             "Advanced",
             HighAvailabilityManager.class,
@@ -1276,7 +1276,7 @@ public enum Config {
             Integer.class,
             "usage.sanity.check.interval",
             null,
-            "Interval (in days) to check sanity of usage data",
+            "Interval (in days) to check sanity of usage data. To disable set it to 0 or negative.",
             null),
     UsageAggregationTimezone("Usage", ManagementServer.class, String.class, "usage.aggregation.timezone", "GMT", "The timezone to use for usage stats aggregation", null),
     TrafficSentinelIncludeZones(

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>'].