----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30708/ -----------------------------------------------------------
Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Tom Beerbower, and Yurii Shylov. Bugs: AMBARI-9507 https://issues.apache.org/jira/browse/AMBARI-9507 Repository: ambari Description ------- Prepare namenode failed during RU on Ubuntu12, retry does not help. This is because ru_execute_task.py calls python directly, instead of the python wrapper that appends several other directories to the PYTHONPATH environment variable, which is needed by the module imports. ``` 2015-02-03 03:11:47,374 - Task. Type: EXECUTE, Script: scripts/namenode.py - Function: prepare_rolling_upgrade 2015-02-03 03:11:47,395 - call['python /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py prepare_rolling_upgrade /var/lib/ambari-agent/data/command-274.json /var/lib/ambari-agent/cache/custom_actions /var/lib/ambari-agent/data/structured-out-274.json INFO /var/lib/ambari-agent/data/tmp'] {} 2015-02-03 03:11:47,451 - Command: python /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py prepare_rolling_upgrade /var/lib/ambari-agent/data/command-274.json /var/lib/ambari-agent/cache/custom_actions /var/lib/ambari-agent/data/structured-out-274.json INFO /var/lib/ambari-agent/data/tmp Code: 1, Out: Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py", line 24, in <module> from resource_management import * ImportError: No module named resource_management 2015-02-03 03:11:47,452 - Error while executing command 'actionexecute': Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 184, in execute method(env) File "/var/lib/ambari-agent/cache/custom_actions/scripts/ru_execute_tasks.py", line 146, in actionexecute raise Fail(out) Fail: Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py", line 24, in <module> from resource_management import * ImportError: No module named resource_management ``` Diffs ----- ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py 02c449f Diff: https://reviews.apache.org/r/30708/diff/ Testing ------- Verified that this works during a Rolling Upgrade on an Ubuntu cluster. Unit tests are in progress. Thanks, Alejandro Fernandez