Dominik Csapak 2cf7706e3d Jobs: fix scheduling after updating job from a different node
since the jobs are configured clusterwide in pmxcfs, a user can use any
node to update the config of them. for some configs (schedule/enabled)
we need to update the last runtime in the state file, but this
is sadly only node-local.

to also update the state file on the other nodes, we introduce
a new 'detect_changed_runtime_props' function that checks and saves relevant
properties from the config to the statefile each round of the scheduler if they
changed.

this way, we can detect changes in those and update the last runtime too.

the only situation where we don't detect a config change is when the
user changes back to the previous configuration in between iterations.
This can be ignored though, since it would not be scheduled then
anyway.

in 'synchronize_job_states_with_config' we switch from reading the
jobstate unconditionally to check the existance of the statefile
(which is the only condition that can return undef anyway)
so that we don't read the file multiple times each round.

Fixes: 0c8d7468 ("fix #4053: don't run vzdump jobs when they change from
disabled->enabled")

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2022-08-05 13:08:08 +02:00
2022-07-04 13:31:23 +02:00
2022-07-15 12:36:50 +02:00
2018-05-04 14:50:04 +02:00
Description
No description provided
276 MiB
Languages
JavaScript 62.6%
Perl 35%
Makefile 1.2%
CSS 0.6%
Smarty 0.3%
Other 0.2%