5.9.3 - concurrent dirinstall problem

andrew bezella <[email protected]>
Newsgroups gmane.linux.debian.fai
Organization internet archive
Message-ID <[email protected]>
hello -

i've been hitting a problem where running two simultaneous dirinstalls
results in one of the /usr/sbin/fai processes (the last to finish)
exiting w/an error code of 1.  this naturally causes our wrapper script
to believe that the install has failed.

in the end, it looks like it is a result of the last few lines:
    354 
    355 [ -L "/var/run/fai/current_config" ] && rm -f "/var/run/fai/current_config"
    356 
    357 exit $final_exit_code

since it is uninitialized and there were no errors in the install
itself, `$final_exit_code` is unset.  *however*, in the case of
concurrent installs the `-L` test fails for any run after the first-
completed as `/var/run/fai/current_config` has been already been
removed.  i believe this leads to the non-zero `exit` (cf. bash(1)).

in earlier versions this was masked by an `echo` immediately preceding
the `exit` but that was removed in commit a3946b9.

it looks like initializing `$final_exit_code` resolves this problem. 
i've submitted a PR with this change.

thank you!

	andy


-- 
andrew bezella <[email protected]>
internet archive
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.