You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Scott Duan (JIRA)" <ji...@apache.org> on 2018/06/26 17:16:00 UTC

[jira] [Resolved] (AMBARI-23797) Handle null values for configurations in the Execution Command API

     [ https://issues.apache.org/jira/browse/AMBARI-23797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Duan resolved AMBARI-23797.
---------------------------------
    Resolution: Fixed

> Handle null values for configurations in the Execution Command API
> ------------------------------------------------------------------
>
>                 Key: AMBARI-23797
>                 URL: https://issues.apache.org/jira/browse/AMBARI-23797
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Scott Duan
>            Assignee: Scott Duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> /var/lib/ambari-agent/cache/cluster_cache/configurations.json
> {noformat}
> "zookeeper-env": {
>  "content": "\nexport JAVA_HOME=\{{java64_home}}\nexport ZOOKEEPER_HOME=\{{zk_home}}\nexport ZOO_LOG_DIR=\{{zk_log_dir}}\nexport ZOOPIDFILE=\{{zk_pid_file}}\nexport SERVER_JVMFLAGS=\{{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n\{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config=\{{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config=\{{zk_client_jaas_file}}\"\n\{% endif %}",
>  "zk_server_heapsize": "1024m",
>  "zk_user": "zookeeper",
>  "zookeeper_keytab_path": null,
>  "zk_log_dir": "/var/log/zookeeper",
>  "zookeeper_principal_name": null,
>  "zk_pid_dir": "/var/run/zookeeper"
>  }
> {noformat}
> Related code
> params.py
> {noformat}
> zk_principal_name = module_configs.get_property_value(module_name, 'zookeeper-env', 'zookeeper_principal_name', 'zookeeper@EXAMPLE.COM')
> zk_principal = zk_principal_name.replace('_HOST', hostname.lower())
> {noformat}
> the api only picks up the default when no key exists
> if zookeeper_principal_name does not exist
> it will return default value
> but now zookeeper_principal_name maps to value null
> so api thinks null is a valid value



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)