While setting up loki as a log store at fly, I ran into an issue with a vm that I’m unable to shut down:
Deployment Status
ID = 77c6eec9-fee9-2c3f-ee79-80368634696e
Version = v2
Status = failed
Description = Failed due to unhealthy allocations - no stable job version to auto revert to
Instances = 1 desired, 1 placed, 0 healthy, 1 unhealthy
Instances
ID TASK VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
8ea17a1f release_command 2 ⇡ scl run failed 1 total 2 11m5s ago
aa721c89 app 1 scl stop failed 1 total 2 18m15s ago
6ca794d5 app 0 scl stop failed 1 total 2 27m23s ago
$ flyctl suspend
Error Invalid VM group:
status: failed means it is shut down. Am I misunderstanding what you’re seeing here?
The release_command process wont do what you want, I don’t think. There’s currently no way to run a command before release on an app with volumes mounted. For what I think you’re trying to do, you’ll be better off creating a run.sh script, adding it to your Docker image, then setting that as the command:
FROM grafana/loki:2.3.0
ADD run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/run.sh
CMD /usr/local/bin/run.sh
Perhaps I’m just not fully understanding it. I was able to redeploy a few times while testing the setup and am now reached by:
$ flyctl deploy
Deploying my-app
==> Validating app configuration
--> Validating app configuration done
Searching for image 'grafana/loki:2.3.0' remotely...
image found: img_jy7nxpkw51rp8w25
Image: registry-1.docker.io/grafana/loki:2.3.0
Image size: 21 MB
==> Creating release
Error not enough volumes named loki_storage (1) to run 2 processes
Edit: no more deployment-related issues after removing the release_command stuff.
The release_command process wont do what you want, I don’t think. There’s currently no way to run a command before release on an app with volumes mounted.
Ok, I was being a bit “smart” with these experimental commands - I will go the shell evaluation route instead then.
It’s trying to run both release_command and app scripts at the same time. Unlike Heroku, the release_command process type isn’t magical. It would be the same as naming that worker or something.