Could replacing a bash script with a new version cause a running instance of the script to fail

前端 未结 4 955
轻奢々
轻奢々 2021-01-03 23:58

I am running bash scripts from java programs on a server. I just uploaded a new version of the script intending the next run of the script to use the version. I did not mean

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 00:34

    Don't update a running system if you can avoid it


    Deleting the script is one thing, but modifying it may produce more "interesting" results.

    Also, changing a file that is replicated and/or network-mounted introduces behavior specific to the filesystem and deployment protocols. These are not going to be modelled accurately by a simple test on a local hard mount or one where a network mount is modified on the same system that is reading the file.

    Furthermore, "uploading" this file to 300 servers introduces all kinds of wonderful complexity that us overflowians probably don't have nearly enough information to analyze.

    ISTM that your issues probably are related to the update. I think the mystery commands may come from bash reading part of a script from the old version and part from the new version. I do know that you should probably shut down the subsystem, if possible, while updating.

提交回复
热议问题