Hi,
I’m trying to do hot code upgrade using edeliver + distillery.
I made a new dummy commit with just some text change and version update (0.0.3 -> 0.0.4)
Releases work just fine, but when I try to do an upgrade, I’m getting below error:
==> Upgrade failed, version 0.0.3 does not exist:
expected at: rel/myapp/releases/0.0.3
A remote command failed on:
deploy@myapp.com
Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:
FAILED with exit status 1:
[ -f ~/.profile ] && source ~/.profile
set -e
cd /home/deploy/apps/myapp/app_build
if [ "mix" = "rebar" ]; then
echo "using rebar to generate release"
./rebar -f generate
elif [ "mix" = "relx" ]; then
echo "using relx to generate release"
./relx release
elif [ "mix" = "mix" ]; then
echo "using mix to generate release"
MIX_ENV="prod" LINK_SYS_CONFIG="" LINK_VM_ARGS="" APP="myapp" AUTO_VERSION="" BRANCH="master" SKIP_RELUP_MODIFICATIONS="" RELUP_MODIFICATION_MODULE="" USING_DISTILLERY="true" mix do release.version git-revision, release --verbose --env="prod" --name="myapp" --upgrade --upfrom="0.0.3"
fi
I’ve used these commands with the same result:
- mix edeliver build upgrade --with=0.0.3 --auto-version=git-revision
- mix edeliver upgrade production
Weird thing is, I think at the -----> Cleaning generated files from last build
step, it removes releases directory all together.
Before doing upgrade, I create and upload the release using: mix edeliver build release
Here’s an ls after this command:
deploy@ubuntu:~/apps/myapp$ ls -laF app_build/rel/myapp/releases/
total 20
drwxrwxr-x 3 deploy deploy 4096 Mar 18 01:35 ./
drwxrwxr-x 6 deploy deploy 4096 Mar 18 01:35 ../
drwxrwxr-x 5 deploy deploy 4096 Mar 18 01:35 0.0.3/
-rw-rw-r-- 1 deploy deploy 1819 Mar 18 01:35 RELEASES
-rw-rw-r-- 1 deploy deploy 9 Mar 18 01:35 start_erl.data
Anyone had similar issue?
PS: this is in my rel/config:
set output_dir: “rel/myapp”
any help would be really appreciated, thanks!