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 55e8202ff48..36458820870 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 ManagementServerAddresses = new ConfigKey("Advanced", String.class, "host", "localhost", "The ip address of management server. This can also accept comma separated addresses.", true); - public static final ConfigKey ApiServletPath = new ConfigKey("Advanced", String.class, "endpointe.url", "http://localhost:8080/client/api", + public static final ConfigKey ApiServletPath = new ConfigKey("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 DefaultUIPageSize = new ConfigKey("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 6cd11a4c811..822cf00e630 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 36b419beda1..ec46b8c147f 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 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 d612ad53966..09b68082043 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 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 0387ddf9cc1..0a848e2439a 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")