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

[K8S] Show more details for pod/container status in application error #6053

Closed
wants to merge 2 commits into from

Conversation

turboFei
Copy link
Member

@turboFei turboFei commented Feb 7, 2024

🔍 Description

Now the information for k8s app error is too short and confuse.

For example:

App Id: spark-8d04e31b6c9540f6952fde81fcc4e19f                                                          
App State: FAILED                                                                                       
App Diagnostic: kyuubi-spark-2c7d0d5a-c25b-4b36-bcd0-250c97c90025-driver/spark-kubernetes-driver[Error]

We need to provide more information to help debug.

For PodStatus:

    public String toString() {
        return "PodStatus(conditions=" + this.getConditions() + ", containerStatuses=" + this.getContainerStatuses() + ", ephemeralContainerStatuses=" + this.getEphemeralContainerStatuses() + ", hostIP=" + this.getHostIP() + ", initContainerStatuses=" + this.getInitContainerStatuses() + ", message=" + this.getMessage() + ", nominatedNodeName=" + this.getNominatedNodeName() + ", phase=" + this.getPhase() + ", podIP=" + this.getPodIP() + ", podIPs=" + this.getPodIPs() + ", qosClass=" + this.getQosClass() + ", reason=" + this.getReason() + ", resize=" + this.getResize() + ", startTime=" + this.getStartTime() + ", additionalProperties=" + this.getAdditionalProperties() + ")";
    }

For ContainerState:

    public String toString() {
        return "ContainerState(running=" + this.getRunning() + ", terminated=" + this.getTerminated() + ", waiting=" + this.getWaiting() + ", additionalProperties=" + this.getAdditionalProperties() + ")";
    }

In this pr, we show the PodStatus or ContainerState directly and provide more useful information.

Issue References 🔗

This pull request fixes #

Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests


Checklist 📝

Be nice. Be informative.

@turboFei turboFei force-pushed the pod_diagnose branch 2 times, most recently from c324244 to 426a5e1 Compare February 7, 2024 23:46
@turboFei turboFei self-assigned this Feb 7, 2024
@turboFei turboFei added this to the v1.9.0 milestone Feb 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (8c3f471) 61.12% compared to head (f8152e7) 61.02%.
Report is 1 commits behind head on master.

❗ Current head f8152e7 differs from pull request most recent head 34de08c. Consider uploading reports for the commit 34de08c to get more accurate results

Files Patch % Lines
...kyuubi/engine/KubernetesApplicationOperation.scala 0.00% 10 Missing ⚠️
.../java/org/apache/kyuubi/client/util/JsonUtils.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6053      +/-   ##
============================================
- Coverage     61.12%   61.02%   -0.11%     
  Complexity       23       23              
============================================
  Files           623      623              
  Lines         37186    37195       +9     
  Branches       5040     5041       +1     
============================================
- Hits          22730    22698      -32     
- Misses        12003    12042      +39     
- Partials       2453     2455       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@turboFei
Copy link
Member Author

turboFei commented Feb 8, 2024

merged to 1.9.0, thanks

zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
… in application error

# 🔍 Description
Now the information for k8s app error is too short and confuse.

For example:

```
App Id: spark-8d04e31b6c9540f6952fde81fcc4e19f
App State: FAILED
App Diagnostic: kyuubi-spark-2c7d0d5a-c25b-4b36-bcd0-250c97c90025-driver/spark-kubernetes-driver[Error]
```
We need to provide more information to help debug.

For PodStatus:
```
    public String toString() {
        return "PodStatus(conditions=" + this.getConditions() + ", containerStatuses=" + this.getContainerStatuses() + ", ephemeralContainerStatuses=" + this.getEphemeralContainerStatuses() + ", hostIP=" + this.getHostIP() + ", initContainerStatuses=" + this.getInitContainerStatuses() + ", message=" + this.getMessage() + ", nominatedNodeName=" + this.getNominatedNodeName() + ", phase=" + this.getPhase() + ", podIP=" + this.getPodIP() + ", podIPs=" + this.getPodIPs() + ", qosClass=" + this.getQosClass() + ", reason=" + this.getReason() + ", resize=" + this.getResize() + ", startTime=" + this.getStartTime() + ", additionalProperties=" + this.getAdditionalProperties() + ")";
    }
```
For ContainerState:
```
    public String toString() {
        return "ContainerState(running=" + this.getRunning() + ", terminated=" + this.getTerminated() + ", waiting=" + this.getWaiting() + ", additionalProperties=" + this.getAdditionalProperties() + ")";
    }
```

In this pr, we show the PodStatus or ContainerState directly and provide more useful information.

## Issue References 🔗

This pull request fixes #

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes apache#6053 from turboFei/pod_diagnose.

Closes apache#6053

34de08c [Fei Wang] pod status
f8152e7 [Fei Wang] Show more info

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants