You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2015/02/06 04:35:29 UTC
Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due to
path error with import
-----------------------------------------------------------
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
Re: Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due
to path error with import
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30708/#review71565
-----------------------------------------------------------
Ship it!
Ship It!
- Jonathan Hurley
On Feb. 6, 2015, 8:16 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30708/
> -----------------------------------------------------------
>
> (Updated Feb. 6, 2015, 8:16 p.m.)
>
>
> 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
> ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py PRE-CREATION
> ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json PRE-CREATION
>
> 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
>
>
Re: Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due
to path error with import
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30708/#review71637
-----------------------------------------------------------
Ship it!
Ship It!
- Tom Beerbower
On Feb. 7, 2015, 1:16 a.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30708/
> -----------------------------------------------------------
>
> (Updated Feb. 7, 2015, 1:16 a.m.)
>
>
> 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
> ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py PRE-CREATION
> ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json PRE-CREATION
>
> 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
>
>
Re: Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due
to path error with import
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30708/#review71632
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On Feb. 6, 2015, 8:16 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30708/
> -----------------------------------------------------------
>
> (Updated Feb. 6, 2015, 8:16 p.m.)
>
>
> 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
> ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py PRE-CREATION
> ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json PRE-CREATION
>
> 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
>
>
Re: Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due
to path error with import
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30708/
-----------------------------------------------------------
(Updated Feb. 7, 2015, 1:16 a.m.)
Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Tom Beerbower, and Yurii Shylov.
Changes
-------
Added unit test.
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 (updated)
-----
ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py 02c449f
ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py PRE-CREATION
ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json PRE-CREATION
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
Re: Review Request 30708: RU - Prepare Namenode fails on Ubuntu12 due
to path error with import
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30708/#review71424
-----------------------------------------------------------
ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
<https://reviews.apache.org/r/30708/#comment117181>
Please add a unit test. I know there isn't one currently, but there should be.
- Nate Cole
On Feb. 5, 2015, 10:35 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30708/
> -----------------------------------------------------------
>
> (Updated Feb. 5, 2015, 10:35 p.m.)
>
>
> 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
>
>