Support Questions
Find answers, ask questions, and share your expertise

How can I remove a non-custom configuration parameter from a service in Ambari?

Solved Go to solution

How can I remove a non-custom configuration parameter from a service in Ambari?

Specifically, I am trying to remove the spark.yarn.principal and spark.yarn.keytab parameters from a configuration group so my Livy server can run successfully. I've been able to manually copy the configs, remove these parameters, and point Livy at the custom configs and everything works. Simply setting them to be empty strings does not work, they need to be fully removed. I would like Ambari to manage this instead of being something I have to keep in-sync if more spark configs change. Is there a way to do this either via the UI or down in the internals of Ambari?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How can I remove a non-custom configuration parameter from a service in Ambari?

Expert Contributor
@Brandon Wilson
How can I remove a non-custom configuration parameter from a service in Ambari

This is not possible to do solely via UI bit can be achieved with few manual steps

Solution:

Step1:

Use configs.sh script provided on ambari-server host at location /var/lib/ambari-server/resources/scripts/configs.sh to delete a config property from a configuration file being managed and saved by Ambari in it's database

Step2:

Also remove those properties from static configuration file packaged with the service definition used by the stack that is deployed. This can be found at ambari-server host at location /var/lib/ambari-server/resources/common-services/ or inside stack located at /var/lib/ambari-server/resources/stacks/HDP/{version_name}/services/SPARK/configurations/*

Step3:

Restart ambari server process: ambari-server restart

@Brandon Wilson if this is a valid use case that you feel should be addressed rather that doing a wrokaround than please create Apache Ambari Jira for this issue explaining your use-case. so someone can look into it and fix it in upcoming version of Ambari

Also the two properties that you mentioned spark.yarn.principal and spark.yarn.keytab does not seem to be defined in the stack making them custom properties. can you please confirm your ambari version and under what section are these properties being exposed on service config page ?

View solution in original post

1 REPLY 1

Re: How can I remove a non-custom configuration parameter from a service in Ambari?

Expert Contributor
@Brandon Wilson
How can I remove a non-custom configuration parameter from a service in Ambari

This is not possible to do solely via UI bit can be achieved with few manual steps

Solution:

Step1:

Use configs.sh script provided on ambari-server host at location /var/lib/ambari-server/resources/scripts/configs.sh to delete a config property from a configuration file being managed and saved by Ambari in it's database

Step2:

Also remove those properties from static configuration file packaged with the service definition used by the stack that is deployed. This can be found at ambari-server host at location /var/lib/ambari-server/resources/common-services/ or inside stack located at /var/lib/ambari-server/resources/stacks/HDP/{version_name}/services/SPARK/configurations/*

Step3:

Restart ambari server process: ambari-server restart

@Brandon Wilson if this is a valid use case that you feel should be addressed rather that doing a wrokaround than please create Apache Ambari Jira for this issue explaining your use-case. so someone can look into it and fix it in upcoming version of Ambari

Also the two properties that you mentioned spark.yarn.principal and spark.yarn.keytab does not seem to be defined in the stack making them custom properties. can you please confirm your ambari version and under what section are these properties being exposed on service config page ?

View solution in original post