我正在与pssh并行运行一些ssh命令。除非使用以下特定命令,否则此方法工作正常:
pssh -h pssh-hosts -l root -t 45 -i "pip install --upgrade pip"
结果总是这样的超时:
[1] 15:23:42 [FAILURE] host1 Timed out, Killed by signal 9
[2] 15:23:42 [FAILURE] host2 Timed out, Killed by signal 9
[3] 15:23:42 [FAILURE] host3 Timed out, Killed by signal 9
似乎pip install --upgrade <package_name>
不能正确返回退出代码。该命令(如果在主机上本地执行)可以正常工作:
root@host1 [~]$ pip install --upgrade pip
Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (18.1)
有人知道如何解决吗?
非常感谢!