Pivotal Knowledge Base

Follow

Restarting the HDB cluster via Ambari rolls back the changes made by "hawq config"

Environment

Product Version
Pivotal HDB 2.x
OS RHEL 6.x
Others  

Symptom

Changes made to the system parameters via "hawq config" are rolled back after the HDB cluster is restarted through Ambari web console.

Cause

HDB system configuration file is overwritten by Ambari agent.

RCA

From HDB 2.0, system parameters will be saved to $GPHOME/etc/hawq-site.xml first. So that "hawq config" will modify the system parameter in this file. 

However, when HDB cluster is started through Ambari web console, the Ambari agent will check if the content of hawq-site.xml on each HDB segment host matches the content saved in the Ambari database. If not, it will overwrite the contents of hawq-site.xml with the contents present in its database.

This is shown  in the Ambari logs below:

2016-09-27 14:27:06,169 - XmlConfig['hawq-site.xml'] {'group': 'gpadmin', 'conf_dir': '/usr/local/hawq/etc/', 'mode': 0644, 'configuration_attributes': {}, 'owner': 'gpadmin', 'configurations': ...}
2016-09-27 14:27:06,180 - Generating config: /usr/local/hawq/etc/hawq-site.xml
2016-09-27 14:27:06,180 - File['/usr/local/hawq/etc/hawq-site.xml'] {'owner': 'gpadmin', 'content': InlineTemplate(...), 'group': 'gpadmin', 'mode': 0644, 'encoding': 'UTF-8'}
2016-09-27 14:27:06,197 - Writing File['/usr/local/hawq/etc/hawq-site.xml'] because contents don't match
2016-09-27 14:27:06,197 - Changing permission for /usr/local/hawq/etc/hawq-site.xml from 664 to 644

Resolution

If HDB cluster is managed by Ambari, avoid using "hawq config", instead modify system parameters on Ambari web console as illustrated below:

Ambari web console -> Services -> HAWQ -> Configs -> Advanced -> "Advanced hawq-site" (Or "Custom hawq-site")

 

Comments

Powered by Zendesk