Page MenuHomePhabricator

Evaluate running from a shared binary
Open, Needs TriagePublic

Description

Imported from https://github.com/wikimedia/countervandalism-CVNBot/issues/34.

@Krinkle wrote on 27 Oct 2017:

I'm not entirely sure, but it should be possible to have the multiple instances on the same server run from the same executable.

Right now the executable assumes a specific working directory where everything is self-contained. And I wouldn't be surprised if some parts of the code actually lookup paths relative to where the binary is stored as opposed to relative to the current working directory.

Status quo:

  • Moving the executable currently makes the process fail.
  • Not running it from the bot's own working directory also makes the process fail.

Assuming multiple instances of the same executable isn't infeasible in general, we can make it work for multiple instances either by standardising on utilizing the current working directory for everything, or (better yet) by passing the bot directory via command-line argument.

We'd need to make sure that argument gets preserved on respawn/restart.

Current deployment process: