"cannot get bootfile": was there a change to the Machine's /etc/hosts recently?

Hi Ryan,

Newer versions of rel/env.sh.eex use this to generate RELEASE_NODE instead:

export RELEASE_NODE="${FLY_APP_NAME}-${FLY_IMAGE_REF##*-}@${FLY_PRIVATE_IP}"

Under some “abrupt machine stop” circumstances, /etc/hosts gets duplicated (i.e. a copy of itself is appended at the end of the files), and the presence of duplicated records are what confuses the old RELEASE_NODE determination code; when you cleanly restart the machine, the hosts file gets fixed, which explains why things worked after a reboot.

Specifically ip=$(grep fly-local-6pn /etc/hosts | cut -f 1) will produce funny stuff if more than one line mentions fly-local-6pn; you could always | head -1 but the new way of generating RELEASE_NODE is overall more reliable.

I would suggest updating your env.sh.eex as seen above and that should work reliably even when a machine stops abruptly.

Regards,

  • Daniel