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

elemental-operator is silent if it cannot find the local machineRegistration file #68

Closed
kkaempf opened this issue Jul 20, 2022 · 2 comments · Fixed by #83
Closed

elemental-operator is silent if it cannot find the local machineRegistration file #68

kkaempf opened this issue Jul 20, 2022 · 2 comments · Fixed by #83
Assignees
Labels
area/operator operator related changes kind/bug Something isn't working

Comments

@kkaempf
Copy link
Contributor

kkaempf commented Jul 20, 2022

If you run elemental-operator register /path/without/yaml all you get in the log is

Operator version 0.3.0, commit 90791e4, commit date git20220720

and it exits.

I would expect a warning (error ?) saying something like

Warning: No userdata.yaml found at /path/without/yaml
@kkaempf
Copy link
Contributor Author

kkaempf commented Jul 20, 2022

Running elemental-operator register /non/existant/path results in a memfault

# elemental-operator register /foo/bar
INFO[0000] Operator version 0.3.0, commit 90791e4, commit date git20220720 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x181fef2]

goroutine 1 [running]:
github.com/rancher/elemental-operator/cmd/operator/register.NewRegisterCommand.func1.1({0x7fff9a8b7a6a, 0x8}, {0x0, 0x0}, {0x19a1c20?, 0x1fdcb50?})
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/cmd/operator/register/root.go:68 +0x32
path/filepath.WalkDir({0x7fff9a8b7a6a, 0x8}, 0x1e345d0)
	/usr/lib64/go/1.18/src/path/filepath/path.go:479 +0x50
github.com/rancher/elemental-operator/cmd/operator/register.NewRegisterCommand.func1(0xc00023a000?, {0xc0003ef9a0, 0x1, 0x1})
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/cmd/operator/register/root.go:67 +0x45b
github.com/spf13/cobra.(*Command).execute(0xc00023a000, {0xc0003ef970, 0x1, 0x1})
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/vendor/github.com/spf13/cobra/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001e1900)
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/vendor/github.com/spf13/cobra/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/vendor/github.com/spf13/cobra/command.go:918
main.main()
	/home/abuild/rpmbuild/BUILD/elemental-operator-0.3.0+git20220720.90791e4/cmd/operator/main.go:38 +0xaf

@kkaempf
Copy link
Contributor Author

kkaempf commented Jul 20, 2022

Running either with --debug doesn't change the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operator operator related changes kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants