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

Dump Kubernetes YAML/CRD on kernel startup fails #1249

Merged

Conversation

lresende
Copy link
Member

@lresende lresende commented Feb 4, 2023

A submitted kernel can fail due to the malformation of
YAML/CRD contents and in this case, dumping the
files in the log can help with problem determination.

lresende and others added 2 commits February 4, 2023 08:32
A submitted kernel can fail due to malformation of
YAML/CRD contents and in this case, dumping the files
in the log can help with problem determination.
@@ -225,6 +225,8 @@ def launch_kubernetes_kernel( # noqa
f"kernel launch terminating!"
)
else:
print("ERROR processing Kubernetes yaml file - kernel launch terminating!")
print(k8s_yaml)
Copy link
Member

Choose a reason for hiding this comment

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

Hi @lresende. Do you have an example of what the print output looks like? I suspect this will output the entire yaml on a single line and I wonder, since this would be used primarily for troubleshooting, if using pretty print pprint would be more helpful?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does in a pretty way, at least on the spark operator:

apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
  name: xxxx-dafe8b37-9579-4cda-a8ab-d9f33a6dadba
  labels:
    proxyUser: "xxxxx"
spec:
  serviceAccountName: xxx
  mode: cluster
  type: Python

Copy link
Member

Choose a reason for hiding this comment

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

Ok. Cool.

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Thanks @lresende, this will be helpful.

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Thanks @lresende, this will be useful.

@kevin-bates kevin-bates merged commit 31b3a9e into jupyter-server:main Feb 5, 2023
@lresende lresende deleted the apple-dump-yaml-on-failure branch February 6, 2023 05:21
@kevin-bates kevin-bates added gateway-provisioners-ported Has been ported to gateway-provisioners and removed gateway-provisioners Has application for gateway-provisioners (EG 4.0) labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gateway-provisioners-ported Has been ported to gateway-provisioners kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants