Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay2 is not posix compliant so rpm is failing #91

Closed
robnagler opened this issue May 20, 2019 · 2 comments
Closed

overlay2 is not posix compliant so rpm is failing #91

robnagler opened this issue May 20, 2019 · 2 comments
Assignees
Labels

Comments

@robnagler
Copy link
Member

overlay2 is the wrong choice for Docker container storage even though Docker clearly states:

overlay2 is the preferred storage driver, for all currently supported Linux distributions, and requires no extra configuration.

However, we are seeing errors like this:

rpmdbNextIterator: skipping h#     680 blob size(6044): BAD, 8 + 16 * il(74) + dl(4852)
failed to replace old database with new database!

Even with a clean rebuild, it fails, because overlay2 does not support rename for directories, and Docker notes this as a limitation:

Limitations on OverlayFS compatibility:
rename(2): OverlayFS does not fully support the rename(2) system call. Your application needs to detect its failure and fall back to a “copy and unlink” strategy.

Of course, the one thing that's important in Unix (and I'm guessing POSIX) is directory rename be atomic.

Sirepo build is stuck at the moment so I'm working on this.

@robnagler
Copy link
Member Author

This workaround works so the container doesn't corrupt rpm db, and therefore doesn't need to be rebuilt, which avoids directory rename issue.

There are many tickets associated with this problem. I'd rather avoid reformatting our disks to support device-mapper in non-loopback mode so this fix avoids the immediate issue. The fundamental issue is that overlay2 is not POSIX-compliant, but the issues and documentation are conflicting (see below). We definitely create our XFS file systems with ftype=1.

The correct solution is to install yum/dnf-ovl-plugin which does the touch /var/lib/rpm/* but checks to see if / is overlayfs. See radiasoft/download#65

@robnagler
Copy link
Member Author

singiamtel added a commit to singiamtel/docks that referenced this issue Aug 8, 2024
Removing this because it gives problems when building with Docker's overlayfs

Similar issue: radiasoft/containers#91

strace out:
```
renameat(AT_FDCWD, "/var/lib/rpm", AT_FDCWD, "/var/lib/rpmold.68") = -1 EXDEV (Invalid cross-device link)
```
singiamtel added a commit to alisw/docks that referenced this issue Aug 8, 2024
Removing this because it gives problems when building with Docker's overlayfs

Similar issue: radiasoft/containers#91

strace out:
```
renameat(AT_FDCWD, "/var/lib/rpm", AT_FDCWD, "/var/lib/rpmold.68") = -1 EXDEV (Invalid cross-device link)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant