From 8ed68744eb73c4a84d1765d5eeb9d16d405bf907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 23 Oct 2013 16:58:50 +0200 Subject: [PATCH] Feature #1712: Allow to change DS type even if the DS is in a cluster --- src/datastore/Datastore.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/datastore/Datastore.cc b/src/datastore/Datastore.cc index c20a11b3da..f19511338a 100644 --- a/src/datastore/Datastore.cc +++ b/src/datastore/Datastore.cc @@ -457,28 +457,6 @@ int Datastore::replace_template(const string& tmpl_str, string& error_str) if (!s_ds_type.empty()) { new_ds_type = str_to_type(s_ds_type); - - if (get_cluster_id() != ClusterPool::NONE_CLUSTER_ID)//It's in a cluster - { - if (type == SYSTEM_DS && new_ds_type != SYSTEM_DS) - { - error_str = "Datastore is associated to a cluster, and it is " - "the SYSTEM_DS, remove it from cluster first to " - "update its type."; - - delete new_tmpl; - return -1; - } - else if (new_ds_type == SYSTEM_DS && type != SYSTEM_DS) - { - error_str = "Datastore is associated to a cluster, cannot set " - "type to SYSTEM_DS. Remove it from cluster first " - "to update its type."; - - delete new_tmpl; - return -1; - } - } } else //No TYPE in the new Datastore template {