Bug 1475626

Summary: Change the default storage driver to overlay2
Product: Red Hat Enterprise Linux 7 Reporter: Ben Breard <bbreard>
Component: container-storage-setupAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED CURRENTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: cevich, jlebon, lfriedma, lmiksik, lsm5, miabbott, mjenner, pasik, pthomas, vgoyal, walters, wmeng
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: container-storage-setup-0.9.0-1.rhel75.gite0997c3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1505621 (view as bug list) Environment:
Last Closed: 2020-05-05 14:37:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1505621    
Bug Blocks: 1477926    

Description Ben Breard 2017-07-27 03:06:39 UTC
Description of problem:

Atomic Host currently defaults to devicemapper as the storage driver for docker. This needs to change to overlay2.

Version-Release number of selected component (if applicable):

7.5


Additional info:

Comment 3 Colin Walters 2017-11-02 17:23:18 UTC
So one thing I need to understand here - are we going to change what `docker` does by default for 7.5 or not?  @rhvgoyal said to me something of the form "let's do kernel version checks"?  Would we have something like

STORAGE_DRIVER=overlay-if-7.5
?

Comment 4 Colin Walters 2017-11-02 17:24:39 UTC
Alternatively of course we could just have separate 7.4 and 7.5 builds of docker, and anyone who does `yum update` on Extras without doing Server too is just broken?

Comment 5 Colin Walters 2017-11-02 18:17:13 UTC
We had a long chat about this on IRC; one foundational question here - is it PM's intention that this change *also* happens for yum-based RHEL?  I'm assuming it is.

<vgoyal> walters: I think there is a problem there too. People might have assumed that default graph driver is devicemapper and specified put in other variables which are devicemapper specific.
<vgoyal> walters: so we will have to make sure that there are no devicemapper specific knobs in /etc/sysconfig/docker-storage-setup before we decide to switch to overlay2
<vgoyal> walters: also we might break a system which assumes that devicemapper is default. Over upgrade to css, they might suddenly see overlay2 as default.

Comment 7 Ben Breard 2017-11-13 17:25:37 UTC
Colin,

Sorry I missed your question here. Yes, both RHEL & AH should be consistent with the defaults. I think it's best for new installs (yum & rpm-ostree) to default to overlay2, but for upgraded systems to continue as they were already configured (dm or whatever). After reading the PR, it seems like you guys came to the same conclusion.

Comment 10 Colin Walters 2018-01-11 20:58:21 UTC
http://pkgs.devel.redhat.com/cgit/rpms/docker/commit/?h=extras-rhel-7.5&id=8e8beddbf87d3b44410dbf05f23d743a3213800e]
Broke this for Atomic Host, because this runs on the *build* server side, and that introduces a dependency on the host filesystem type.

So...one idea is instead of doing this in docker's `%posttrans`, we do it on startup of container-storage-setup.

@vivek: Any reason you can think of that wouldn't work.

Comment 11 Colin Walters 2018-01-11 21:45:54 UTC
See also https://code.engineering.redhat.com/gerrit/#/c/127456/2 for the kickstart side.

Comment 12 Vivek Goyal 2018-01-12 13:43:26 UTC
(In reply to Colin Walters from comment #10)
> http://pkgs.devel.redhat.com/cgit/rpms/docker/commit/?h=extras-rhel-7.
> 5&id=8e8beddbf87d3b44410dbf05f23d743a3213800e]
> Broke this for Atomic Host, because this runs on the *build* server side,
> and that introduces a dependency on the host filesystem type.
> 
> So...one idea is instead of doing this in docker's `%posttrans`, we do it on
> startup of container-storage-setup.
> 
> @vivek: Any reason you can think of that wouldn't work.

We already do this check in container-storage-setup. Not sure why frantisek introduced it in spec file.

commit 7fffea78b4195bdb883c3dada90d11d140a2c60a
Author: Vivek Goyal <vgoyal>
Date:   Mon Nov 13 13:59:15 2017 -0500

    Check ftype=1 for xfs filesystem


One advantage of doing this check in spec file is that we choose right default to begin with and docker does not fail. If container-storage-setup detects it, then it will fail and docker with either fall back to loop back devices or fail (depending on whether docker.service has Wants= or Requires= dependency).

Can you elaborate a little more that how did it fail? I am not sure I understand the reason of failure.

Comment 13 Colin Walters 2018-01-12 13:57:45 UTC
So if we don't hear a rationale from fkluknav soon my proposal is that we just revert that change.

Comment 14 Vivek Goyal 2018-01-12 14:45:08 UTC
Agreed. This probably will not work for atomic build. I guess limitation is that atomic build server need to have xfs rootfs with ftype=1 and that might not be the case.

Frantisek, Why do we need this patch? Can we revert it to make sure atomic image generation is not broken.

Comment 19 Frantisek Kluknavsky 2018-02-19 14:49:24 UTC
Modifying config files in %posttrans feels slightly wrong-ish. Modifying it twice, in %posttrans and then at the first start of container-storage-setup, is needlessly confusing. Users who upgrade 7.4 -> 7.5 with ftype=0 will curse a lot. But if it must be, ok, so be it.

Comment 20 Chris Evich 2018-04-18 18:03:48 UTC
This appears to be live in AH 7.5:

[root@booyeah ~]# cat /etc/sysconfig/docker-storage-setup 
STORAGE_DRIVER=overlay2
GROWPART=true
ROOT_SIZE=+100%FREE
[root@booyeah ~]# rpm -qf /etc/sysconfig/docker-storage-setup
docker-1.13.1-55.rhel75.git774336d.el7.x86_64
[root@booyeah ~]# uname -a
Linux booyeah 3.10.0-855.el7.x86_64 #1 SMP Tue Feb 20 06:46:45 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@booyeah ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Atomic Host release 7.5
[root@booyeah ~]#