diff --git a/sahara/plugins/vanilla/hadoop2/validation.py b/sahara/plugins/vanilla/hadoop2/validation.py index 4e5491c5..5990efc9 100644 --- a/sahara/plugins/vanilla/hadoop2/validation.py +++ b/sahara/plugins/vanilla/hadoop2/validation.py @@ -13,6 +13,9 @@ # 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 @@ -21,6 +24,9 @@ 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: @@ -77,6 +83,10 @@ 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)