R CMD BATCH script.R ,通过 fabric 运行() 执行永远不会退出
R CMD BATCH script.R ,execution via fabric run() never exits
我用 boto 编写了一个 fabric 脚本来在 AWS 实例上安装 R 应用程序。软呢帽 23
所有使用 运行 和 sudo 功能的命令都按预期执行,
除了这个:
@parallel
def install_DvD():
# with settings(hide('warnings', 'running', 'stdout', 'stderr'), warn_only=True):
cmd0 = 'R CMD BATCH %s/DvDdependencies.R' % (DvDpackage_location)
run(cmd0)
如您所见,我尝试使用 'warn_only=true',但没有帮助。安装成功完成,没有错误,我通过登录实例并查看 DvDdependencies.Rout 文件手动检查。
我认为出于我不了解的原因,R CMD BATCH 命令不会 return 执行返回结构。
在我的本地系统上 Ctrl^c 结构进程的回溯输出是:
[ec2-54-172-154-181.compute-1.amazonaws.com] run: R CMD BATCH ~/DvDdependencies.R
[ec2-54-165-109-62.compute-1.amazonaws.com] run: R CMD BATCH ~/DvDdependencies.R
^C
Stopped.
!!! Parallel execution exception under host u'ec2-54-165-109-62.compute-1.amazonaws.com':
!!! Parallel execution exception under host u'ec2-54-172-154-181.compute-1.amazonaws.com':
Process ec2-54-172-154-181.compute-1.amazonaws.com:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
Process ec2-54-165-109-62.compute-1.amazonaws.com:
self._target(*self._args, **self._kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 242, in inner
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
submit(task.run(*args, **kwargs))
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/decorators.py", line 181, in inner
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 242, in inner
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/fabfile.py", line 70, in install_DvD
run(cmd0)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/network.py", line 649, in host_prompting_wrapper
submit(task.run(*args, **kwargs))
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/decorators.py", line 181, in inner
return func(*args, **kwargs)
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 1056, in run
File "/home/eyebell/local_bin/healX/DvD-installation/fabfile.py", line 70, in install_DvD
run(cmd0)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/network.py", line 649, in host_prompting_wrapper
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 1056, in run
shell_escape=shell_escape)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 925, in _run_command
stderr=stderr, timeout=timeout)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 811, in _execute
time.sleep(ssh.io_sleep)
KeyboardInterrupt
shell_escape=shell_escape)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 925, in _run_command
stderr=stderr, timeout=timeout)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 811, in _execute
time.sleep(ssh.io_sleep)
KeyboardInterrupt
完整的脚本在我的github repo,
DvDdependencies.R(我要安装的脚本)的位置
任何意见、帮助或正确方向的指示都将不胜感激。
我正在关闭它,因为问题只出在这个脚本上。
还更新了 DVD 工具的安装方法,
因此这不再令人感兴趣了。
我用 boto 编写了一个 fabric 脚本来在 AWS 实例上安装 R 应用程序。软呢帽 23
所有使用 运行 和 sudo 功能的命令都按预期执行,
除了这个:
@parallel
def install_DvD():
# with settings(hide('warnings', 'running', 'stdout', 'stderr'), warn_only=True):
cmd0 = 'R CMD BATCH %s/DvDdependencies.R' % (DvDpackage_location)
run(cmd0)
如您所见,我尝试使用 'warn_only=true',但没有帮助。安装成功完成,没有错误,我通过登录实例并查看 DvDdependencies.Rout 文件手动检查。 我认为出于我不了解的原因,R CMD BATCH 命令不会 return 执行返回结构。
在我的本地系统上 Ctrl^c 结构进程的回溯输出是:
[ec2-54-172-154-181.compute-1.amazonaws.com] run: R CMD BATCH ~/DvDdependencies.R
[ec2-54-165-109-62.compute-1.amazonaws.com] run: R CMD BATCH ~/DvDdependencies.R
^C
Stopped.
!!! Parallel execution exception under host u'ec2-54-165-109-62.compute-1.amazonaws.com':
!!! Parallel execution exception under host u'ec2-54-172-154-181.compute-1.amazonaws.com':
Process ec2-54-172-154-181.compute-1.amazonaws.com:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
Process ec2-54-165-109-62.compute-1.amazonaws.com:
self._target(*self._args, **self._kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 242, in inner
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
submit(task.run(*args, **kwargs))
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/decorators.py", line 181, in inner
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 242, in inner
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/fabfile.py", line 70, in install_DvD
run(cmd0)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/network.py", line 649, in host_prompting_wrapper
submit(task.run(*args, **kwargs))
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/decorators.py", line 181, in inner
return func(*args, **kwargs)
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 1056, in run
File "/home/eyebell/local_bin/healX/DvD-installation/fabfile.py", line 70, in install_DvD
run(cmd0)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/network.py", line 649, in host_prompting_wrapper
return func(*args, **kwargs)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 1056, in run
shell_escape=shell_escape)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 925, in _run_command
stderr=stderr, timeout=timeout)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 811, in _execute
time.sleep(ssh.io_sleep)
KeyboardInterrupt
shell_escape=shell_escape)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 925, in _run_command
stderr=stderr, timeout=timeout)
File "/home/eyebell/local_bin/healX/DvD-installation/py2fabvirt/lib/python2.7/site-packages/fabric/operations.py", line 811, in _execute
time.sleep(ssh.io_sleep)
KeyboardInterrupt
完整的脚本在我的github repo, DvDdependencies.R(我要安装的脚本)的位置
任何意见、帮助或正确方向的指示都将不胜感激。
我正在关闭它,因为问题只出在这个脚本上。 还更新了 DVD 工具的安装方法, 因此这不再令人感兴趣了。