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

When resume happens while copying to tar a bundle with an index panic os thrown #501

Closed
joaopapereira opened this issue Mar 27, 2023 · 0 comments · Fixed by #502
Closed
Labels
bug This issue describes a defect or unexpected behavior

Comments

@joaopapereira
Copy link
Member

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.

@joaopapereira joaopapereira added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity labels Mar 27, 2023
@github-project-automation github-project-automation bot moved this to Closed in Carvel Mar 28, 2023
@github-actions github-actions bot removed the carvel triage This issue has not yet been reviewed for validity label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant