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

chore: support debug shell for advanced development #9201

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

frezbo
Copy link
Member

@frezbo frezbo commented Aug 19, 2024

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

@dsseng dsseng self-requested a review August 19, 2024 18:36
Copy link
Member

@dsseng dsseng left a 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

Dockerfile Outdated Show resolved Hide resolved
pkg/provision/providers/qemu/preflight.go Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@dsseng dsseng self-assigned this Oct 5, 2024
@dsseng
Copy link
Member

dsseng commented Oct 5, 2024

@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!

@frezbo
Copy link
Member Author

frezbo commented Oct 5, 2024

@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!

👍

@dsseng dsseng marked this pull request as ready for review October 6, 2024 12:25
@dsseng
Copy link
Member

dsseng commented Oct 10, 2024

@frezbo could you please take a look at my changes?

Dockerfile Show resolved Hide resolved
@@ -87,6 +90,14 @@ func Switch(prefix string, mountpoints *mount.Points) (err error) {
log.Printf("race detection enabled with halt_on_error=1")
}

if val := procfs.ProcCmdline().Get("talos.debugshell"); val != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smira should we document this in kernel args?

Copy link
Member Author

@frezbo frezbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒 👍

We might document in developing talos maybe, I can't approve my own PR

@smira
Copy link
Member

smira commented Oct 17, 2024

🆒 👍

We might document in developing talos maybe, I can't approve my own PR

yes, it'd be nice to add it here: https://www.talos.dev/v1.9/advanced/developing-talos/

@dsseng
Copy link
Member

dsseng commented Oct 17, 2024

🆒 👍
We might document in developing talos maybe, I can't approve my own PR

yes, it'd be nice to add it here: https://www.talos.dev/v1.9/advanced/developing-talos/

Should I do it right in this PR?

@smira
Copy link
Member

smira commented Oct 17, 2024

🆒 👍
We might document in developing talos maybe, I can't approve my own PR

yes, it'd be nice to add it here: talos.dev/v1.9/advanced/developing-talos

Should I do it right in this PR?

yep, so that it is complete

@dsseng dsseng force-pushed the chore/initrd-debug-support branch 4 times, most recently from 3694df6 to e6ce9be Compare October 19, 2024 09:07
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
```

Co-authored-by: Dmitry Sharshakov <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
Signed-off-by: Dmitry Sharshakov <[email protected]>
@dsseng
Copy link
Member

dsseng commented Oct 19, 2024

/m

@talos-bot talos-bot merged commit 1b22df4 into siderolabs:main Oct 19, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants