bitwalker / distillery-aws-example

An example application to go with the AWS guide in the Distillery documentation
Apache License 2.0
52 stars 73 forks source link

Error after updating to latest distillery version #4

Closed ntilwalli closed 6 years ago

ntilwalli commented 6 years ago

The posted example app uses {:distillery, ">= 2.0.0-rc.8"} After updating to use the latest version {:distillery, "~> 2.0"} I get the following error during AWS deployment:

Error Code: ScriptFailed
Script Name: bin/migrate
Message: Script at specified location: bin/migrate run as user ec2-user failed with exit code 1
Log Tail:

LifecycleEvent - ApplicationStart
Script - bin/migrate
[stdout]Failed setting -name! The hostname in 'distillery_example@${DEFAULT_IPV4}' is not fully qualified

It is caused by a significant change in the config.sh script that is deployed to libexec. https://github.com/bitwalker/distillery/blob/master/priv/libexec/config.sh#L177

When REPLACE_OS_VARS and RELEASE_READ_ONLY are both set with values (which is true about the bin/migrate script), the DEFAULT_IPV4 variable is not runtime substituted and in the updated script this lack of substitution is considered an error.

How to fix? I would PR but I don't know what the right approach is. Should the migrate script not be set to be RELEASE_READ_ONLY?