Page MenuHomePhabricator

Is it possible to run webservice restart in toolforge-jobs?
Closed, DuplicatePublic

Description

(at least in some images?)

Steps to reproduce
(obviously my code is a little bit more complex, it checks whether webservice runs with http request and decides to restart webservice based on resulting http error code)

  1. $ echo "webservice restart" > when_issue.sh
  2. $ toolforge-jobs run myscheduledjob --command ./when_issue.sh --image tf-bullseye-std --schedule "0 0 1 * *"

Expected behavior
webservice restart worked in grid.

Current behavior
There is no webservice (both standalone and sssd):

$ cat myscheduledjob.out 
$ cat myscheduledjob.err
./when_issue.sh: line 2: webservice: command not found

Event Timeline

T246540: Some webservice-created applications do not have functioning liveness checks is probably what really needs fixing rather than the bandaid of making it more possible for folks to invent their own liveness monitoring + restart logic. T314053: Allow automatically restarting tool web services if non OK error code could probably be considered a duplicate of this as well.

I forgot about this one, but the new one I created is much more broadly described and is linked to more related tasks