akaruk01
akaruk01

Reputation: 11

Updating a Dataproc cluster (metadata or labels) directly while in initialization actions script

I'd like to save more specific errors in the case of a failed initialization script of a Dataproc cluster. Is it possible to update the cluster metadata or add a label to the cluster (without using gcloud dataproc clusters update) from within the script? Or any other method to write a more useful error message? Thanks in advance!

Upvotes: 1

Views: 313

Answers (1)

tix
tix

Reputation: 2158

If your goal is to report an error from within an initialization action, there is a feature within Dataproc to extract messages from init action output.

As long as you emit a message in this format: StructuredError{message}

For example:

message="something went wrong"
echo "StructuredError{${message}}"

Upvotes: 1

Related Questions