Closed estebanreyl closed 1 year ago
As an update, I have verified that I can reproduce the above while using an ubuntu base image as well:
FROM ubuntu:latest AS base
# Required Build/Run Tools Dependencies for Overlaybd tools
RUN apt-get update && \
apt-get install -y ca-certificates && \
update-ca-certificates
RUN apt update && \
apt install -y libcurl4-openssl-dev libext2fs-dev libaio-dev
# --- OVERLAYBD TOOLS ---
FROM base As overlaybd-build
RUN apt update && \
apt install -y libssl-dev libnl-3-dev libnl-genl-3-dev libgflags-dev libzstd-dev && \
apt install -y zlib1g-dev binutils && \
apt install -y make git wget sudo tar gcc cmake && \
apt install -y golang
RUN git clone https://github.com/containerd/overlaybd.git && \
cd overlaybd && \
git submodule update --init && \
git checkout b432a80504a34d0a8601029de4dd200fc7ee4bf3 && \
mkdir build && \
cd build && \
cmake .. && \
make -j && \
make install
# --- BUILD LOCAL CONVERTER ---
FROM overlaybd-build AS convert-build
WORKDIR /home/limiteduser/
RUN git clone https://github.com/containerd/accelerated-container-image.git
WORKDIR /home/limiteduser/accelerated-container-image
RUN make
# --- FINAL ---
FROM base
WORKDIR /home/limiteduser/
# Copy Conversion Tools
COPY --from=overlaybd-build /opt/overlaybd/bin /opt/overlaybd/bin
COPY --from=overlaybd-build /opt/overlaybd/baselayers /opt/overlaybd/baselayers
# # This is necessary for overlaybd_apply to work
COPY --from=overlaybd-build /etc/overlaybd/overlaybd.json /etc/overlaybd/overlaybd.json
COPY --from=convert-build /home/limiteduser/accelerated-container-image/bin/convertor ./bin/convertor
CMD ["./bin/convertor"]
As a further investigation note, the issue appears to begin from overlaybd commit fc255f39800ba01e80ae414514ac953ddced4842 onwards.
overlaybd commit fc255f enhanced the destruction process that ignore in previous versions. This enhancement waits some related content to destruct. I think the hang might be caused by some content not being destructed as expected. I will see and find it. you may temporarily use the previous version.
What happened in your environment?
I am trying to run the user space converter within a Mariner container but as of late have been encountering an issue were the userspace convertor will hang on the first apply step and it doesn't seem to ever get past this. I am not entirely sure what changed but at the moment.
What did you expect to happen?
I expected the full conversion process to complete.
How can we reproduce it?
This can be reproduced by building a mariner image with the latest bits. To do so you can use the following dockerfile:
This file can then be run as:
I've been able to reproduce this with several images, for the run below I used python:3.8 stored in my own registry. (Digest: sha256:b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0). The result just shows the conversion hanging (it wont advance even after hours)
Investigation