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

Add doc about running debug directly from assisted-service container #6059

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkopilov
Copy link

@bkopilov bkopilov commented Mar 6, 2024

Allow us to debug code directly from assisted-service container.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 6, 2024
Copy link

openshift-ci bot commented Mar 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bkopilov
Once this PR has been reviewed and has the lgtm label, please assign avishayt for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 6, 2024
Copy link

openshift-ci bot commented Mar 6, 2024

Hi @bkopilov. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@eifrach
Copy link
Contributor

eifrach commented Mar 6, 2024

nice I like it.

@paul-maidment @carbonin
can you give us your input as well ?

docs/dev/debug_delve.md Outdated Show resolved Hide resolved
docs/dev/debug_delve.md Outdated Show resolved Hide resolved
docs/dev/debug_delve.md Outdated Show resolved Hide resolved
Allow us to debug code directly from assisted-service container.
```shell
oc rsh -n assisted-installer [pod/assisted-service-name]
# install packages git goland and telnet
dnf install procps psmisc golang delve iproute iputils telnet net-tools git -y
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any scenario where this is desirable over using the debug image?

Copy link
Author

Choose a reason for hiding this comment

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

The only case i can think about is existnig minikue setup and we want to jump in and attach to golang binary to debug ... it might be service but also from agent too on hosts .
Just have a setup and want to get hands dirty quickly .... of course when we reboot the pod all installed stuff deleted....

anyway its up to you , i used to work with python pdb and asked to do the same with golang :) remote ide is also great but you will have to do all preperation before ....

Copy link
Contributor

Choose a reason for hiding this comment

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

You have a good point, I think it's good to document and we have binaries where we do not provide debug tooling.
Maybe we could leverage the image in some cases, but in other it could be preferred to install tools.
Can we add a couple of lines mentioning the image approach?

Copy link
Author

@bkopilov bkopilov Mar 7, 2024

Choose a reason for hiding this comment

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

@paul-maidment Adding Paul about image approach . also we may have a seperate flow for image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants