ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmytro Sen" <d...@hortonworks.com>
Subject Re: Review Request 18211: Actual configs not updated after restart of host component
Date Wed, 19 Feb 2014 18:14:31 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18211/
-----------------------------------------------------------

(Updated Feb. 19, 2014, 6:14 p.m.)


Review request for Ambari, Nate Cole and Sid Wagle.


Bugs: AMBARI-4708
    https://issues.apache.org/jira/browse/AMBARI-4708


Repository: ambari


Description
-------

Updated HDFS configs aren't applied after RESTART.

Steps:

- On a 3 node cluster, create a ConfigGroup for datanode.
- Override heap size to 1025m instead of 1024m
- Restart DN.

Result:
- The /var/lib/ambari-agent/data/config.json, has the correct values for the config type:
{code}
"global": {"2": "version1392171779044", "tag": "version1"}
{code}
- The API call still shows global as default version:
{code}
http://hostname1:8080/api/v1/clusters/c1/hosts/hostname1/host_components/DATANODE
{code} 

Note:
It works after agent is restarted.

{code}
{
global: {
overrides: {
2: "version1392171779044"
},
default: "version1"
}
{code}

The cause is that hooks aren't executed for the custom_command like RESTART. Since configs
for HDFS are generated in hook.py, we must execute hook.py before custom commands or move
config generation from hook.py.


Diffs
-----

  ambari-agent/src/main/python/resource_management/libraries/script/hook.py c5cae63 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
7f2d1fb 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
a6e52b0 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
d607eb4 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py PRE-CREATION

  ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py 0b62c87

  ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py PRE-CREATION

  ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py 3239c7a


Diff: https://reviews.apache.org/r/18211/diff/


Testing
-------

1 Unit test failed, as it was before applying the patch.

Tests in error: 
  testDeleteUsers(org.apache.ambari.server.controller.AmbariManagementControllerTest): Could
not remove user user1. System should have at least one user with administrator role.

Tests run: 1401, Failures: 0, Errors: 1, Skipped: 7


Thanks,

Dmytro Sen


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message