-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38927/
-----------------------------------------------------------
Review request for Ambari and Jaimin Jetly.
Bugs: AMBARI-13211
https://issues.apache.org/jira/browse/AMBARI-13211
Repository: ambari
Description
-------
For a cluster with existing folders such as /etc/oozie,on the cluster install
wizard, the first run of the host check after registering the Ambari agent may
not show any warnings about existing folders. If user reruns the checks, the UI
then shows warnings about existing folders in the cluster.
Details about the issue:
The Ambari UI submits a rest api call to have the Ambari agent run the
check_host.py script for various host details. Once the Ambari UI obtains the
check result, it However uses very little of it, and discards most of the host
check results. UI then submits the /hosts REST API to pull the host detail
again, which is then uses to populate the host check result UI page.
Immediately after host registration, the JSON string returned by /hosts has a
mostly empty last_agent_env section. Therefore the UI doesn't show any warnings
for existing alternative, dirs, etc.
The /hosts rest API call is still necessary as the check_host call does not
provide host disk space info. But the majority of the info should have been
from the check_host.py script result.
Details about the fix
The fix proposed here is to parse the check_host.py script result for most of
the host check warnings. Then use info in the /hosts rest API call for warnings
like host disk space.
Diffs
-----
ambari-server/src/main/resources/custom_actions/scripts/check_host.py 9aa3afb
ambari-web/app/controllers/wizard/step3_controller.js 054a364
ambari-web/test/controllers/wizard/step3_test.js aad0509
Diff: https://reviews.apache.org/r/38927/diff/
Testing
-------
1. Added new unit test to step3_tests.js to test
ambari-web\app\controllers\wizard\step3_controller.js.
2. Run install, verify the check results showed the existing dirs,
alternatives, etc.
Thanks,
Di Li