[Bug]: One SPS deployment can accidentally execute another SPS deployments deployed process containers #230
Description
Checked for duplicates
Yes - I've already checked
Describe the bug
When a process with the same id and processVersion is deployed at different times on two different SPS systems it can cause the first SPS system deployed to execute the second SPS system's process instead of it' own.
This is because the two SPS systems share an image repository, so they can overwrite each other's process images. This becomes an issue when workers from the first SPS system to deploy don't have the image downloaded locally before the second SPS system overwrites it in the remote image repository.
What did you expect?
The workers in the first SPS system should run the process deployed to the first SPS system, not the process deployed to the second SPS system.
Reproducible steps
- Deploy two instances of SPS or have two instances of SPS deployed, deployment A and deployment B
- Deploy a process, process-id:tag through deployment A's WPS-T server
- Use
kubectl exec
to log into the WPS-T server container - Run
docker image ls
and note the image id of the deployed process - Ensure these process images don't exist on deployment A's verdi workers by using a fresh worker deployment or manually removing images with
docker image rm - f {image id}
- Deploy the same process with the same id and tag, process-id:tag, to deployment B's WPS-T server
- Repeat steps 3 & 4 for the WPS-T server in deployment B, noting the image id of the deployed process
- Send a job execution request to the process-id:tag WPS-T process endpoint of deployment A, note the job id
- Find the verdi worker that executed the job by using
kubectl exec
and searching for the job id in the verdi worker logs - Run
docker image ls
and see that the image id of the process images matches deployment B's image id, not deployment A's image id as it should.