cli icon indicating copy to clipboard operation
cli copied to clipboard

Multiple user support - can't acquire lock

Open gerard-ninnes-cer opened this issue 8 months ago • 1 comments

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

Image

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?

gerard-ninnes-cer avatar Apr 29 '25 06:04 gerard-ninnes-cer

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.

gerard-ninnes-cer avatar May 05 '25 00:05 gerard-ninnes-cer

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

pjcdawkins avatar Sep 01 '25 05:09 pjcdawkins