This prevents a race condition where the kernel launch process is attempting to read the connection file, and we overwrite the file while it is being read. The symptom is that the kernel fails to start because it cannot decode the JSON in the connection file.
We should backport this fix to 7.x, but I think for 8.x we should change it so that the provisioner is entirely responsible for the handling of the connection file, even if the information lives on the kernel manager. Nothing would change for the local provisioner.
cc @kevin-bates
This prevents a race condition where the kernel launch process is attempting to read the connection file, and we overwrite the file while it is being read. The symptom is that the kernel fails to start because it cannot decode the JSON in the connection file.
We should backport this fix to 7.x, but I think for 8.x we should change it so that the provisioner is entirely responsible for the handling of the connection file, even if the information lives on the kernel manager. Nothing would change for the local provisioner.