ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Fernandez <>
Subject Re: Script.get_config() doesn't load the configuratoin files when run inside the method
Date Wed, 22 Jul 2015 18:30:29 GMT
Christian, you can first check if the "my-site" (or appropriate) section was included in the
command-*.json file for that command, by checking inside /var/lib/ambari-agent/data
If it's not, then the config "my-site" needs to be a dependency inside the service's metainfo.xml
file. Does it work when calling another service's config() method?
If the config is already in the dependency section of the metainfo.xml file, then try debugging
the java side.


From: Christian Tzolov <<>>
Reply-To: "<>" <<>>
Date: Wednesday, July 22, 2015 at 9:12 AM
To: "<>" <<>>
Subject: Script.get_config() doesn't load the configuratoin files when run inside the

(i'd wrongly posted this question to the dev list instead of asking here - sorry for the noise)

Hi fellows,

I'm working on a simple Service extension for Ambari 1.7.

It looks like the Script.get_config() does not initialize the config files (e.g. my-site.xml)
defined in the metainfo.xml, when the get_config is called inside the "status" method of the
master script.

An attempt to access the config['configuration']['my-site'] inside the status method throws
the following error:
>>> Configuration parameter \'my-site\' was not found in configurations dictionary!'

But the same configuration properties are accessible inside the  "initialize", "start" and
"stop" methods.

Is there something special for the 'status' method initialization or am i overlooking some
important detail?

Would appreciate and ideas/advices. Also I can share the problem source code if needed


Christian Tzolov<> | Solution Architect, EMEA Practice
Team | Pivotal<><>|+31610285517

View raw message