-
Notifications
You must be signed in to change notification settings - Fork 227
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
Dump Kubernetes YAML/CRD on kernel startup fails #1249
Conversation
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.
for more information, see https://pre-commit.ci
@@ -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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Cool.
There was a problem hiding this 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.
There was a problem hiding this 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.
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.