Skip to content
This repository has been archived by the owner. It is now read-only.

Downgrading docker 17.xx -> 1.12 should not be a delayed timebomb, but an immediate explosion #2196

euank opened this issue Oct 14, 2017 · 0 comments


Copy link

@euank euank commented Oct 14, 2017


We're implementing a mechanism to allow selecting an older version of Docker (more news on that soon(tm)).
Since Docker doesn't support downgrading of the daemon's data, we also recommend deleting /var/lib/docker as part of the downgrade process.

This is all well and good, but there's a caveat...


The following sequence of events leads to a timebomb:

  1. Launch with 17.xx and run a container; this creates /var/lib/docker/overlay2
  2. Downgrade without(!) deleting /var/lib/docker
  3. Run a container; 1.12 creates /var/lib/docker/overlay and runs with it
  4. Restart docker; 1.12 now will complain that both overlay and overlay2 are present and fail 💥

This is especially bad since significant time could pass between 2. and 3., leading this to be a timebomb.


Since the only way to get into this situation is by doing something inherently broken (downgrading docker without removing its data), the failure is expected.
It shouldn't be delayed though.

The best solution is simply to ensure that the initial launch, step 3., fails noisily as soon as it recognizes that it would create a second graphdriver.

Alternate solutions

Letting 1.12 use overlay2 if it's already present is an alternate solution to this specific instance of the downgrade problem.
However, the general problem of downgrading not being supported is still true, and this papers over it.
If a user wishes to risk her luck with re-using the overlay2 directory, she may easily enough configure the storage driver to overlay2 via the daemon flag for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.