def upgrade_lock(self):
        if self.shared:
            LOG.debug('Upgrading shared lock on node %(uuid)s for %(purpose)s '
                      'to an exclusive one (shared lock was held %(time).2f '
                      'seconds)',
                      {'uuid': self.node.uuid, 'purpose': self._purpose,
                       'time': self._debug_timer.elapsed()})
            self._lock()
            self.shared = False
Upgrade a shared lock to an exclusive lock.
dataset/ETHPy150Open openstack/ironic/ironic/conductor/task_manager.py/TaskManager.upgrade_lock