pve-manager/PVE/API2
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
..
Ceph api: ceph: mon: make checking for duplicate addresses more robust 2022-06-08 08:49:34 +02:00
Cluster schedule-analyze: fix schedules with limited runs 2022-05-04 07:10:13 +02:00
Hardware fix #3490: show more pci devices by default 2021-07-07 18:37:07 +02:00
ACME.pm api: ACME revoke: do not abort if CA is just expired 2020-08-19 18:52:48 +02:00
ACMEAccount.pm api: acme: fix API index entry for challenge-schema 2021-05-05 15:52:49 +02:00
ACMEPlugin.pm ACME: add comment for implicit standalone plugin fallback 2020-05-07 13:53:05 +02:00
APT.pm api: apt: switch to common Proxmox::RS::APT::Repositories package 2022-07-15 12:36:50 +02:00
Backup.pm Jobs: fix scheduling after updating job from a different node 2022-08-05 13:08:08 +02:00
Capabilities.pm api: move cpu path into qemu/capabilities 2021-06-09 11:29:34 +02:00
Ceph.pm api: ceph: remove moved 'flags' calls 2021-06-09 11:29:34 +02:00
Certificates.pm fix #2771: relax cert API endpoints permissions 2020-06-17 14:00:43 +02:00
Cluster.pm minor code style clenaup and comment wording 2022-05-28 09:12:21 +02:00
HAConfig.pm use new ha infrastructure 2015-04-03 08:36:59 +02:00
Hardware.pm api: add usb list in hardware endpoint 2020-12-02 11:27:02 +01:00
Makefile move BackupInfo module into Cluster 2021-07-02 12:50:49 +02:00
Network.pm api2: network: anybridge: re-add regular bridges 2022-04-27 13:55:57 +02:00
NodeConfig.pm api: fill in nodeconfig schema 2022-03-17 14:24:20 +01:00
Nodes.pm nodes: include execute schema in docs 2022-08-02 14:44:38 +02:00
Pool.pm api: add 'type' parameter to pool GET endpoint 2022-01-31 13:30:50 +01:00
Replication.pm fix #4111: replication: don't send mail when fail count is zero 2022-06-17 17:20:06 +02:00
ReplicationConfig.pm fix iteration over hash without keys 2020-11-20 15:34:27 +01:00
Services.pm api/services: add pvescheduler to the service list 2021-11-12 16:17:36 +01:00
Subscription.pm ui: fix system report window indentation + cleanups 2020-05-27 14:11:16 +02:00
Tasks.pm Add/fix option descriptions in pvenode api docs 2021-08-31 17:02:29 +02:00
VZDump.pm api: vzdump: extract config: add content type check 2022-04-01 09:24:35 +02:00