Added validation on proxy domain for 'hiveserver' process

Hiveserver process requires configured proxy domain.

Change-Id: I14f0aea3b668afa67fdcc1fb917b8f8a69fb0f2b
Closes-Bug: #1400464
This commit is contained in:
Andrew Lazarev 2014-12-18 15:52:45 -08:00
parent 92d29c488a
commit bb55efbbfa

View File

@ -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)