[
https://issues.apache.org/jira/browse/AMBARI-23459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425586#comment-16425586
]
Attila Magyar commented on AMBARI-23459:
The onefs config type is not passed to service_advisor during kerberization. If
this is expected then adding a adding a check and ignoring the rest of the
logic will fix it.
For example:
{code:java}
def getServiceConfigurationRecommendations(self, configs, clusterData,
services, hosts):
putCoreSiteProperty = self.putProperty(configs, "core-site", services)
putHdfsSiteProperty = self.putProperty(configs, "hdfs-site", services)
try:
onefs_host = Uri.onefs(services)
putCoreSiteProperty("fs.defaultFS",
Uri.default_fs(services).fix_host(onefs_host))
putHdfsSiteProperty("dfs.namenode.http-address",
Uri.http_namenode(services).fix_host(onefs_host))
putHdfsSiteProperty("dfs.namenode.https-address",
Uri.https_namenode(services).fix_host(onefs_host))
except KeyError as e:
self.logger.info('Skip replacing onefs properties. KeyError: %s' %
e){code}
> ServiceAdvisor KeyError during kerberization of OneFS
> -
>
> Key: AMBARI-23459
> URL: https://issues.apache.org/jira/browse/AMBARI-23459
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-agent
>Affects Versions: 2.7.0
>Reporter: Attila Magyar
>Assignee: Attila Magyar
>Priority: Major
> Fix For: 2.7.0
>
>
> {code:java}
> Error message: Stack Advisor reported an error. Exit Code: 2. Error:
> KeyError: 'onefs'
> StdOut file: /var/run/ambari-server/stack-recommendations/5/stackadvisor.out
>
> StdErr file: /var/run/ambari-server/stack-recommendations/5/stackadvisor.err
>
> Stackadvisor.err shows the following traceback:
>
> 2018-04-03 16:09:09,711 ERROR HDP26StackAdvisor
> getCapacitySchedulerProperties: - Couldn't retrieve 'capacity-scheduler' from
> services.
> Traceback (most recent call last):
> File "/var/lib/ambari-server/resources/scripts/stack_advisor.py", line 167,
> in
> main(sys.argv)
> File "/var/lib/ambari-server/resources/scripts/stack_advisor.py", line 116,
> in main
> result = stackAdvisor.recommendConfigurations(services, hosts)
> File "/var/lib/ambari-server/resources/scripts/../stacks/stack_advisor.py",
> line 1565, in recommendConfigurations
> serviceAdvisor.getServiceConfigurationRecommendations(configurations,
> clusterSummary, services, hosts)
> File
> "/var/lib/ambari-server/resources/stacks/HDP/2.6/services/ONEFS/service_advisor.py",
> line 112, in getServiceConfigurationRecommendations
> onefs_host = Uri.onefs(services)
> File
> "/var/lib/ambari-server/resources/stacks/HDP/2.6/services/ONEFS/service_advisor.py",
> line 41, in onefs
> return self.from_config(configs, 'onefs', 'onefs_host')
> File
> "/var/lib/ambari-server/resources/stacks/HDP/2.6/services/ONEFS/service_advisor.py",
> line 45, in from_config
> return
> Uri(configs['configurations'][config_type]['properties'][property_name])
> KeyError: 'onefs'{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)