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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2c11171  Fix 'endpointe.url' global settings configuration typo (#5832)
2c11171 is described below

commit 2c111715178583656dcc9d576906a92d101ef897
Author: Gabriel Beims Bräscher <[email protected]>
AuthorDate: Sun Feb 6 16:11:45 2022 +0100

    Fix 'endpointe.url' global settings configuration typo (#5832)
    
    * Update 'endpointe.url' global settings to 'endpoint.url'
    
    * Add PR number on 'schema-41610to41700.sql'
    
    * Use ApiServiceConfiguration.ApiServletPath.key() instead of "hardcoded" 
string
---
 .../java/org/apache/cloudstack/config/ApiServiceConfiguration.java  | 2 +-
 .../schema/src/main/resources/META-INF/db/schema-41610to41700.sql   | 6 +++++-
 server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java | 2 +-
 .../java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java    | 2 +-
 test/integration/smoke/test_kubernetes_clusters.py                  | 6 +++---
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git 
a/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java 
b/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java
index 55e8202..3645882 100644
--- 
a/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java
+++ 
b/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java
@@ -21,7 +21,7 @@ import org.apache.cloudstack.framework.config.Configurable;
 
 public class ApiServiceConfiguration implements Configurable {
     public static final ConfigKey<String> ManagementServerAddresses = new 
ConfigKey<String>("Advanced", String.class, "host", "localhost", "The ip 
address of management server. This can also accept comma separated addresses.", 
true);
-    public static final ConfigKey<String> ApiServletPath = new 
ConfigKey<String>("Advanced", String.class, "endpointe.url", 
"http://localhost:8080/client/api";,
+    public static final ConfigKey<String> ApiServletPath = new 
ConfigKey<String>("Advanced", String.class, "endpoint.url", 
"http://localhost:8080/client/api";,
             "API end point. Can be used by CS components/services deployed 
remotely, for sending CS API requests", true);
     public static final ConfigKey<Long> DefaultUIPageSize = new 
ConfigKey<Long>("Advanced", Long.class, "default.ui.page.size", "20",
             "The default pagesize to be used by UI and other clients when 
making list* API calls", true, ConfigKey.Scope.Global);
diff --git 
a/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql 
b/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
index 6cd11a4..822cf00 100644
--- a/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
+++ b/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
@@ -23,6 +23,10 @@
 ALTER TABLE cloud.remote_access_vpn MODIFY ipsec_psk text NOT NULL;
 
 
+-- PR#5832 Fix 'endpointe.url' global settings configruation typo.
+UPDATE `cloud`.`configuration` SET name='endpoint.url' WHERE 
name='endpointe.url';
+
+
 
 ALTER TABLE `cloud`.`service_offering` ADD COLUMN `uuid` varchar(40) UNIQUE 
DEFAULT NULL;
 ALTER TABLE `cloud`.`service_offering` ADD COLUMN `name` varchar(255) NOT NULL;
@@ -638,4 +642,4 @@ CREATE VIEW `cloud`.`domain_router_view` AS
             left join
         `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
             and async_job.instance_type = 'DomainRouter'
-            and async_job.job_status = 0;
\ No newline at end of file
+            and async_job.job_status = 0;
diff --git 
a/server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java 
b/server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java
index 36b419b..ec46b8c 100644
--- a/server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java
@@ -328,7 +328,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase 
implements AutoScale
         }
 
         if (csUrl == null || csUrl.contains("localhost")) {
-            throw new InvalidParameterValueException("Global setting 
endpointe.url has to be set to the Management Server's API end point");
+            throw new InvalidParameterValueException(String.format("Global 
setting %s has to be set to the Management Server's API end point", 
ApiServiceConfiguration.ApiServletPath.key()));
         }
 
         vmProfile = _autoScaleVmProfileDao.persist(vmProfile);
diff --git 
a/server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java 
b/server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index d612ad5..09b6808 100644
--- 
a/server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ 
b/server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -339,7 +339,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         }
 
         if (csUrl == null || csUrl.contains("localhost")) {
-            throw new InvalidParameterValueException("Global setting 
endpointe.url has to be set to the Management Server's API end point");
+            throw new InvalidParameterValueException(String.format("Global 
setting %s has to be set to the Management Server's API end point", 
ApiServiceConfiguration.ApiServletPath.key()));
         }
 
         LbAutoScaleVmProfile lbAutoScaleVmProfile =
diff --git a/test/integration/smoke/test_kubernetes_clusters.py 
b/test/integration/smoke/test_kubernetes_clusters.py
index 0387ddf..0a848e2 100644
--- a/test/integration/smoke/test_kubernetes_clusters.py
+++ b/test/integration/smoke/test_kubernetes_clusters.py
@@ -76,11 +76,11 @@ class TestKubernetesCluster(cloudstackTestCase):
         cls.kubernetes_version_ids = []
 
         if cls.hypervisorNotSupported == False:
-            cls.endpoint_url = Configurations.list(cls.apiclient, 
name="endpointe.url")[0].value
+            cls.endpoint_url = Configurations.list(cls.apiclient, 
name="endpoint.url")[0].value
             if "localhost" in cls.endpoint_url:
                 endpoint_url = "http://%s:%d/client/api " 
%(cls.mgtSvrDetails["mgtSvrIp"], cls.mgtSvrDetails["port"])
-                cls.debug("Setting endpointe.url to %s" %(endpoint_url))
-                Configurations.update(cls.apiclient, "endpointe.url", 
endpoint_url)
+                cls.debug("Setting endpoint.url to %s" %(endpoint_url))
+                Configurations.update(cls.apiclient, "endpoint.url", 
endpoint_url)
             cls.initial_configuration_cks_enabled = 
Configurations.list(cls.apiclient, 
name="cloud.kubernetes.service.enabled")[0].value
             if cls.initial_configuration_cks_enabled not in ["true", True]:
                 cls.debug("Enabling CloudStack Kubernetes Service plugin and 
restarting management server")

Reply via email to