CentOS / sig-cloud-instance-images

CentOS cloud images
781 stars 563 forks source link

CentOS 8 image should have dnf-plugin-ovl installed #167

Open tgagor opened 4 years ago

tgagor commented 4 years ago

Hi,

I have issue building images based on CentOS 8 images in Docker in Docker configuration (Jenkins agent with DIND used for building images). After installation of any packages RPM DB breaks:

rror: rpmdb: damaged header #173 retrieved -- skipping.
error: rpmdbNextIterator: skipping h#     173 blob size(4836): BAD, 8 + 16 * il(70) + dl(3708)

I use overlay2 as storage driver and I've found that installing dnf-plugin-ovl from epel healed the situation. CentOS 7 have yum-plugin-ovl installed by default and is working fine. IMO dnf-plugin-ovl should be added to avoid issues with broken RPM db.

AaronDMarasco commented 4 years ago

FYI, I couldn't get the original plugin to work with C8 (or UBI). See https://github.com/FlorianLudwig/dnf-plugin-ovl/pull/5

tgagor commented 4 years ago

@AaronDMarasco does this mean that I just should keep this plugin and that it only should be used when needed (like in my situation)?

AaronDMarasco commented 4 years ago

@tgagor dnf-plugin-ovl has been updated with my PR to handle different host kernels. It fixed the error for me, and I was getting this exact error. So I believe it is still needed. The difference is it previously did nothing, including not fixing the problem, when I had a different kernel reporting overlayfs differently than expected.

My theory is that the UBI image is not being tested with dnf rigorously; this has been a problem since the early days of containers and overlay FSs, but running yum or dnf within a container is frowned upon, because it "should" have been done at image build time.