docker icon indicating copy to clipboard operation
docker copied to clipboard

-g and --graph flags on dockerd are deprecated in favor of --data-root

Open agarbutt opened this issue 6 years ago • 4 comments

Cookbook version

3.0.0

Chef-client version

12.18

Platform Details

Ubuntu 16.04.3 LTS

Scenario:

Remove warnings of deprecated features from dockerd minimum version 17.05. Disabled by default in version 17.10

See: https://docs.docker.com/engine/deprecated/#-g-and---graph-flags-on-dockerd

Steps to Reproduce:

Install the docker service on the host with a graph value defined.

docker_service 'default' do
  graph '/opt/docker-graph'
  action [:create, :start]
end

On the converged host, login, use the command journalctl -xe | grep deprecated

Expected Result:

No warnings from dockerd.

Actual Result:

Entry in systemd journal with the message from the dockerd "The \"-g / --graph\" flag is deprecated. Please use \"--data-root\" instead"

agarbutt avatar Jan 12 '18 19:01 agarbutt

Fixed in https://github.com/chef-cookbooks/docker/pull/958/commits/72edd8dbcd8321aff76031c2c1acedd6668e0d48

tas50 avatar Jan 14 '18 19:01 tas50

The removal of --graph has broken the docker version that is provided by RHEL/CentOS 7, I'd suggest some logic in there instead of just dropping the flag. Unless the intent is not to support the built in version of docker on CentOS.

erinn avatar Jan 17 '18 16:01 erinn

Still broken for CentOS 7, any work around?

binlialfie avatar Mar 16 '18 15:03 binlialfie

This also breaks any RHEL 6 installations, since the latest Docker version for this is 1.7.1 which only supports "--graph". As a workaround I use this:

if node['platform_version'].start_with?('7')
  data_root '/docker'
elsif node['platform_version'].start_with?('6')
  misc_opts '--graph=/docker'
end

joerg avatar May 14 '18 11:05 joerg