The fix for a data race in https://review.opendev.org/#/c/687261/
introduced another race condition since nodes are now (re-)registered
from multiple threads.
We have to introduce a lock to avoid data races between the cleanup and
node deleted worker.
Change-Id: Icd2cb3da82ce05a41b63bee5e76ef6406b59f12f