device: stop activation when queueing the unmanaged state

Beniamino Galvani requested to merge bg/unmanage-race into main

When the unmanaged state is queued, we must ensure that the current activation doesn't overwrite the queue stated with a new one. This can happen for example if a dispatcher script or a firewall call terminate, or if the next activation stage is dispatched.

Fixes-test: @preserve_master_and_ip_settings

Merge request reports