sanlock: Re-add lockspace unconditionally
Currently, if sanlock is already registering a lockspace other libvirtd instances (from other hosts) obtain -EINPROGRESS. On sufficiently new sanlock, sanlock_inq_lockspace() is called, which suspend execution until lockspace state is changed. With current libvirt implementation, we fail to retry adding the lockspace again but continue in error path. Therefore we produce meaningless error message: virLockManagerSanlockSetupLockspace:363 : Unable to add lockspace /var/lib/libvirt/sanlock/__LIBVIRT__DISKS__: Success qemudLoadDriverConfig:558 : Failed to load lock manager sanlock We should try to re-add the lockspace after its state change to be sure it was added successfully. In fact, with sufficiently new sanlock we can just avoid dummy usleep() which is used if there's no inquire API.
Showing
想要评论请 注册 或 登录