Add primary_only flag to _LockInstancesNodes