Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for a bug with overlayfs (used on Docker Hub)
* Overlayfs has some weird quirks regarding opening files which leads to <PROTECT> errors when trying to start Cache in a new RUN context while running a docker build * Touching the CACHE.DAT files triggers the copy-up operation for overlayfs (and does nothing on other filesystems) which allows Cache to read the files properly * If you think this is weird - it is, but the yum package manager had exactly the same problem and solved it in the exact same way (see the yum-ovl plugin)
- Loading branch information
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Novex Thanks for this BTW... I had forgotten it and it bit me on my Mac! :-o
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same was for me when I worked on an article, I could not start Caché.
That's why I included a part about it in my article.
For me, I've switched Docker to AUFS, and now everything is OK.
Because with overlayfs, needs much more complete workaround. Some changes need in ccontrainermain to touch cconsole.log, as well.
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! It took me long enough to work it out - wasn't going to let anyone else go through that pain if I could help it ;)
@daimor, if further workaround is required (eg. touching every file rather than just the CACHE.DAT's) it'd be great if you could contribute an update :)
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, and even had a try to touch all files in instance directory, but it takes some time before container could start. And in this way, we still have to use the workaround like yours, in ways when we should start the instance in a BUILD process later, like to install some application. And even I'm still not sure is it a good way. So, I've just switched to aufs, and it will be enough for some time. And most of the time I'm using Docker on Debian, where I don't have such problem.
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I'm finding devicemapper very robust since day one and in fact it's the default driver on CentOS 6 RH. I remember we could not write to the JRN file back then ;)
Not sure why Canonical is sticking to overlayfs...
thanks
d0bd70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI
CentOS and RHEL use devicemapper by default and I find it reliable for now
while SUSE uses BTRFS (as they do in their root FS). I have heard from a customer they had a terrible time with it. However, according to SUSE, a BTRFS storage-driver should run on a BTRFS filesystem so there might have been issues related to misconfiguration.
see:
https://www.suse.com/documentation/sles-12/singlehtml/book_sles_docker/book_sles_docker.html
It is also worth noting that devicemapper works well on CentOS, RHWL and Ubuntu. I have not tried it on SUSE.