Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Created January 26, 2024 23:41
Show Gist options
  • Save jsturtevant/808c41e211590e2ace45bcea0114e668 to your computer and use it in GitHub Desktop.
Save jsturtevant/808c41e211590e2ace45bcea0114e668 to your computer and use it in GitHub Desktop.
ingest bug containerd
#!/usr/bin/env bash
set -e
echo test > test.txt
sudo ctr --debug -n ingest-bug content ingest --expected-size 5 --expected-digest sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 test-content-foo < test.txt
sudo ctr --debug -n ingest-bug content ls
sudo ctr --debug -n ingest-bug content rm sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
sudo ctr --debug -n ingest-bug content ingest --expected-size 5 --expected-digest sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 test-content-foo < test.txt
echo its there!
sudo ctr -n ingest-bug content get sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
sudo ctr --debug -n ingest-bug content ls
# add some addtional logging https://github.com/containerd/containerd/blob/a2d0ddc88e1812407e6dbb829cc845175359e360/core/content/helpers.go#L161-L169 and you will see the seek gets moved ahead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment