When resume happens while copying to tar a bundle with an index panic os thrown
joaopapereira opened this issue · 0 comments
What steps did you take:
Create a bundle one of the images being an Index
Copy the bundle to tar
Copy the bundle to tar again but enable the --resume
flag
What happened:
Panic with the message: Internal inconsistency: unexpected index type
and the backtrace of:
imgpkg copy -b 127.0.0.1:63646/repo/bundle@sha256:a07f08f4ba92d4dae1f19674a33874694c29edd6a21177ca0c2a323e5625a884 --to-tar /var/folders/yj/_3rjks7s70351h3d6hq3j3040000gn/T/bundle-tar1897755262/bundle-tar.tgz --resume --yes%!(EXTRA *errors.errorString=Execution error: stdout: '' stderr: 'panic: Internal inconsistency: unexpected index type
goroutine 1 [running]:
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar.TarReader.presentLayersForIndex({{0xc000041f40?, 0xc000240430?}}, {0xc00014ce70?, 0xc00014d180?}, {0x29b99958?, 0xc00021f860?})
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar/tar_reader.go:104 +0x6e6
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar.TarReader.PresentLayers({{0xc000041f40?, 0xc000012428?}})
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar/tar_reader.go:53 +0x172
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset.TarImageSet.Export({{0x5, {0x188e4a0, 0xc0002068a0}, {0x188fba0, 0x1cb6148}}, 0x5, {0x188e4a0, 0xc0002068a0}}, 0x18967a0?, {0x7ff7bfeff767, ...}, ...)
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset/tar_image_set.go:68 +0x376
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd.CopyRepoSrc.CopyToTar({{{0x0, 0x0}}, {{0x7ff7bfeff6fa, 0x63}}, {{0x0, 0x0}}, {{0x0, 0x0}, {0x7ff7bfeff767, 0x54}, ...}, ...}, ...)
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd/copy_repo_src.go:49 +0x174
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd.(*CopyOptions).Run(0xc0001350e0)
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd/copy.go:149 +0x89a
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd.NewCopyCmd.func1(0xc000145c60?, {0xc000114780?, 0xc000193ef8?, 0xc0001cc400?})
github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd/copy.go:49 +0x1d
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x0?, {0xc000114780, 0x0, 0x6})
github.com/cppforlife/cobrautil@v0.0.0-20221021151949-d60711905d65/misc.go:45 +0x6d
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x0?, {0xc000114780, 0x0, 0x6})
github.com/cppforlife/cobrautil@v0.0.0-20221021151949-d60711905d65/misc.go:45 +0x6d
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0xc000204900?, {0xc000114780, 0x0, 0x6})
github.com/cppforlife/cobrautil@v0.0.0-20221021151949-d60711905d65/misc.go:45 +0x6d
github.com/spf13/cobra.(*Command).execute(0xc000204900, {0xc000114720, 0x6, 0x6})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc000005b00)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(0x179650b?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x19
main.main()
github.com/vmware-tanzu/carvel-imgpkg/cmd/imgpkg/imgpkg.go:35 +0x105
What did you expect:
The copy would be successful
Environment:
- imgpkg version (use
imgpkg --version
): 0.33.0 - Docker registry used (e.g.
Docker HUB
): Any - OS (e.g. from
/etc/os-release
): Any
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help work on this issue.