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] omnictl error during config merge #683

Open
1 task done
danktec opened this issue Oct 14, 2024 · 4 comments · Fixed by #686
Open
1 task done

[bug] omnictl error during config merge #683

danktec opened this issue Oct 14, 2024 · 4 comments · Fixed by #686
Labels
bug Something isn't working

Comments

@danktec
Copy link

danktec commented Oct 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

omnictl config merge ~/.config/omni/config/omniconfig.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe441fb]

goroutine 1 [running]:
github.com/siderolabs/omni/client/pkg/omnictl/config.(*Config).Merge(0x0, {0x7ffd1db8d6e2?, 0x1?})
	/src/client/pkg/omnictl/config/config.go:164 +0x19b
github.com/siderolabs/omni/client/pkg/omnictl.init.func8(0xc000418d00?, {0xc0003fa7b0, 0x1, 0x141b93c?})
	/src/client/pkg/omnictl/config.go:193 +0x74
github.com/spf13/cobra.(*Command).execute(0x21bd620, {0xc0003fa780, 0x1, 0x1})
	/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x21bed20)
	/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x142d702?)
	/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 +0x13
main.main()
	/src/cmd/omnictl/main.go:25 +0x171

Expected Behavior

No error

Steps To Reproduce

omnictl -v
omnictl version v0.42.3 (API Version: 1)

linux-amd64

What browsers are you seeing the problem on?

No response

Anything else?

No response

@danktec danktec added the bug Something isn't working label Oct 14, 2024
@alongwill
Copy link
Member

@danktec what is OMNICONFIG set to? Can you include the file contents too please?

DmitriyMV added a commit to DmitriyMV/omni that referenced this issue Oct 14, 2024
Checking for file-not-exist error is not enough.

Fixes siderolabs#683

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
@DmitriyMV
Copy link
Member

DmitriyMV commented Oct 14, 2024

Greetings! Yeah, thats a bug which should be fixes by this PR, but it actually hides some other error.

@DmitriyMV
Copy link
Member

Not exactly closed, since we don't know the underlying error.

@DmitriyMV DmitriyMV reopened this Oct 14, 2024
@danktec
Copy link
Author

danktec commented Oct 14, 2024

cat ~/.config/omni/config/omniconfig.yaml
contexts:
    default:
        url: https://[tenant].omni.siderolabs.io
        auth:
            siderov1:
                identity: dan@tenant.com
context: default

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

Successfully merging a pull request may close this issue.

3 participants