aws / ec2-macos-init

EC2 macOS Init is the launch daemon used to initialize Mac instances within EC2.
https://aws.amazon.com/ec2/instance-types/mac/
Apache License 2.0
150 stars 19 forks source link

Failed Module Run Doesn't Log Message #5

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi, I'm trying to write a userdata script to install some software at launch. It's failing somewhere, but I don't know why. The problem is that when the userdata module (or any other module) fails (err != nil), the resulting log line only logs err, but not message:

https://github.com/aws/ec2-macos-init/blob/master/run.go#L115

In the case of the userdata module, the message variable would contain the contents of stdout and stderr, which would almost certainly help me debug my issue. As is, that information is gone when I go to log in and debug the problem, so I'm left guessing.

The irony is that it does log message when the script succeeds, exactly when I don't need it. :)

mattcataws commented 3 years ago

Hey, thanks for opening an issue to track this. We're working on a fix for this that will be included in a future update. Please let us know if any new data comes up regarding this issue.

mattcataws commented 3 years ago

This should now be fixed with the commit 33705b7. I'm going to close this issue but please include any more information and reopen it if the problem persists.