bentoml/Yatai

Error: kaniko(bentoImageBuildEngine) apt-get install error

devJackie opened this issue · 1 comments

When deploying yatai with bentoImageBuildEngine (kaniko), an error occurs in apt-get install.
Is there a bug in the build engine?

I'm curious about the yatai stable version.

E: Package 'gnupg2' has no installation candidate
E: Unable to locate package build-essential
image

Failed to create image build after deployment in yatai UI
image

pod error log:

INFO[0000] Resolved base name python:3.9-slim to base-container 
INFO[0000] Retrieving image manifest python:3.9-slim    
INFO[0000] Retrieving image python:3.9-slim from registry index.docker.io 
INFO[0002] Built cross stage deps: map[]                
INFO[0002] Retrieving image manifest python:3.9-slim    
INFO[0002] Returning cached image manifest              
INFO[0002] Executing 0 build triggers                   
INFO[0002] Building stage 'python:3.9-slim' [idx: '0', base-idx: '-1'] 
INFO[0002] Unpacking rootfs as cmd RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache requires it. 
INFO[0007] ENV LANG=C.UTF-8                             
INFO[0007] ENV LC_ALL=C.UTF-8                           
INFO[0007] ENV PYTHONIOENCODING=UTF-8                   
INFO[0007] ENV PYTHONUNBUFFERED=1                       
INFO[0007] USER root                                    
INFO[0007] Cmd: USER                                    
INFO[0007] ENV DEBIAN_FRONTEND=noninteractive           
INFO[0007] RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache 
INFO[0007] Initializing snapshotter ...                 
INFO[0007] Taking snapshot of full filesystem...        
INFO[0008] Cmd: /bin/sh                                 
INFO[0008] Args: [-c rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache] 
INFO[0008] Util.Lookup returned: &{Uid:0 Gid:0 Username:root Name: HomeDir:/root} 
INFO[0008] Performing slow lookup of group ids for root 
INFO[0008] Running: [/bin/sh -c rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache] 
INFO[0008] Taking snapshot of full filesystem...        
INFO[0008] RUN set -eux &&     apt-get update -y &&     apt-get install -q -y --no-install-recommends --allow-remove-essential         ca-certificates gnupg2 bash build-essential 
INFO[0008] Cmd: /bin/sh                                 
INFO[0008] Args: [-c set -eux &&     apt-get update -y &&     apt-get install -q -y --no-install-recommends --allow-remove-essential         ca-certificates gnupg2 bash build-essential] 
INFO[0008] Util.Lookup returned: &{Uid:0 Gid:0 Username:root Name: HomeDir:/root} 
INFO[0008] Performing slow lookup of group ids for root 
INFO[0008] Running: [/bin/sh -c set -eux &&     apt-get update -y &&     apt-get install -q -y --no-install-recommends --allow-remove-essential         ca-certificates gnupg2 bash build-essential] 
+ apt-get update -y

[Working]
[Working]
[Working]
[Connecting to debian.map.fastlydns.net (146.75.50.132)]
[Connecting to debian.map.fastlydns.net (2a04:4e42:7c::644)]

Ign:1 http://deb.debian.org/debian bookworm InRelease

                                                               
Ign:2 http://deb.debian.org/debian bookworm-updates InRelease

                                                               
Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease

                                                               
[Working]
[Working]
[Working]
[Working]
            
Ign:1 http://deb.debian.org/debian bookworm InRelease

            
Ign:2 http://deb.debian.org/debian bookworm-updates InRelease

            
Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease

[Working]
[Working]
[Working]
[Working]
[Working]
[Working]
            
Ign:1 http://deb.debian.org/debian bookworm InRelease

            
Ign:2 http://deb.debian.org/debian bookworm-updates InRelease

            
Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease

[Working]

Err:1 http://deb.debian.org/debian bookworm InRelease
  Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastlydns.net:80 (146.75.50.132), connection timed out Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)

            
Err:2 http://deb.debian.org/debian bookworm-updates InRelease
  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)

            
Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)

[Working]
            

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 86%

Reading package lists... Done

W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastlydns.net:80 (146.75.50.132), connection timed out Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)
W: Failed to fetch http://deb.debian.org/debian-security/dists/bookworm-security/InRelease  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:7c::644). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.
+ apt-get install -q -y --no-install-recommends --allow-remove-essential ca-certificates gnupg2 bash build-essential
Reading package lists...
Building dependency tree...
Reading state information...
Package gnupg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  gpgv

E: Package 'gnupg2' has no installation candidate
E: Unable to locate package build-essential
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 100

To reproduce

For installation, refer to the yatai installation guide.
-> https://docs.yatai.io/en/latest/installation/index.html

I read the bentoml quickstart guide and deployed it to the kubernetes environment.
-> https://github.com/bentoml/BentoML/tree/main/examples/quickstart

bentoml login
bentoml build
bentoml push
After push, we proceeded to deploy through yatai UI.

Expected behavior

No response

Environment

kubernetes
-> 1.26.4

yatai
-> yatai-1.1.9
-> yatai-image-builder-1.1.7
-> yatai-deployment-1.1.13

It was a proxy problem inside kubernetes, and we solved(set no_proxy) the proxy problem. sorry. 🥹