Page MenuHomePhabricator

Choosing a wrong host with transfer.py produces an "ERROR: The specified source path X doesn't exist on Y"
Closed, ResolvedPublic

Description

I been bitten by this misleading error message a few times. If I run:

$ transfer.py cumin2001.eqiad.wmnet:/home/jynus/tendril/web/index.php db1077.eqiad.wmnet:/home/jynus
2020-07-02 09:49:57  ERROR: The specified source path /home/jynus/tendril/web/index.php doesn't exist on cumin2001.eqiad.wmnet

But my mistake was to run it with cumin2001.eqiad.wmnet instead of cumin2001.codfw.wmnet, I chose the wrong host.

Probably the logic was that because checking for existence failed, it assumed that the file/dir didn't exist, rather than the host didn't exist. Could cumin execution be parsed to mark it was a host error rather than a path error, on both source and target? Or maybe test for host validity beforehand?

Event Timeline

Parsing cumin output seems to be a better idea, let me check the output of cumin in this kind of cases.

Change in opinion :D Our code has specific tests for all the cases, So I will make one for host validity also, that way it will be aligned to the existing code.

Change 609136 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Transferer.py: Produce correct error when users try with a wrong host.

https://gerrit.wikimedia.org/r/c/operations/software/transferpy/ /609136

Change 609136 merged by Jcrespo:
[operations/software/transferpy@master] Transferer.py: Produce correct error when users try with a wrong host.

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

jcrespo claimed this task.

I believe this to be fixed. Updated package will come soon for production.