#2964 Unable to build docker images in CentOS 8.3+
Closed: Fixed 2 years ago by tkopecek. Opened 2 years ago by alexi.

As described in BZ1923971, libguestfs switched its json-parsing library from YAJL to Jansson. Unfortunately, that causes a crash when Koji tries to build a docker image due to a symbol conflict with the json-c library (a dependency of dnf).

In practical terms, this means we're unable to build docker images on CentOS 8.3 and higher.

A simple, if not very elegant, workaround for this issue could look like this:

diff --git a/builder/kojid b/builder/kojid
index ba75e52e..a74fb705 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -49,6 +49,10 @@ from gzip import GzipFile
 from optparse import SUPPRESS_HELP, OptionParser

 import Cheetah.Template
+try:
+    import guestfs
+except:
+    pass
 import dnf
 import librepo
 import requests

This issue was made more difficult to diagnose due to #2963, as Koji was unable to detect the failure in libguestfs and instead it would go into a loop.


Note, simple internal workaround is to bypass importing dnf on image-only builders (it is needed only for createrepo channel). We've to import it in non-breaking order.

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

2 years ago

So how would you suggest we do this instead?

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.27

2 years ago

createrepo and image channels shouldn't be mixed on one machine anyway

Why not? We do mix them, so I guess this solution would still not work for us?

For me the reason is that createrepo needs ro access to /mnt/koji while image builders can live without it. So, it is safety/security least permission policy, no real obstacle.

I'll try your approach if import guestfs first is enough.

I've tried a few cases and it seems that it works. Updated PR.

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.26.1 (was: 1.27)

2 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Issue untagged with: testing-ready
- Issue tagged with: no_qe

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2993 Merged 2 years ago