rancher: Upgrading service should not result in loss of volume data
Rancher Version: rancher/server:v1.1.0-dev3 rancher/agent:v1.0.1 rancher/agent-instance:v0.8.1 rancher-compose-v0.8.2
Docker Version: 1.10.3
Steps to Reproduce:
Given the docker-compose.yml:
test:
tty: true
image: ubuntu:14.04.3
stdin_open: true
volumes:
- /opt/mount
Run:
$ rancher-compose up
Exec into the created container and run:
$ touch /opt/mount/data.txt
Edit docker-compose.yml changing image to ubuntu:14.04.4
Run:
$ rancher-compose up --upgrade $ rancher-compose up --upgrade --confirm-upgrade
Exec into the created container and run:
$ cat /opt/mount/data.txt
Results:
cat: /opt/mount/data.txt: No such file or directory
Expected: The data should not be lost.
The volume should be re-used for the replacement container. Specifically, the new container should be created using the existing container volume as named volume.
For example: Given that the previous container had the volume named 9f411c6...87210 mounted in /opt/mount, then the new container should be created with the named volume 9f411c6...87210:/opt/mount.
Additionally, the new container would need to be scheduled to the host that has the previous container.
Reference for how this works in in docker-compose: https://github.com/docker/compose/pull/2934 https://github.com/docker/libcompose/pull/89
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 26
A data loss in a productive environment is a total dealbreaker for Rancher