前言:mv -fT
指令执行成功,页面一直在Release
转圈,没有error.log
日志。在shell
中执行相同指令正常。前一天还能正常部署,显示上线完成,也没有修改Release后置任务。
那我们先看下runtime.log的内容:
3f19c24afb104b17ad7d2ab86d749c50: Sending packet MESSAGE data 2/walle,["console",{"data":{"status":0,"host":"192.168.20.233","error":"","user":"root","success":"/opt/release/1_1_20190222_091456\r\n","sequence":5,"cmd":"cd /opt/release && [ -L /opt/webroot ] && readlink /opt/webroot || echo \"\"","stage":"release"},"event":"console"}]
emitting event "console" to 4 [/walle]
3f19c24afb104b17ad7d2ab86d749c50: Sending packet MESSAGE data 2/walle,["console",{"data":{"status":0,"host":"192.168.20.233","error":"","user":"root","success":"","sequence":5,"cmd":"cd /opt/release && ln -sfn /opt/release/1_4_20190222_110119 /opt/release/current-tmp-4","stage":"release"},"event":"console"}]
emitting event "console" to 4 [/walle]
3f19c24afb104b17ad7d2ab86d749c50: Sending packet MESSAGE data 2/walle,["console",{"data":{"status":0,"host":"192.168.20.233","error":"","user":"root","success":"","sequence":5,"cmd":"cd /opt/release && mv -fT /opt/release/current-tmp-4 /opt/webroot","stage":"release"},"event":"console"}]
emitting event "fail" to 4 [/walle]
3f19c24afb104b17ad7d2ab86d749c50: Sending packet MESSAGE data 2/walle,["fail",{"data":{"message":"\u4efb\u52a1\u90e8\u7f72\u5931\u8d25\uff0c\u5df2\u7ec8\u6b62\u3002\u8bf7\u4fee\u590d\u9519\u8bef\u540e\uff0c\u91cd\u65b0\u90e8\u7f72\u3002"},"event":"finish"}]
直觉应该是Release后置任务执行失败的原因。我将Release后置任务第一条命令进行执行:
发现在执行 cd ${CONFIGSPACE} && unzip -q vendor.zip后跳出个询问指令,所以就卡在这里了。处理加上命令rm -rf ${CONFIGSPACE}/vendor 即可