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] Image Mount Panic #1717

Closed
starComingup opened this issue Sep 19, 2022 · 1 comment
Closed

[BUG] Image Mount Panic #1717

starComingup opened this issue Sep 19, 2022 · 1 comment
Labels
kind/bug Something isn't working

Comments

@starComingup
Copy link
Member

What happen?

panic when mount image.

Relevant log output?

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/sealerio/sealer/utils/mount.GetMountDetails({0xc0005b6d00, 0x35})
	/root/sealer/utils/mount/mount_service.go:160 +0x9e
github.com/sealerio/sealer/pkg/filesystem/clusterimage.(*mounter).mountImage(0xc0002ec9a0, 0xc000184200)
	/root/sealer/pkg/filesystem/clusterimage/clusterimage.go:113 +0x3a5
github.com/sealerio/sealer/pkg/filesystem/clusterimage.(*mounter).MountImage(0xc0002ec980, 0xc00055f320)
	/root/sealer/pkg/filesystem/clusterimage/clusterimage.go:52 +0x19
github.com/sealerio/sealer/apply/processor.(*CreateProcessor).MountImage(0xc000700850, 0xc000184200)
	/root/sealer/apply/processor/create.go:110 +0x3d9
github.com/sealerio/sealer/apply/processor.(*Executor).Execute(0x36ffbc0, 0xc000574400)
	/root/sealer/apply/processor/interface.go:45 +0x78
github.com/sealerio/sealer/apply/driver.(*Applier).initCluster(0xc0003546e0)
	/root/sealer/apply/driver/local.go:317 +0x168
github.com/sealerio/sealer/apply/driver.(*Applier).Apply(0xc0003546e0)
	/root/sealer/apply/driver/local.go:70 +0xb9
github.com/sealerio/sealer/cmd/sealer/cmd/cluster.NewApplyCmd.func1(0xc0006cc000, {0xc000145d60, 0x2, 0x2})
	/root/sealer/cmd/sealer/cmd/cluster/apply.go:43 +0x45
github.com/spf13/cobra.(*Command).execute(0xc0006cc000, {0xc000145d40, 0x2, 0x2})
	/root/sealer/vendor/github.com/spf13/cobra/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0x4b259a0)
	/root/sealer/vendor/github.com/spf13/cobra/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/root/sealer/vendor/github.com/spf13/cobra/command.go:902
github.com/sealerio/sealer/cmd/sealer/cmd.Execute()
	/root/sealer/cmd/sealer/cmd/root.go:76 +0x25
main.main()
	/root/sealer/cmd/sealer/main.go:31 +0x36

What you expected to happen?

mount image successfully!

How to reproduce it (as minimally and precisely as possible)?

sealer apply -f Kubefile then it will panic

Anything else we need to know?

#1698 caused this panic.
@tgfree7 FYI. It seems return mountCmdResultSplit(infos[0].VFSOptions, target) line infos[0] was nil.

What is the version of Sealer you using?

{"gitVersion":"unknown","gitCommit":"16555f09","buildDate":"2022-09-19 10:45:45","goVersion":"go1.17.13","compiler":"gc","platform":"linux/amd64"}

What is your OS environment?

Ubuntu 20.04.5 LTS

What is the Kernel version?

Any

Other environment you want to tell us?

NONE

@starComingup starComingup added the kind/bug Something isn't working label Sep 19, 2022
@tgfree7
Copy link
Contributor

tgfree7 commented Sep 20, 2022

#1719 try to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants