bootc-dev / bootc-dev/bootc

hardlink swapping across multiple layers fail

Open
#1,126 3 comments 0 reactions 0 assignees View on GitHub
area/container-compatibility
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

Saw this on an image built with kaniko with the symlink prefix patch. Anaconda was from 9.4

> 22:53:33,417 INF program: error: Performing deployment: Importing: Parsing layer blob sha256:0be089d5aab4c35a9c9dce1f00d4c5b02112972a2e62886fed445d380920616f: error: ostree-tar: Processing deferred hardlink etc/sysconfig/iptables-config: Failed to find object: No such file or directory: etc: Processing tar via ostree: Failed to commit tar: ExitStatus(unix_wait_status(256))

Inspecting the layer:
```
$ tar -P --verbatim-files-from -tvf 0be089d5aab4c35a9c9dce1f00d4c5b02112972a2e62886fed445d380920616f.tar.gz | grep iptables-config
-rw------- 0/0 2153 2024-12-10 16:36 etc/sysconfig/iptables-config
hrw------- 0/0 0 2024-12-10 16:36 sysroot/ostree/repo/objects/04/34708d463840ebb8071a370470df6607eaf187f2cd7686cbab04216c8b7743.file link to etc/sysconfig/iptables-config
```

The link is there.

If I grep all the layers though, there's this:

```
ls *.tar.gz | while read line; do tar -P --verbatim-files-from -tvf $line| grep 'iptables-config'; done
-rw------- 0/0 2153 2024-12-10 16:36 etc/sysconfig/iptables-config
hrw------- 0/0 0 2024-12-10 16:36 sysroot/ostree/repo/objects/04/34708d463840ebb8071a370470df6607eaf187f2cd7686cbab04216c8b7743.file link to etc/sysconfig/iptables-config
hrw------- 0/0 0 1969-12-31 16:00 etc/sysconfig/iptables-config link to sysroot/ostree/repo/objects/04/34708d463840ebb8071a370470df6607eaf187f2cd7686cbab04216c8b7743.file
```

Did kaniko produce another bad image, or is kaniko producing a valid image and bootc is just seeing something its not prepared to handle?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.