]> git.proxmox.com Git - pve-zsync.git/commit
fix #2821: only abort if there really is a waiting/syncing job
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 17 Dec 2020 14:17:39 +0000 (15:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Dec 2020 16:41:18 +0000 (17:41 +0100)
commit5bf0bc3569705fc044df23c40bc5541ed66a90e1
tree95fd67756d4b853823fa23b435494869cdae684d
parentd01b047d2668141ce63fa5d4128f8779d95caaf4
fix #2821: only abort if there really is a waiting/syncing job

by remembering the process via PID+start time+boot ID and checking for that
information in the new instance. If the old instance can't be found, the new
one will continue and register itself in the state.

After updating the pve-zsync package, if there is a waiting instance running the
old version, one more might be created, because there is no instance_id yet. But
the new instance will set the instance_id, which any later instance will see.

More importantly, if the state is wrongly 'waiting' or 'syncing', i.e.
because an instance was terminated before finishing, we don't abort anymore and
recover from the wrong state, thus fixing the bug.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
pve-zsync