From e2eac341a4b657e969ca8a13290994f654d97a7e Mon Sep 17 00:00:00 2001 From: alena Date: Tue, 19 Jul 2011 09:43:36 -0700 Subject: [PATCH] bug 10710: Basic zone setup - send dhcp entries to all domRs (in every Pod) only when network.dns.basiczone.updates is set to "all" status 10710: resolved fixed Conflicts: server/src/com/cloud/configuration/Config.java server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java setup/db/db/schema-228to229.sql --- api/src/com/cloud/api/commands/CreateTemplateCmd.java | 1 - .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 4 ++-- server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java | 2 +- setup/db/db/schema-228to229.sql | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/com/cloud/api/commands/CreateTemplateCmd.java b/api/src/com/cloud/api/commands/CreateTemplateCmd.java index 8592459bf34..23c0f485ffe 100755 --- a/api/src/com/cloud/api/commands/CreateTemplateCmd.java +++ b/api/src/com/cloud/api/commands/CreateTemplateCmd.java @@ -28,7 +28,6 @@ import com.cloud.api.BaseCmd; import com.cloud.api.Implementation; import com.cloud.api.Parameter; import com.cloud.api.ServerApiException; -import com.cloud.api.response.ListResponse; import com.cloud.api.response.StoragePoolResponse; import com.cloud.api.response.TemplateResponse; import com.cloud.async.AsyncJob; diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 1de84bb8309..b0aac3ac0f3 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -475,10 +475,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura return "Please enter valid hypervisor type"; } } - } else { + }else { String[] options = range.split(","); for (String option : options) { - if (option.trim().equals(value)) { + if (option.trim().equalsIgnoreCase(value)) { return null; } } diff --git a/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java b/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java index 512dba83fe3..d9f609fb84a 100755 --- a/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java +++ b/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java @@ -82,7 +82,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase im joinStateNetwork.and("guestType", joinStateNetwork.entity().getGuestType(), Op.EQ); StateNetworkTypeSearch.join("network", joinStateNetwork, joinStateNetwork.entity().getId(), StateNetworkTypeSearch.entity().getNetworkId(), JoinType.INNER); StateNetworkTypeSearch.done(); - + OutsidePodSearch = createSearchBuilder(); OutsidePodSearch.and("network", OutsidePodSearch.entity().getNetworkId(), Op.EQ); OutsidePodSearch.and("podId", OutsidePodSearch.entity().getPodIdToDeployIn(), Op.NEQ); diff --git a/setup/db/db/schema-228to229.sql b/setup/db/db/schema-228to229.sql index 086c91ae44e..6b8fdc16bd4 100644 --- a/setup/db/db/schema-228to229.sql +++ b/setup/db/db/schema-228to229.sql @@ -6,6 +6,7 @@ ALTER TABLE `cloud`.`account` ADD COLUMN `network_domain` varchar(255); ALTER TABLE `cloud`.`domain` ADD COLUMN `network_domain` varchar(255); ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `cloud`.`data_center`(`id`) ON DELETE CASCADE; +INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'network.dns.basiczone.updates', 'all', 'This parameter can take 2 values: all (default) and pod. It defines if DHCP/DNS requests have to be send to all dhcp servers in cloudstack, or only to the one in the same pod'); ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__pod_id`; ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__data_center_id`;