Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Whiteouts ot handled correctly #627

Closed
hallyn opened this issue Jun 14, 2024 · 1 comment · Fixed by #629
Closed

Bug: Whiteouts ot handled correctly #627

hallyn opened this issue Jun 14, 2024 · 1 comment · Fixed by #629
Assignees
Labels

Comments

@hallyn
Copy link
Contributor

hallyn commented Jun 14, 2024

stacker version

v1.0.0-rc14-d3f8ebd

Describe the bug

# a1.tar has /a1/file
bb:
  from:
    type: docker
    url: docker://busybox
  run: |
    mkdir /a1
    touch /a1/file

nodir:
  from:
    type: built
    tag: bb
  run: |
    rm -rf /a1

emptydir:
  from:
    type: built
    tag: bb
  run: |
    rm -rf /a1
    mkdir /a1

fulldir:
  from:
    type: built
    tag: bb
  run: |
    rm -rf /a1
    mkdir /a1
    touch /a1/newfile

Run stacker build against that, and look at the outputs.

For nodir, we have simply:

---------- 0/0               0 1969-12-31 18:00 .wh.a1

Which is correct.

For emptydir, we have the exact same thing, just .wh.a1, in fact the .tar.gz for the top layer is the same file as for nodir. This is wrong.

For fulldir, we have:

---------- 0/0               0 1969-12-31 18:00 .wh.a1
-rw-rw-r-- 0/0               0 2024-06-14 00:10 a1/newfile

Per https://github.com/opencontainers/image-spec/blob/main/layer.md, I believe .wh.a1 should not be there, and a1/.wh..wh..opq should exist, for both emptydir and fulldir.

To reproduce

  1. Configuration
  2. Client tool used
  3. Seen error

Expected behavior

No response

Screenshots

No response

Additional context

No response

@rchincha
Copy link
Contributor

nodir:
  from:
    type: built
    tag: bb
  run: |
    rm -rf /a1

emptydir:
  from:
    type: built
    tag: bb
  run: |
    rm -rf /a1
    mkdir /a1

But if a whiteout is generated by overlayfs in emptydir, not quite stacker's fault right?

@rchincha rchincha linked a pull request Jul 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants