Open danktec opened 1 month ago
@danktec what is OMNICONFIG
set to? Can you include the file contents too please?
Greetings! Yeah, thats a bug which should be fixes by this PR, but it actually hides some other error.
Not exactly closed, since we don't know the underlying error.
cat ~/.config/omni/config/omniconfig.yaml
contexts:
default:
url: https://[tenant].omni.siderolabs.io
auth:
siderov1:
identity: dan@tenant.com
context: default
Getting the same error.
omnictl is installed on Ubuntu
omnictl version v0.43.3 (API Version: 1)
omniconfig.yaml placed in this path ~/.config/omni/config/omniconfig.yaml
.
Configuration is correct; the same works correctly on macOS
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x102b51b]
goroutine 1 [running]:
github.com/siderolabs/omni/client/pkg/omnictl/config.(*Config).Merge(0x0, {0x7ffc3f18b624?, 0x1?})
/src/client/pkg/omnictl/config/config.go:164 +0x19b
github.com/siderolabs/omni/client/pkg/omnictl.init.func8(0xc0004f8600?, {0xc0004e0680, 0x1, 0x16849e6?})
/src/client/pkg/omnictl/config.go:193 +0x74
github.com/spf13/cobra.(*Command).execute(0x264db60, {0xc0004e0650, 0x1, 0x1})
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x264f260)
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x1697c9d?)
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 +0x13
main.main()
/src/cmd/omnictl/main.go:25 +0x171
If someone following this post to install and configure omnictl just use this command:
export OMNICONFIG=~/.config/omni/config/omniconfig.yaml
@mrkhachaturov Something is wrong. The stacktrace you show is from omnictl 0.42.0
. Could you double check pls?
@mrkhachaturov Something is wrong. The stacktrace you show is from omnictl
0.42.0
. Could you double check pls?
rkadmin@runner:~$ omnictl -v
omnictl version v0.43.3 (API Version: 1)
rkadmin@runner:~$ mkdir -p ~/.config/omni/config
rkadmin@runner:~$ nano omniconfig.yaml
rkadmin@runner:~$ cp omniconfig.yaml ~/.config/omni/config
rkadmin@runner:~$ omnictl config merge ./omniconfig.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x102b51b]
goroutine 1 [running]:
github.com/siderolabs/omni/client/pkg/omnictl/config.(*Config).Merge(0x0, {0x7ffdfb988465?, 0x1?})
/src/client/pkg/omnictl/config/config.go:164 +0x19b
github.com/siderolabs/omni/client/pkg/omnictl.init.func8(0xc000500700?, {0xc0004e2690, 0x1, 0x16849e6?})
/src/client/pkg/omnictl/config.go:193 +0x74
github.com/spf13/cobra.(*Command).execute(0x264db60, {0xc0004e2660, 0x1, 0x1})
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x264f260)
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x1697c9d?)
/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 +0x13
main.main()
/src/cmd/omnictl/main.go:25 +0x171
rkadmin@runner:~$
@mrkhachaturov Something is wrong. The stacktrace you show is from omnictl
0.42.0
. Could you double check pls?
This issue arises when you follow the instruction to Install and Configure Omnictl
.
We must first define the OMNICONFIG
path.
When I define export OMNICONFIG=~/.config/omni/config/omniconfig.yaml
, everything worked as expected.
The merge functionality is also working after defining OMNICONFIG
I have made PR to include this in documantation.
Is there an existing issue for this?
Current Behavior
Expected Behavior
No error
Steps To Reproduce
linux-amd64
What browsers are you seeing the problem on?
No response
Anything else?
No response