Bug 1475625

Summary: Change the default storage driver to overlay2
Product: Red Hat Enterprise Linux 7 Reporter: Ben Breard <bbreard>
Component: dockerAssignee: Frantisek Kluknavsky <fkluknav>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact: Maxim Svistunov <msvistun>
Priority: unspecified    
Version: 7.5CC: amurdaca, dornelas, dustymabe, dwalsh, jswensso, lmiksik, lsm5, mjenner, qcai, travi, vgoyal, walters
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: Release Note
Doc Text:
Default storage driver for docker has switched to ovlerlay2 (from devicemapper) in RHEL7.5. So new docker installations should see overlay2 as default on RHEL7.5 or newer releases. On older releases, devicemapper still continues to be the default. Upgrade of existing installations should remain unaffected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 23:59:02 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:    
Bug Blocks: 1186913, 1477926    

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

RHEL & Atomic Host default to devicemapper as the storage driver for docker. That needs to change to overlay2.

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


Actual results:


Expected results:


Additional info:

I couldn't find another tracker for this. Please close if one already exists.

Comment 3 Ben Breard 2017-08-09 18:34:02 UTC
We need to look out for older RHEL 7 systems, pre 7.3, where the file system is missing "type=1" with XFS. One option would be putting a check in the unit file that would fail to start if "type=0" is found for the file system under /var/lib/docker. container-storage-setup will also need checks for this.

Comment 4 Daniel Walsh 2017-08-11 12:25:18 UTC
c

Comment 5 Vivek Goyal 2017-10-24 20:49:41 UTC
Dan, lokesh, it might be time to discuss this and make related changes. We have another similar bug for atomic host here.

https://bugzilla.redhat.com/show_bug.cgi?id=1505621


Lets us keep all the conversation about all the flavors of rhel 7.5 in this bz and how their defaults storage config files should look like here.

Comment 7 Vivek Goyal 2017-10-24 21:06:18 UTC
So in fedora, we have 4 variants. Atomic.host, Cloud, Server and Workstation and we have per product configuration.

How many do we have in RHEL. And then we can discuss per product configuration of each product.

On atomic, I have assuming that rootfs size is by default small (3G). If that's the case we should probably setup overlayfs on a separate volume from root volume group.

For others I am assuming that by default rootfs partition is big and overlayfs should be setup on rootfs. (And not a separate volume). Anyway, for cloud images, there might not be any volume group so setting it up on rootfs might be the only option.

I guess we also will have to check ftype and fall back to device mapper if rootfs does not have ftype=1.

Comment 8 Vivek Goyal 2017-10-30 13:51:16 UTC
Lokesh, can you please take care of making spec file changes for this. Dan mentioned that we don't have any product variants. So we could probably just have another docker-storage.sysconfig for overlay and install that. 

We need to make sure that we check rhel version and do this change only for 7.5 onwards. (And not for 7.3 and 7.4)

Also we will have to ftype check also and make sure rootfs supports ftype=1

Comment 9 Vivek Goyal 2017-10-31 14:56:51 UTC
Ok, had an IRC conversation with walters just now about what's planned for 7.5 atomic. They are planning that rootfs will grow automatically to consume all the free space in root volume group. (like F27AH). 

If that's the case, then we don't have to setup a separate volume for overlay in atomic host. And we can create a default config which works across all rhel 7.5 products.

I think something as simple as following should work.

# cat /etc/sysconfig/docker-storage-setup
STORAGE_DRIVER=overlay2

Comment 10 Dusty Mabe 2017-10-31 15:27:05 UTC
We should probably make sure we have some good documentation somewhere that shows the user how to set up a separate LV for container root (using container-storage-setup) that will use overlay2 on top.

Comment 12 Ben Breard 2017-10-31 15:34:29 UTC
We cover it, but we could probably use a better example for AH.

Comment 24 errata-xmlrpc 2018-04-10 23:59:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1064