Creating Volume for App in one particular region(SIN) automatically shifts App to another region
Describe the bug Is this behavior because its not possible to create a volume in Singapore? If so why does the volume still label itself as being situated in Singapore. The application is moved to some far away server in another region. I am attempting to attaching a volume through my fly.toml config but have been stuck with this problem of non-compatible regions
-
Operating system
5.16.16-arch1-1 -
fly version
flyctl v0.0.308 linux/amd64
app = "$APP"
kill_signal = "SIGTERM"
kill_timeout = 5
processes = []
[deploy]
release_command = "/app/bin/migrate"
[env]
PHX_HOST = "$APP.fly.dev"
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
fly volumes create archive --region sin
ID: vol_w1q85vgjdk8vzdxe
Name: archive
App: $APP
Region: sin
Zone: 0417
Size GB: 10
Encrypted: true
Created at: 03 Apr 22 15:38 UTC
THough the volume states the region as sin, the app automatically undergoes a release shifting region to GRU and MAD
Attempting to revert back to sin prompts me to delete the volume instead fly regions add sin
Error App '$APP' uses volumes to control regions. Add or remove volumes to change region placement.
Volumes are unattached when you create them. You need to add a section to your config to make your app use a volume:
[mounts]
source = "archive"
destination = "/data"
The error you're hitting is a validation on our end that doesn't really make sense when the volume is unmounted. We should still let you control regions when volumes aren't actually being used.
Indeed it only acts funky jumping regions before I add the necessary mountpoint to my configuration. Once I had done that and pushed for deployment the region returns to where the volume was created as expected
Ok, good catch. We can clean up that funky, and possibly even show a warning if you run commands on an app with volumes and no [mount] section.
@mrkurt is this something I can help with?
Thanks for reporting this. This came from the old Nomad region-pool path, which was removed in #3253. Current Machines use explicit regional scaling, and fly regions add is no longer supported, so I’m going to close this as obsolete. Please reopen if creating a volume still moves current Machines into unrelated regions.