ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "who.cat" <who....@qq.com>
Subject agent status_command can not get the component configurations
Date Wed, 22 Feb 2017 09:07:24 GMT
Hi all
Adding a cusom services on Ambari all works well except status checking.The details is the
 agent could not get the component from 
the 'status_params.py' which revoked as  'status_params.config['configurations']['config-name']['atrribute
name'] .The error is :
----------error message start--------------------------
 File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py",
line 95, in format
    return ConfigurationFormatter().format(format_string, args, **result)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py",
line 59, in format
    result_protected = self.vformat(format_string, args, all_params)
  File "/usr/lib64/python2.7/string.py", line 549, in vformat
    result = self._vformat(format_string, args, kwargs, used_args, 2)
  File "/usr/lib64/python2.7/string.py", line 582, in _vformat
    result.append(self.format_field(obj, format_spec))
  File "/usr/lib64/python2.7/string.py", line 599, in format_field
    return format(value, format_spec)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py",
line 73, in __getattr__
    raise Fail("Configuration parameter '" + self.name + "' was not found in configurations
dictionary!")
Fail: Configuration parameter 'config-name' was not found in configurations dictionary!
---------error message end--------------------------
I added a print statement like  'print status_params.config['configurations']['config-name']['atrribute
name']', during the service installation it printed the valued correctly but in the status
check it shows the error above .
My meteainfo.xml had added the the configuation in <configfies>mark ,like this :
<configFiles>
    <configFile>
        <type>xml</type>
        <fileName>config.cnf</fileName>
        <dictionaryName>config.cnf</dictionaryName>
    </configFile>
</configFiles>How can  solve the prolem ,anyone any ideas must be thankful!Best  regards.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message