mirror of
https://github.com/docker/compose.git
synced 2026-11-17 13:45:39 +00:00
servicesUsingVolume only matched services mounting the volume directly, so a service reaching it through volumes_from was not stopped/removed before RemoveVolume. Docker materializes the inherited mount on the consumer's container, so its removal would fail with "volume in use". Compute the transitive volumes_from closure so every container referencing the volume is removed first. (network_mode/ipc/pid: service:x share namespaces, not mounts, and are intentionally excluded.) Also reassign the result of Labels.Add in createVolume: it mutates in place only when the map is non-nil, so discarding the return would drop the config-hash label for a volume with no CustomLabels. Addresses review feedback: documents why observed.Containers is cleared without touching the observedContainersByService hashing snapshot, and strengthens the cascade tests to assert the full plan ordering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| api | ||
| bridge | ||
| compose | ||
| dryrun | ||
| e2e | ||
| mocks | ||
| remote | ||
| utils | ||
| watch | ||