Repository: siderolabs/talos

Issue #7336: talosctl: panic: open /proc/cmdline: no such file or directory
Created: 2023-06-08T07:02:51Z
Bug Report
On MacOS talosctl dashboard seem to need /proc/cmdline which is not available on MacOS.
Description
Installed talosctl: brew install talosctl since v1.4.4 when running talosctl dashboard I get:
panic: open /proc/cmdline: no such file or directory

goroutine 1 [running]:
github.com/siderolabs/go-procfs/procfs.ProcCmdline.func1()
	/.cache/mod/github.com/siderolabs/go-procfs@v0.1.1/procfs/cmdline.go:129 +0x78
...

Logs
talosctl version
Client:
	Tag:         v1.4.5
	SHA:         45679b0e
	Built:
	Go version:  go1.20.4
	OS/Arch:     darwin/arm64
Server:
	NODE:        192.168.120.20
	Tag:         v1.4.4
	SHA:         168114fc
	Built:
	Go version:  go1.20.4
	OS/Arch:     linux/amd64
	Enabled:     RBAC

Environment


Talos version: [talosctl version --nodes <problematic nodes>]
See above


Kubernetes version: [kubectl version --short]


Client Version: v1.27.1
Kustomize Version: v5.0.1
Server Version: v1.27.1


Platform:

sw_vers
ProductName:		macOS
ProductVersion:		13.4
BuildVersion:		22F66

Duplicate issue #7349: talosctl dashboard panic: /proc/cmdline: no such file or directory
Created: 2023-06-09T14:52:58Z
Bug Report
Description
Logs
talosctl dashboard
panic: open /proc/cmdline: no such file or directory

goroutine 1 [running]:
github.com/siderolabs/go-procfs/procfs.ProcCmdline.func1()
	/.cache/mod/github.com/siderolabs/go-procfs@v0.1.1/procfs/cmdline.go:129 +0x57
sync.(*Once).doSlow(0xc0010a1118?, 0x100d62a?)
	/toolchain/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/toolchain/go/src/sync/once.go:65
github.com/siderolabs/go-procfs/procfs.ProcCmdline()
	/.cache/mod/github.com/siderolabs/go-procfs@v0.1.1/procfs/cmdline.go:126 +0x31
github.com/siderolabs/talos/internal/pkg/dashboard.(*ConfigURLGrid).readTemplateFromKernelArgs(0xc000903040?)
	/src/internal/pkg/dashboard/configurl.go:123 +0x1d
github.com/siderolabs/talos/internal/pkg/dashboard.NewConfigURLGrid({0x394a248, 0xc0012fe0c0}, 0xc000288140)
	/src/internal/pkg/dashboard/configurl.go:60 +0x397
github.com/siderolabs/talos/internal/pkg/dashboard.buildDashboard({0x394a248, 0xc0012fe0c0}, 0xc000714750, {0xc0010a1898, 0x3, 0x20?})
	/src/internal/pkg/dashboard/dashboard.go:163 +0x7ff
github.com/siderolabs/talos/internal/pkg/dashboard.Run({0x394a248, 0xc0012fe0c0}, 0xc0012fe090?, {0xc0010a1898?, 0x0?, 0x0?})
	/src/internal/pkg/dashboard/dashboard.go:296 +0x4c
github.com/siderolabs/talos/cmd/talosctl/cmd/talos.glob..func17.1({0x394a248, 0xc0012fe0c0}, 0xc00050b1f0?)
	/src/cmd/talosctl/cmd/talos/dashboard.go:41 +0x133
github.com/siderolabs/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClient.func1({0x394a1a0?, 0xc0012283c0?}, 0xc000714750)
	/src/cmd/talosctl/pkg/talos/global/client.go:93 +0x115
github.com/siderolabs/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClientNoNodes.func1({0x394a1a0, 0xc0012283c0})
	/src/cmd/talosctl/pkg/talos/global/client.go:66 +0x5e2
github.com/siderolabs/talos/pkg/cli.WithContext({0x394a1d8?, 0xc00005a108?}, 0xc0010a1b60)
	/src/pkg/cli/context.go:40 +0x1d1
github.com/siderolabs/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClientNoNodes(0x0?, 0x0?, {0x0?, 0x0?, 0x0?})
	/src/cmd/talosctl/pkg/talos/global/client.go:34 +0x6b
github.com/siderolabs/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClient(0x0?, 0x0?, {0x0?, 0x0?, 0x0?})
	/src/cmd/talosctl/pkg/talos/global/client.go:76 +0x48
github.com/siderolabs/talos/cmd/talosctl/cmd/talos.WithClient(...)
	/src/cmd/talosctl/cmd/talos/root.go:46
github.com/siderolabs/talos/cmd/talosctl/cmd/talos.glob..func17(0x4fca4e0?, {0x55723c0?, 0x0?, 0x0?})
	/src/cmd/talosctl/cmd/talos/dashboard.go:40 +0x2e
github.com/spf13/cobra.(*Command).execute(0x4fca4e0, {0x55723c0, 0x0, 0x0})
	/.cache/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x4fc31e0)
	/.cache/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
	/.cache/mod/github.com/spf13/cobra@v1.6.1/command.go:977
github.com/siderolabs/talos/cmd/talosctl/cmd.Execute()
	/src/cmd/talosctl/cmd/root.go:53 +0x3be
main.main()
	/src/cmd/talosctl/main.go:19 +0x25

Environment
Client:
Tag:         v1.4.5
SHA:         45679b0
Built:
Go version:  go1.20.4
OS/Arch:     darwin/amd64

Talos version: 1.4.5
Kubernetes version: 1.27.2
Platform: MacOS

Closing comment (2023-06-09T14:54:06Z): Duplicate of #7336.
The fix will come in the next release