Skip to content

Conversation

@rclobus
Copy link
Contributor

@rclobus rclobus commented Oct 30, 2025

When TIMEOUT_SCALE is set for a worker and the command line also provides the value, apply both.

When TIMEOUT_SCALE is set for a worker and the command line also
provides the value, apply both.
@rclobus rclobus force-pushed the rclobus/TIMEOUT_SCALE branch from ac5620d to 02939fc Compare October 30, 2025 11:16
Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this makes sense. (Not exactly sure what you're trying to achieve here.)

@rclobus
Copy link
Contributor Author

rclobus commented Oct 30, 2025

I guess this makes sense. (Not exactly sure what you're trying to achieve here.)

I have a job that takes a long time, and I want to finish it by overriding the timeouts from the openqa-cli command line. However, the worker already has TIMEOUT_SCALE defined in the worker.ini file and then the value from the command line gets overwritten. Unfortunately the value in the worker.ini file is not sufficient to make the job pass.

I've run the job in a local, empty openQA instance and there the timeouts are all sufficient. It is our public worker that is under load and I want to run the job first with extended timeouts, so I can extract more suitable values from the autoinst-log.txt file.

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's wise to treat TIMEOUT_SCALE any different to other worker settings. I think worker settings always override other settings. That is not explicitly mentioned on https://open.qa/docs/#_variable_precedence, probably should be mentioned. However have you tried +TIMEOUT_SCALE=$higher_value to override?

@rclobus
Copy link
Contributor Author

rclobus commented Oct 30, 2025

I don't think it's wise to treat TIMEOUT_SCALE any different to other worker settings. I think worker settings always override other settings. That is not explicitly mentioned on https://open.qa/docs/#_variable_precedence, probably should be mentioned. However have you tried +TIMEOUT_SCALE=$higher_value to override?

I have used this command line:
openqa-clone-job 269 TIMEOUT_SCALE=10 --within-instance localhost while the worker.ini contains TIMEOUT_SCALE=2.

In the openQA GUI, the Settings tab shows 10 but vars.json contains 2, the actually used value. That shows that the API POST parameter does not have the highest precedence.

The line @{$job_settings}{keys %$global_worker_settings} = values %$global_worker_settings; from lib/OpenQA/Worker/Job.pm overwrites the API POST parameters with the values from the worker.ini file.

I tried this: openqa-clone-job 269 TIMEOUT_SCALE+=10 --within-instance localhost but still the effective value is 2.

I also tried this: openqa-clone-job 269 --within-instance localhost +TIMEOUT_SCALE=10 but that is a syntax error.

@rclobus
Copy link
Contributor Author

rclobus commented Nov 1, 2025

And additionally: I've multiplied both factors, because the invoker of the CLI cannot know which worker will get the task.

Possible scenario:
Worker 1: no TIMEOUT_SCALE set
Worker 2: TIMEOUT_SCALE=2

The openqa-cli command has 'TIMEOUT_SCALE=3'. If worker 1 gets the task, the value should be 3, but if worker 2 gets the task, the value should be 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants