-
Notifications
You must be signed in to change notification settings - Fork 31
Description
While trying to retrieving and modifying 'core-site.xml', it seems ambariclient does not support configurations completely. For e.g., for my hdp named 'cluster' with Ambari host/port as node-1.cluster:8080, issuing this command: ambari.clusters('cluster').configurations('core-site').to_dict() results to a HTTP 404 error as:
>>> ambari.clusters('cluster').configurations('core-site').to_dict()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/ambariclient/base.py", line 494, in to_dict
self.inflate()
File "/usr/local/lib/python3.6/site-packages/ambariclient/base.py", line 611, in inflate
self.load(self.client.get(self.url))
File "/usr/local/lib/python3.6/site-packages/ambariclient/client.py", line 151, in request
handle_response(response)
File "/usr/local/lib/python3.6/site-packages/ambariclient/exceptions.py", line 199, in handle_response
raise cls(**kwargs)
ambariclient.exceptions.NotFound: HTTP request failed for GET http://node-1.cluster:8080/api/v1/clusters/cluster/configurations/core-site: Not found 404:
http://node-1.cluster:8080/api/v1/clusters/cluster/configurations/core-site is not a right call to Ambari, it should resolve to something of "http://node-1.cluster:8080/api/v1/clusters/cluster/configurations?type=core-site" and later to query as "http://node-1.cluster:8080/api/v1/clusters/cluster/configurations?type=core-site&tag=TOPOLOGY_RESOLVED"
With this issue, am hoping that there will be support for retrieving and modifying configurations by type (where type resolves to one of http://node-1.cluster:8080/api/v1/clusters/cluster?fields=Clusters/desired_configs)