Page MenuHomePhabricator

Webservice should produce better diagnostic message when attempting to nest sessions
Open, LowPublicFeature

Description

This conversation happened today on IRC ##wikimedia-cloud:

[09:28:14]  <magog_the_ogre> Could someone assist me with what I'm doing wrong while invoking webservice shell?
[09:28:26]  <magog_the_ogre> tools.magog@shell-1679230556:~$ webservice --backend=kubernetes node16 shell whoami
[09:28:26]  <magog_the_ogre> Traceback (most recent call last):
[09:28:26]  <magog_the_ogre>   File "/usr/bin/webservice", line 493, in <module>
[09:28:26]  <magog_the_ogre>     sys.exit(job.shell())
[09:28:26]  <magog_the_ogre>   File "/usr/lib/python3/dist-packages/toolsws/backends/kubernetes.py", line 657, in shell
[09:28:27]  <magog_the_ogre>     kubectl = subprocess.Popen(cmd, env=shell_env)
[09:28:29]  <magog_the_ogre>   File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
[09:28:31]  <magog_the_ogre>     self._execute_child(args, executable, preexec_fn, close_fds,
[09:28:35]  <magog_the_ogre>   File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
[09:28:37]  <magog_the_ogre>     raise child_exception_type(errno_num, err_msg, err_filename)
[09:28:39]  <magog_the_ogre> FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/kubectl'
[09:37:44]  <+wm-bb> <lucaswerkmeister> that prompt looks like you're already inside a webservice shell and trying to launch a nested one? idk if that's supported
[09:52:07]  <taavi> magog_the_ogre: yes, lucas is correct, you are already inside a webservice shell
[10:18:48]  <magog_the_ogre> thank you

This seems like a common error (I'm pretty sure I've made it myself) so it should produce a less cryptic message.

Event Timeline

taavi triaged this task as Low priority.Mar 19 2023, 3:38 PM
taavi edited projects, added Toolforge; removed Cloud-Services.
taavi updated the task description. (Show Details)