Cancel pending replications upon shutdown
When the replication plugin is stopped or reloaded,
mark all the current replications as cancelled.
Having pending and unmanaged replication tasks is quite
dangerous for two reasons:
1. The result of the replication isn't accounted and
properly managed, because the associated objects won't
be there anymore (pending replications, runway, ...)
2. The destination configuration could have changed completely
(auto-reload use-case) or even not exist anymore: the
replication event would thus perform an unwanted and
unconfigured operation.
With regards to the replication events that are already
on the runway, there is no value in cancelling them. Just flag
them as cancelled so that, once they finish, can be clearly
recognized.
Change-Id: Iabc17d375011cbc61f8c642ae07d3d018b49fc69
2 files changed