How does one solve the sanlock error reported when the oVirt VM is started ?, Ovirtsanlock
Symptom:
The VM has been in use for a period of time. The VM is shut down and an error occurs after it is started;
Background log:
Thread-570342: ERROR: 15:31:17, 944: vm: 761: virt. vm: :( _ startUnderlyingVm) vmId = '18988d57-d0d3-4ff5-9e3a-146f2de4b6f2 ': The vm start process failedTraceback (most recent call last): File "/usr/share/vdsm/virt/vm. py ", line 705, in _ startUnderlyingVm self. _ run () File "/usr/share/vdsm/virt/vm. py ", line 1944, in _ run self. _ connection. createXML (domxml, flags), File "/usr/lib/python2.7/site-packages/vdsm/lib1_connection. py ", line 124, in wrapper ret = f (* args, ** kwargs) File"/usr/lib/python2.7/site-packages/vdsm/utils. py ", line 1313, in wrapper return func (inst, * args, ** kwargs) File"/usr/lib64/python2.7/site-packages/libvirt. py ", line 3611, in createXML if ret is None: raise libvirtError ('virdomaincreatexml () failed', conn = self) libvirtError: Internal error: Process exited prior to exec: libvirt: lock Driver error: failed to open the slot for the sanlock daemon: refused to connect to Thread-570342: INFO: 15:31:17, 947: vm: 1332: virt. vm: :( setDownStatus) vmId = '18988d57-d0d3-4ff5-9e3a-146f2de4b6f2 ': Changed state to Down: Internal error: Process exited prior to exec: libvirt: Lock Driver> error: failed to open the slot for the sanlock daemon: Connection denied (code = 1)
sanlock.log 2018-02-05 15:37:59+0800 6554608 [135834]: sanlock daemon started 3.2.4 host 3c4a8445-6b22-42df-9b06-91d9774dae1d.host01 2018-02-05 15:37:59+0800 6554608 [135834]: set scheduler RR|RESET_ON_FORK priority 99 failed: Operation not permitted
Solution:
Restart the libmongod service because sanlock is used in libvirt.
Troubleshooting:
In sanlock, sched_setscheduler (2) causes sanlock to fail to schedule tasks in real time. When a machine experiences high load IO, sanlock will lose its deadlines.