I have an app that I originally set up in the
atl datacenter, and a database running in the
dfw datacenter. I realized these were not in the same place, so deleted the app and re-created it in
dfw under the same name.
Now it appears that my app will spin up in either of the two data centers. My app has been crashing due to some bugs, and when it is spun up after a crash it appears to switch back to the original data center.
Is this because I used the same name for the app, and there’s a bug in
flyctl which surfaces when the same app name is used with different data centers?
Basic repo case: (not specifically tested, but this is what I think is happening)
- Create an app in
- Delete the app
- Create an app in the
dfwdata center with the same name as in step 1
- Deploy the app
The app is in the
dfwdata center, as expected
- Let it crash for some reason (in my case it was memory exhaustion)
- Sometimes the app appears back in the original data center from step #1
In the logs below, we see the app in
atl, then a deploy, then the app in
dfw. I don’t have logs showing it jumping from
atl, but I can definitively say that I didn’t modify the app config between the first and second part of the log. (This log is contiguous output from
fly logs, not a cut and paste.)
2022-01-03T02:37:56.595 app[c3baf174] atl [info]02:37:56.594 request_id=FsaiODnErUYc-AIAAAGh [info] GET / 2022-01-03T02:37:56.596 app[c3baf174] atl [info]02:37:56.595 request_id=FsaiODnErUYc-AIAAAGh [info] Sent 200 in 747µs 2022-01-03T02:37:57.848 app[c3baf174] atl [info]02:37:57.847 request_id=FsaiOIR5me5_eu8AAAGx [info] GET /favicon.ico 2022-01-03T02:37:57.849 app[c3baf174] atl [info]02:37:57.848 request_id=FsaiOIR5me5_eu8AAAGx [info] Sent 404 in 490µs 2022-01-03T02:39:54.968 runner[074cf0c6] dfw [info]Starting instance 2022-01-03T02:39:54.998 runner[074cf0c6] dfw [info]Configuring virtual machine 2022-01-03T02:39:55.000 runner[074cf0c6] dfw [info]Pulling container image 2022-01-03T02:39:58.090 runner[074cf0c6] dfw [info]Unpacking image 2022-01-03T02:40:01.846 runner[074cf0c6] dfw [info]Preparing kernel init 2022-01-03T02:40:02.289 runner[074cf0c6] dfw [info]Configuring firecracker 2022-01-03T02:40:02.290 runner[074cf0c6] dfw [info]Starting virtual machine 2022-01-03T02:40:02.437 app[074cf0c6] dfw [info]Starting init (commit: 7943db6)... 2022-01-03T02:40:02.454 app[074cf0c6] dfw [info]Preparing to run: `/app/entry eval Inboxhero.Release.migrate` as nobody