diff --git a/sahara/plugins/vanilla/hadoop2/config.py b/sahara/plugins/vanilla/hadoop2/config.py index 2a226f9159..daac380b0b 100644 --- a/sahara/plugins/vanilla/hadoop2/config.py +++ b/sahara/plugins/vanilla/hadoop2/config.py @@ -39,7 +39,8 @@ HADOOP_GROUP = 'hadoop' def configure_cluster(pctx, cluster): LOG.debug("Configuring cluster \"%s\"", cluster.name) - if (CONF.use_identity_api_v3 and vu.get_hiveserver(cluster) and + if (CONF.use_identity_api_v3 and CONF.use_domain_for_proxy_users and + vu.get_hiveserver(cluster) and c_helper.is_swift_enabled(pctx, cluster)): cluster = proxy.create_proxy_user_for_cluster(cluster) diff --git a/sahara/plugins/vanilla/hadoop2/validation.py b/sahara/plugins/vanilla/hadoop2/validation.py index 5990efc907..4e5491c5c3 100644 --- a/sahara/plugins/vanilla/hadoop2/validation.py +++ b/sahara/plugins/vanilla/hadoop2/validation.py @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo.config import cfg - -from sahara import exceptions as e from sahara.i18n import _ from sahara.plugins import exceptions as ex from sahara.plugins import utils as u @@ -24,9 +21,6 @@ from sahara.plugins.vanilla import utils as vu from sahara.utils import general as gu -CONF = cfg.CONF - - def validate_cluster_creating(pctx, cluster): nn_count = _get_inst_count(cluster, 'namenode') if nn_count != 1: @@ -83,10 +77,6 @@ def validate_cluster_creating(pctx, cluster): raise ex.InvalidComponentCountException('hive', _('0 or 1'), hive_count) - if hive_count and not CONF.use_domain_for_proxy_users: - raise e.ConfigurationError( - _("Service 'hiveserver' requires configured proxy domain.")) - def validate_additional_ng_scaling(cluster, additional): rm = vu.get_resourcemanager(cluster) diff --git a/sahara/plugins/vanilla/v1_2_1/versionhandler.py b/sahara/plugins/vanilla/v1_2_1/versionhandler.py index 429650d0e0..1571c8de97 100644 --- a/sahara/plugins/vanilla/v1_2_1/versionhandler.py +++ b/sahara/plugins/vanilla/v1_2_1/versionhandler.py @@ -268,7 +268,8 @@ class VersionHandler(avm.AbstractVersionHandler): run.start_processes(r, *tt_dn_procs) def _setup_instances(self, cluster, instances): - if (CONF.use_identity_api_v3 and vu.get_hiveserver(cluster) and + if (CONF.use_identity_api_v3 and CONF.use_domain_for_proxy_users and + vu.get_hiveserver(cluster) and c_helper.is_swift_enable(cluster)): cluster = proxy.create_proxy_user_for_cluster(cluster) instances = utils.get_instances(cluster)