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 how-to troubleshoot for charm deployments #953

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

Conversation

berkayoz
Copy link
Member

Adds a How-To page on troubleshooting a Canonical Kubernetes charm deployment

@berkayoz berkayoz force-pushed the KU-2407/charm-troubleshooting branch from f185610 to 398c4b4 Compare January 13, 2025 11:16
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Thanks for your great work Berkay!
Please consider the comments I made on https://github.com/canonical/k8s-snap/pull/943/files and also apply them to this PR.

docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
@berkayoz berkayoz force-pushed the KU-2407/charm-troubleshooting branch from 398c4b4 to 4c89656 Compare January 13, 2025 20:26
@addyess
Copy link
Contributor

addyess commented Jan 13, 2025

thanks for adding the reference/troubleshooting for charms.

I'm adding more details to it in #949

@berkayoz berkayoz marked this pull request as ready for review January 13, 2025 20:30
@berkayoz berkayoz requested a review from a team as a code owner January 13, 2025 20:30
Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

Nice work here. looking really good

Comment on lines +175 to +186
## Using the built-in inspection script

{{product}} ships with a script to compile a complete report on {{product}} and its underlying system. This is an essential tool for bug reports and for investigating whether a system is (or isn’t) working.

Inspection script can be executed on a specific unit by running the following commands:

```
juju exec --unit <k8s/unit#> -- sudo /snap/k8s/current/k8s/scripts/inspect.sh /home/ubuntu/inspection-report.tar.gz
juju scp <k8s/unit#>:/home/ubuntu/inspection-report.tar.gz ./
```
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM, minor nit.

@@ -29,6 +29,7 @@ custom-registry
Upgrade patch version <upgrade-patch>
Upgrade minor version <upgrade-minor>
Validate the cluster <validate>
troubleshooting
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: let's align this with the pattern Title <link> above for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

How to troubleshoot {{product}} does not seem to work in that pattern. Should we drop the {{product}} part and change the title into just Troubleshooting ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on Troubleshooting for the navbar. Leaving the header as is in the page itself is fine.

Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Lovely! Thanks so much!
Consider adding upstream troubleshooting links if you do the same for the other PR.

docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
@berkayoz berkayoz force-pushed the KU-2407/charm-troubleshooting branch from 4c89656 to fc587d3 Compare January 14, 2025 10:11
Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

I've added some comments regarding how to get the kube-config out of the charm. I suggesting using /leader instead of /0 since its far more likely to be accurate with any deployed model.

Also, I provided some notes about parsing the output of the action. You should run the output of the actions through yq in order to extract the kubeconfig file from the response

docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/charm/howto/troubleshooting.md Outdated Show resolved Hide resolved
@berkayoz berkayoz force-pushed the KU-2407/charm-troubleshooting branch from 1127646 to 65d1942 Compare January 15, 2025 07:43
@nhennigan
Copy link
Contributor

Great work. Just a small change to how it shows in the navbar and then we are good to merge

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.

6 participants