nestybox / nestybox/sysbox

Kaniko build: error removing lib to make way for new symlink

Open
#564 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

Environment: AWS; Ubuntu 22.04
Shifts:

modinfo shiftfs
filename:       /lib/modules/5.15.0-1005-aws/updates/dkms/shiftfs.ko
license:        GPL v2
description:    id shifting filesystem
author:         Christian Brauner <christian.brauner@ubuntu.com>
author:         Seth Forshee <seth.forshee@canonical.com>
author:         James Bottomley
alias:          fs-shiftfs
srcversion:     B0C2D82DE327B38F653B659
depends:        
retpoline:      Y
name:           shiftfs
vermagic:       5.15.0-1005-aws SMP mod_unload modversions 
sig_id:         PKCS#7
signer:         ip-172-20-4-96 Secure Boot Module Signature key
sig_key:        58:98:3B:C9:DD:E1:B9:01:AD:F4:71:01:C5:1A:F0:62:1F:DF:C6:20
sig_hashalgo:   sha512
signature:      16:43:E5:3F:EA:E3:C5:23:87:16:F4:9B:CE:9B:7A:7D:6B:45:D9:23:
		F3:45:E6:0B:19:71:E7:24:05:12:60:B2:33:01:06:51:BA:B5:81:AF:
		C1:BE:89:DB:FD:22:DD:7E:86:B1:B2:58:9F:94:F1:A9:93:76:90:4D:
		6C:9B:BB:F1:2B:BE:6D:81:CC:11:74:6B:53:57:84:44:9F:17:20:3A:
		C1:17:B8:70:BB:0D:E1:58:6B:10:1B:54:05:0C:ED:61:4F:8F:A6:9C:
		F5:B0:AA:39:95:DA:A2:B9:43:AC:17:1A:65:52:E9:92:B9:B0:6F:A2:
		E7:18:92:C1:A8:16:2A:24:B5:7A:C3:69:9B:9C:CC:23:E2:50:B7:CD:
		8A:15:FB:75:0D:90:AF:1C:28:79:B1:D9:EA:5C:AE:A6:1F:61:07:73:
		3E:4E:8E:B3:19:CD:7A:31:11:A7:32:3E:E0:80:A6:9F:72:F5:6A:5B:
		D1:E8:EA:C0:09:5A:53:E3:62:F3:D8:67:0E:33:DC:36:0E:76:E8:BB:
		21:16:CB:AA:74:C7:7B:DC:BA:F4:27:35:E7:03:EA:B1:F0:13:B1:66:
		33:00:CB:E3:50:32:E9:1F:B6:6D:92:F7:BD:4B:7E:CD:34:DB:90:65:
		12:CB:AD:AE:EE:16:E9:1B:D1:A4:91:8C:4B:74:59:E4

Sysbox:

systemctl status sysbox
● sysbox.service - Sysbox container runtime
     Loaded: loaded (/lib/systemd/system/sysbox.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-06-14 08:05:15 UTC; 6min ago
       Docs: https://github.com/nestybox/sysbox
   Main PID: 8260 (sh)
      Tasks: 2 (limit: 521)
     Memory: 444.0K
        CPU: 52ms
     CGroup: /system.slice/sysbox.service
             ├─8260 /bin/sh -c "/usr/bin/sysbox-runc --version && /usr/bin/sysbox-mgr --version && /usr/bin/sysbox-fs --version && /bin/sleep infinity"
             └─8283 /bin/sleep infinity

Jun 14 08:05:15 ip-172-20-6-156 sh[8269]:         version:         0.5.2
Jun 14 08:05:15 ip-172-20-6-156 sh[8269]:         commit:         ea1b7db91031355cb10b850125e0d6502dc38962
Jun 14 08:05:15 ip-172-20-6-156 sh[8269]:         built at:         Wed May 18 19:49:36 UTC 2022
Jun 14 08:05:15 ip-172-20-6-156 sh[8269]:         built by:         Rodny Molina
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]: sysbox-fs
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]:         edition:         Community Edition (CE)
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]:         version:         0.5.2
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]:         commit:         95a773a6ea3920f7ab454f1583465c7aea4c701f
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]:         built at:         Wed May 18 19:49:30 UTC 2022
Jun 14 08:05:15 ip-172-20-6-156 sh[8274]:         built by:         Rodny Molina

Dockerfile:

FROM ubuntu:20.04
RUN apt-get update \
	&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
	libxerces-c3.2 python3 curl \
	&& apt-get clean \
	&& rm -rf /var/lib/apt/lists/*

Steps to reproduce:
Start container:

docker run -v $PWD:/app --rm  -it --entrypoint="" --runtime=sysbox-runc gcr.io/kaniko-project/executor:v1.8.1-debug /bin/sh

Run Kaniko

/kaniko/executor --dockerfile /app/Dockerfile --no-push

Error

/workspace # /kaniko/executor --dockerfile /app/Dockerfile --no-push
INFO[0000] Retrieving image manifest ubuntu:20.04       
INFO[0000] Retrieving image ubuntu:20.04 from registry index.docker.io 
INFO[0001] Built cross stage deps: map[]                
INFO[0001] Retrieving image manifest ubuntu:20.04       
INFO[0001] Returning cached image manifest              
INFO[0001] Executing 0 build triggers                   
INFO[0001] Unpacking rootfs as cmd RUN apt-get update 	&& DEBIAN_FRONTEND=noninteractive apt-get install -y 	libxerces-c3.2 python3 curl 	&& apt-get clean 	&& rm -rf /var/lib/apt/lists/* requires it. 
error building image: error building stage: failed to get filesystem from image: error removing lib to make way for new symlink: unlinkat //lib/modules/5.15.0-1005-aws/modules.builtin.modinfo: read-only file system

Running with default runtime works.

Let me know if you need more information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Dockerfile build with /kaniko/executor inside the sysbox-runc container, then compare it with the default runtime. Investigate the rootfs unpack failure when unlinking /lib/modules/5.15.0-1005-aws/modules.builtin.modinfo on the read-only filesystem. Done means the same Kaniko build completes successfully under sysbox-runc.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux, ubuntu
Domain
devops, infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.