Project

General

Profile

action #64322

Improve feedback on multi-machine API errors

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

Status:
New
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2020-03-09
Due date:
% Done:

0%

Estimated time:
Difficulty:
medium

Description

Problem

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/wickedbase.pm 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/Locks.pm.
The _validation_error helper defined in openQA/lib/OpenQA/WebAPI/Plugin/Helpers.pm would actually return a semi-useful error message. However, in api_call in os-autoinst/mmapi.pm or _try_lock in os-autoinst/lockapi.pm 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: https://github.com/os-autoinst/os-autoinst/pull/1359


Related issues

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

History

#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

https://github.com/os-autoinst/os-autoinst/pull/1359 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

https://progress.opensuse.org/issues/32545 - 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