问题一
【问题现象】
rbd-target-api对象锁残留,导致配置文件本能写入问题
[root@ceph1 ~]# rados -p sys_pool lock info zs-test.conf lock
{"name":"lock","type":"exclusive","tag":"","lockers":[{"name":"client.15456426","cookie":"config","description":"","expiration":"0.000000","addr":"172.16.10.135:0/2664314842"}]}
26147:2022-06-22 11:49:47,743 ERROR [common.py:466:lock()] - (Config.lock) Timed out (30s) waiting for excl lock on zs-test.conf object
26148:2022-06-22 11:49:47,744 ERROR [rbd-target-api:1308:_disk()] - LUN alloc problem - Timed out (30s) waiting for excl lock on zs-test.conf object
26150:2022-06-22 11:49:47,751 ERROR [rbd-target-api:2821:call_api()] - _disk change on 10.127.9.224 failed with 500
26602:2022-06-22 11:50:19,471 ERROR [common.py:466:lock()] - (Config.lock) Timed out (30s) waiting for excl lock on zs-test.conf object
26603:2022-06-22 11:50:19,472 ERROR [rbd-target-api:1308:_disk()] - LUN alloc problem - Timed out (30s) waiting for excl lock on zs-test.conf object
26605:2022-06-22 11:50:19,479 ERROR [rbd-target-api:2821:call_api()] - _disk change on 10.127.9.224 failed with 500
27057:2022-06-22 11:50:52,090 ERROR [common.py:466:lock()] - (Config.lock) Timed out (30s) waiting for excl lock on zs-test.conf object
27058:2022-06-22 11:50:52,090 ERROR [rbd-target-api:1308:_disk()] - LUN alloc problem - Timed out (30s) waiting for excl lock on zs-test.conf object
27060:2022-06-22 11:50:52,096 ERROR [rbd-target-api:2821:call_api()] - _disk change on 10.127.9.224 failed with 500
【问题分析】
对象锁是存在对象文件的扩展属性里面,释放锁时需要对应的client。当client丢失时,需要手动删除对象文件扩展属性
【解决办法】
对象锁删除办法:
rados -p sys_pool rmxattr zs-test.conf lock.lock