Bug 1832301 - service fail to start "error initializing graphdriver"
Summary: service fail to start "error initializing graphdriver"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: moby-engine
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Olivier Lemasle
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-06 13:52 UTC by Remi Collet
Modified: 2020-05-23 02:50 UTC (History)
1 user (show)

Fixed In Version: moby-engine-19.03.8-2.ce.gitafacb8b.fc32 moby-engine-19.03.8-2.ce.gitafacb8b.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-23 02:43:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Remi Collet 2020-05-06 13:52:26 UTC
Using moby-engine-19.03.8-1.ce.gitafacb8b.fc31.x86_64

Trying to start the service, in system log

May  6 15:35:24 builder dockerd[4577]: failed to start daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: devicemapper, overlay2; Please c
<RemiFedora> leanup or explicitly choose storage driver (-s <DRIVER>)


Indeed, after adding "--storage-driver overlay2 \" in /etc/sysconfig/docker, service start


So

- why this error, shouldn't this work out of the box with default config ?

- what is the proper value ?



P.S. and no, I don't plan to switch to podman, to much perm issues for now.

Comment 1 Olivier Lemasle 2020-05-06 18:54:46 UTC
Hi Rémi,

Did you upgrade from another installation? Or did you previously use devicemapper?

The default storage driver is "overlay2", and it is the storage driver Docker recommands for Fedora (https://docs.docker.com/storage/storagedriver/select-storage-driver/).

However, it seems that if you previously used devicemapper, you'll still have its configuration and you'll get this error:
- https://github.com/moby/moby/issues/22685
- https://stackoverflow.com/questions/45103803/not-able-to-start-docker-on-ubuntu-16-04-2-lts-error-initializing-graphdriver


I reproduced the issue with the following steps:

1. Initial state:
  - default /etc/sysconfig/docker (no explicit --storage-driver)
  - Overlay2 is used:

    # docker system info | grep "Storage Driver"
     Storage Driver: overlay2

2. Add "--storage-driver devicemapper" to /etc/sysconfig/docker
3. Restart docker service

   The devicemapper driver is used; a warning is printed:

    # docker system info | grep "Storage Driver"
    WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release.
    WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
             Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
     Storage Driver: devicemapper

4. Restore default /etc/sysconfig/docker (no explicit --storage-driver)
5. Try restarting docker service.

  It fails with "/var/lib/docker contains several valid graphdrivers: overlay2, devicemapper"

6. Add "--storage-driver overlay2" to /etc/sysconfig/docker
7. Restart docker service. Docker service starts without failure, and uses overlay2.


As overlay2 is already the recommended storage driver, it seems safe to add it to /etc/sysconfig/docker in package moby-engine.

Comment 2 Remi Collet 2020-05-07 09:43:49 UTC
> Hi Rémi,

Simply "Remi" ;)   (no accent here in Reims)

> Did you upgrade from another installation?

Yes, this is an old installation yearly upgraded from F 23 to F31

> Or did you previously use devicemapper?

No, never changed anything (excepted the systemd.unified_cgroup_hierarchy=0 in grub config)

> As overlay2 is already the recommended storage driver, it seems safe to add it to /etc/sysconfig/docker in package moby-engine.

I agree

Comment 3 Fedora Update System 2020-05-07 19:16:05 UTC
FEDORA-2020-dae86c0820 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-dae86c0820

Comment 4 Fedora Update System 2020-05-07 19:17:11 UTC
FEDORA-2020-a658d9abde has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a658d9abde

Comment 5 Fedora Update System 2020-05-08 04:10:12 UTC
FEDORA-2020-a658d9abde has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-a658d9abde`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a658d9abde

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-05-08 05:08:58 UTC
FEDORA-2020-dae86c0820 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-dae86c0820`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-dae86c0820

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-05-23 02:43:52 UTC
FEDORA-2020-a658d9abde has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2020-05-23 02:50:41 UTC
FEDORA-2020-dae86c0820 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.