-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40080/
-----------------------------------------------------------
(Updated Nov. 13, 2015, 1:56 p.m.)
Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, Jayush Luniya,
and Sid Wagle.
Bugs: AMBARI-13748
https://issues.apache.org/jira/browse/AMBARI-13748
Repository: ambari
Description
-------
Need a way for Ambari to trigger a repository clean (yum clean expire-cache on
rhel, for example) when updating repository files during an Ambari update as
well as fresh installation of a cluster.
Currently, this must be done occasionally through a manual step, and if not
done will lead to problems during install.
Diffs (updated)
-----
ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml
e725d68
ambari-server/src/main/resources/custom_actions/scripts/clear_repocache.py
PRE-CREATION
ambari-server/src/test/python/custom_actions/TestClearRepoCache.py
PRE-CREATION
Diff: https://reviews.apache.org/r/40080/diff/
Testing
-------
New unit test. Patch cluster with the changes and run fresh install and rolling
upgrade to verify the repo clean up logic was run.
New unit test for custom action code change. Also test the custom action by
REST API call
curl -u admin:admin -H "X-Requested-By: admin" -X POST
-d'{"RequestInfo":{"context":"clear repo cache test", "action" :
"clear_repocache"},
"Requests/resource_filters":[{"hosts":"agent.mydomain.com"}]}'
http://server.mydomain.com:8080/api/v1/clusters/bi/requests
Thanks,
Di Li