action #64322

Improve feedback on multi-machine API errors

Added by mkittler about 1 year ago. Updated about 1 year ago.

Feature requests
Target version:
Start date:
Due date:
% Done:


Estimated time:



Currently the error feedback of the multi-machine API is not great, e.g. when the creation of a mutex fails one only gets "return code 400" but no further information what the problem could be:

[2020-03-04T15:17:02.724 CET] [debug] mutex create 'radvd.mutex'
[2020-03-04T15:17:03.902 CET] [warn] !!! lockapi::mutex_create: Unknown return code 400 for lock api
[2020-03-04T15:17:03.983 CET] [debug] Create mutex failed at /var/lib/openqa/pool/22/os-autoinst-distri-opensuse/lib/ line 552.

In this case it would be good to know that the mutex name is considered invalid. Other multi-machine APIs likely have bad error feedback, too.

Further information

When looking into the error mentioned above I came up with the following suggestion:

The regex for the validation is defined in mutex_create in openQA/lib/OpenQA/WebAPI/Controller/API/V1/
The _validation_error helper defined in openQA/lib/OpenQA/WebAPI/Plugin/ would actually return a semi-useful error message. However, in api_call in os-autoinst/ or _try_lock in os-autoinst/ the error is not logged (just the return code 400). It would be good if the validation error would be logged so you would get at least "Invalid request parameters (name)" somewhere in the os-autoinst log. The message from the validation helper could be improved as well to make it clear why the name is considered invalid.

Attempt to improve the problem:

Related issues

Related to openQA Project - action #64075: Use validation consistently in WebAPI controllersResolved2020-03-02


#1 Updated by mkittler about 1 year ago

  • Related to action #64075: Use validation consistently in WebAPI controllers added

#2 Updated by okurz about 1 year ago is closed unmerged meanwhile. Can we call this a duplicate of #32545? To simply reduce the amount of tickets I suggest to merge the relevant parts into #32545 and then close this one as duplicate. Can you do that?

#3 Updated by asmorodskyi about 1 year ago - after clarification from coolo is about need to catch improper combination of PARALLEL_WITH / START_AFTER
this one is about the fact that client and server of lock API has different understanding of expected HTTP request/response . IMO merging this two would create confusion

#4 Updated by mkittler about 1 year ago

okurz These issues look completely different to me. One is about the multi-machine API of openQA and its client within os-autoinst (the "mutex stuff") and the other one about openQA's scheduling API and dependency management.

#5 Updated by okurz about 1 year ago

I know. But the point where they come together is the (implicit) epic about "improve error handling and UX for multi-machine test handling".

#6 Updated by okurz about 1 year ago

  • Priority changed from Normal to Low

Also available in: Atom PDF