Bug 1455713

Summary: overlay2 driver, deleted files still show in ls and file globs
Product: Red Hat Enterprise Linux 7 Reporter: Steve Baker <sbaker>
Component: dockerAssignee: Vivek Goyal <vgoyal>
Status: CLOSED DUPLICATE QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5-AltCC: amurdaca, lsm5, walters
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-28 21:10:53 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:

Description Steve Baker 2017-05-25 22:37:37 UTC
Description of problem:
Using the overlay2 driver, a file which is deleted still shows up in calls to 'ls' and also in file globs. This causes problems for any command where a glob is consumed and tries to act on a file which doesn't actually exist.

Version-Release number of selected component (if applicable):
This is seen on a current up-to-date centos-7 host and containers
# uname -a
Linux uc-ovb-master.localdomain 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# docker --version
Docker version 1.12.6, build 3a094bd/1.12.6

How reproducible:
This is seen always on an up-to-date centos-7 host and containers. 

Steps to Reproduce:
# docker run --user root -ti --rm centos:7 /bin/bash -c "rm -f /etc/init.d/README ; ls /etc/init.d ; echo /etc/init.d/* ; cat /etc/init.d/README"

Actual results:
The following output occurs
  README
  /etc/init.d/README
  cat: /etc/init.d/README: No such file or directory

Expected results:
  /etc/init.d/*
  cat: /etc/init.d/README: No such file or directory


Additional info:
In OpenStack TripleO we've switched to using the overlay2 driver, but this bug is causing errors with files not existing when running "cp -a /etc/* ...". See the attached launchpad bug.

Comment 2 Colin Walters 2017-05-26 13:12:33 UTC
What's the underlying fs type?  `docker info` ?

I think this is likely to be a dup of: https://bugzilla.redhat.com/show_bug.cgi?id=1288162#c81

Basically, your /var/lib/docker needs to be on a newer XFS.  You can make it its own LV, or reinstall with 7.3.

Comment 3 Steve Baker 2017-05-28 21:10:06 UTC
I tried again with a newer centos cloud image (CentOS-7-x86_64-GenericCloud-1704) and cannot reproduce.

# xfs_info / |grep ftype
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1

Comment 4 Steve Baker 2017-05-28 21:10:53 UTC

*** This bug has been marked as a duplicate of bug 1288162 ***