Multiple user support - can't acquire lock
Hello Platformers,
I'm having an issue where multiple users on a server can't use the Platform.SH CLI except whoever was the first user to use it. The lock file is in their name and the platform command fails silently for all subsequent users.
I'm using version: Platform.sh CLI 5.0.23 It was installed via the bash/curl method. OS: Ubuntu server 24.04
There are 2 issues at play here that I'm hoping to get some help with:
- the fatal failure of the CLI was hidden behind the debug level. It would have been great for this to be reported to the command line. That would make troubleshooting far easier.
- the script doesn't appear to support multiple concurrent users with it's current lock-file approach.
I found what appears to be 2 related issues.
Related issues:
- #47
- #177
Thanks for any help with this.
In the short term I'm going to try what was recommended in #47 and set a different tmp directory per user.
Is there a better recommended approach I should be using instead?
Confirming that setting up an alternative temp directory per user for this app is a valid workaround.
# Have each user create a temp dir in their home folder
mkdir ~/.tmp
# Set the tempdir for each use of the platform cli
TMPDIR=~/.tmp platform
We've set an alias for the platform command with the custom tmpdir to simplify the ongoing usage.
Hello, if I understand correctly, this should have been fixed by #94 , available from version 5.1.0, as the CLI now saves the lock file under the home directory rather than /tmp