When userdata exits with an error, the error handling checks output and tries to classify the error to print out some helpful message (with content type).
This message is confusing when scripts themselves run into issues that "grok" as exec format errors (intended to help determine issues with the provided userdata script itself, not from errors in the userdata script's execution).
Concerned line:
|
return fmt.Sprintf("provided user data is not executable (detected type: %s)", contentType), nil |
Instead, we should only print the helpful message when the userdata itself is found to be an unsuitable format.
When userdata exits with an error, the error handling checks output and tries to classify the error to print out some helpful message (with content type).
This message is confusing when scripts themselves run into issues that "grok" as exec format errors (intended to help determine issues with the provided userdata script itself, not from errors in the userdata script's execution).
Concerned line:
ec2-macos-init/lib/ec2macosinit/userdata.go
Line 54 in 97875d5
Instead, we should only print the helpful message when the userdata itself is found to be an unsuitable format.