-
Notifications
You must be signed in to change notification settings - Fork 531
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
chore: support debug shell for advanced development #9201
base: main
Are you sure you want to change the base?
Conversation
b846292
to
6e78657
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good, will rebase eudev stuff on top of this and try looking further
@@ -113,6 +114,14 @@ func (check *preflightCheckContext) swtpmExecutable(ctx context.Context) error { | |||
return nil | |||
} | |||
|
|||
func (check *preflightCheckContext) numberOfNodesWhenDebugShellEnabled(ctx context.Context) error { | |||
if check.options.WithDebugShell && len(check.request.Nodes.ControlPlaneNodes())+len(check.request.Nodes.WorkerNodes()) > 1 { | |||
return fmt.Errorf("error: --with-debug-shell is not supported with more than one node") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to restrict this? I believe there's zero issue having multiple sockets, accessible like socat - UNIX-CONNECT:/tmp/tl-test-home/.talos/clusters/talos-default/talos-default-controlplane-1.serial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this was when i was using graphical window to debug, then more than one is a little messy 😅
@frezbo Won't you mind if I push subsequent changes I do to this PR and finalize it to be merged? It helps debugging udev+selinux, so might help us in the future as well. Thanks for implementing this feature! |
👍 |
Support dropping into a very minimal debug shell. ```bash sudo -E --preserve-env=HOME _out/talosctl-linux-amd64 cluster create --provisioner=qemu $REGISTRY_MIRROR_FLAGS --controlplanes=1 --workers=0 --with-bootloader=false --with-debug-shell ``` Signed-off-by: Noel Georgi <[email protected]>
Actually we don't have any issues creating multiple sockets Signed-off-by: Dmitry Sharshakov <[email protected]>
Signed-off-by: Dmitry Sharshakov <[email protected]>
343988b
to
29b4a7f
Compare
Signed-off-by: Dmitry Sharshakov <[email protected]>
5867c99
to
9ffbff5
Compare
@frezbo could you please take a look at my changes? |
@@ -42,6 +42,8 @@ ARG PKG_CNI | |||
ARG PKG_FLANNEL_CNI | |||
ARG PKG_TALOSCTL_CNI_BUNDLE_INSTALL | |||
|
|||
ARG DEBUG_TOOLS_SOURCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not used anywhere below, so all the debug stuff would get copied always which we don't want
Support dropping into a very minimal debug shell.
sudo -E --preserve-env=HOME _out/talosctl-linux-amd64 cluster create --provisioner=qemu $REGISTRY_MIRROR_FLAGS --controlplanes=1 --workers=0 --with-bootloader=false --with-debug-shell