Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from resource_management.core.exceptions import Fail
from resource_management.core.logger import Logger
from resource_management.libraries.resources.repository import Repository
from resource_management.libraries.functions.cluster_settings import get_cluster_setting_value
from resource_management.libraries.functions.is_empty import is_empty
import ambari_simplejson as json

Expand All @@ -36,8 +37,8 @@ def __init__(self, config, tags_to_skip):

# repo templates
repo_file = config['repositoryFile']
repo_rhel_suse = config['configurations']['cluster-env']['repo_suse_rhel_template']
repo_ubuntu = config['configurations']['cluster-env']['repo_ubuntu_template']
repo_rhel_suse = get_cluster_setting_value('repo_rhel_suse_template')
repo_ubuntu = get_cluster_setting_value('repo_ubuntu_template')

if is_empty(repo_file):
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def check_stack_feature(stack_feature, stack_version):
return False
return True
else:
raise Fail("Stack features not defined by stack")
Logger.warning("Stack features not defined by stack")

return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def is_package_supported(package, supported_packages = None):
"""
if supported_packages is None:
supported_packages = get_supported_packages()
if supported_packages is None:
Logger.warning('No stack tool available, all packages are assumed to be supported by this stack')
return True

if package in supported_packages:
return True
Expand All @@ -142,6 +145,9 @@ def get_supported_packages():
:return: and array of packages support by <stack-select>
"""
stack_selector_path = stack_tools.get_stack_tool_path(stack_tools.STACK_SELECTOR_NAME)
if not os.path.exists(stack_selector_path):
Logger.warning('This stack does not have a stack select tool')
return
command = (STACK_SELECT_PREFIX, stack_selector_path, "packages")
code, stdout = shell.call(command, sudo = True, quiet = True)

Expand Down