Commit da69d2f
util: use csi objectuuid for rados locks
CSI vol ids > 100bytes fail with error `ENAMETOOLONG`
when acquiring rados lock as ceph sets default value
for `osd_max_attr_name_len` to 100.
This patch fixes the issue by decomposing the CSI ID
and using the ObjectUUID to ensure the lock names
are always < 100 bytes ("lock." + UUID + "-mutexlock"" = 51bytes).
"lock."(5 bytes) is a prefix applied by Ceph internally for every
lock name so we can only pass lock names that are <= 95bytes.
The hash based approach is not used to keep things
debuggable.
Fixes: #5419
Signed-off-by: Niraj Yadav <niryadav@redhat.com>1 parent fdeb66c commit da69d2f
2 files changed
+25
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
| |||
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
159 | | - | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
554 | 562 | | |
555 | | - | |
| 563 | + | |
556 | 564 | | |
557 | 565 | | |
558 | 566 | | |
| |||
562 | 570 | | |
563 | 571 | | |
564 | 572 | | |
565 | | - | |
| 573 | + | |
566 | 574 | | |
567 | 575 | | |
568 | 576 | | |
| |||
0 commit comments