Page MenuHomePhabricator

Install `qstat-full` in `/usr/local/bin` instead of `/usr/local/sbin/qstat-full`
Closed, ResolvedPublic

Description

(unless the intent is to have this as an admin-only tool).

On Trusty bastions /usr/local/sbin is in everyones $PATH, but on Stretch, this is not the case.

See https://phabricator.wikimedia.org/T218494#5030165.

Event Timeline

For reference, the sbin folder is historically intended to contains executable with the S bit allowing privilege escalation and nowadays intended to contains tool only launchable by root or other administrative users.

Change 497216 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/puppet@production] toolforge: Install qstat-full in /usrr/local/bin

https://gerrit.wikimedia.org/r/497216

This wrapper script should probably be moved from ops/puppet into our jobutils package. This would provision it into /usr/bin and also ensure that it is available everywhere that jsub is.

The current script is also kind of easy to break:

$ qstat-full -j 3205243
column: line too long
column: line too long
column: line too long
eqiad.wmflabs"  dropped  because  it  is  disabled  39  queue  instance  "mailq@tools-exec-1428.tools.eqiad.wmflabs"  dropped  because  it  is  disabled  39  queue  instance  "mailq@tools-exec-1429.tools.eqiad.wmflabs"  dropped  because  it  is  disabled  39  queue  instance  "mailq@tools-exec-1430.tools.eqiad.wmflabs"  dropped  because  it  is  disabled  39  queue  instance  "mailq@tools-exec-1431.tools.eqiad.wmflabs"  dropped  because  it  is  disabled  39  queue  instance  "mailq@tools-exec-1432.tools.eqiad.wmflabs"  dropped  because  it  is  disabled

Change 497216 had a related patch set uploaded (by Andrew Bogott; owner: Bryan Davis):
[operations/puppet@production] toolforge: Install qstat-full in /usr/local/bin

https://gerrit.wikimedia.org/r/497216

Change 497216 merged by Andrew Bogott:
[operations/puppet@production] toolforge: Install qstat-full in /usr/local/bin

https://gerrit.wikimedia.org/r/497216

bd808 claimed this task.