Ian Wienand 74ff77e720
Revert "Override pythonpath in nodepool builder"
This reverts commit 515c29572190158428ac172febbf6871cf8977ee.

We found the reason why nodepool-builder wasn't starting was that when
we had the system-python and upstream-python installed at the same
version at the same time, the upstream-python was not built to use
relative libraries and hence started using the libpython.so from the
system-python.  This meant it was looking for libraries installed in
the system-python path (dist-packages) not the pip/upstream path
(site-packages).  This was reported and upstream are currently
evaluating a fix for that [1]

In the mean time, we merged Ib3dfda3df69e7ab359b96cd1865e47c7e1e8047b
which also avoids this problem by not including the "unstable" distro
in the image.  Since the system-python 3.11 packages were coming from
"unstable", this avoids the "same version" of the problem; the
upstream-python won't pick up the older version's libpython.so.

After this change the image is actually broken with this, because it
directs the system-python (now 3.9 since the change) to the 3.11
libraries, which obviously doesn't work.  Thus revert this now.

[1] https://github.com/docker-library/python/pull/785

Change-Id: I814d5920d8203bcb9f60b9769164c3d2a925f526
2023-01-16 09:46:03 +11:00

37 lines
1.2 KiB
Django/Jinja

version: '2'
services:
nodepool-builder:
image: docker.io/zuul/nodepool-builder:{{ nodepool_builder_container_tag|default('latest') }}
user: nodepool
network_mode: host
restart: always
stop_grace_period: 90s
command: nodepool-builder -f -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/builder-logging.conf --upload-workers {{ nodepool_builder_upload_workers }}
privileged: true
environment:
- DEBUG=1
- STATSD_HOST=graphite.opendev.org
- STATSD_PORT=8125
volumes:
# nodepool config
- /etc/nodepool:/etc/nodepool:ro
# openstacksdk config
- /etc/openstack:/etc/openstack:ro
# project-config
- /opt/project-config:/opt/project-config:ro
# dib temporary storage; see config in project-config
- /opt/dib_tmp:/opt/dib_tmp:rw
# dib cache; see config in project-config
- /opt/dib_cache:/opt/dib_cache:rw
# dib image output; see config in project-config
- /opt/nodepool_dib:/opt/nodepool_dib:rw
# logs (builder + dib build logs under /build)
- /var/log/nodepool:/var/log/nodepool:rw
# for the containerfile element/podman; it needs a non-overlayfs
# mounted here.
- /opt/dib_containers:/var/lib/containers