Commit 5335b8f
committed
Low: daemons: Fix removing transient attrs on rolling upgrades.
The previous patches to fix race conditions in removing transient
attributes rely on this sequence of events:
* First, attrd notices that a peer has left the cluster at the corosync
level. This causes it to set the values of all transient attributes
to NULL.
* Second, based updates the CIB to remove transient attributes, which
triggers a callback in attrd. This callback removes all attributes
whose value is NULL.
This seems to work reliably in same-version clusters. However, in mixed
version clusters (like if you're doing a rolling upgrade), this doesn't
always happen. In fact in my testing, almost every time, the order of
those two operations is reversed.
What's happening here is that in the mixed version cluster, the DC
(which will still be the old, un-upgraded cluster version) still has a
controld that deletes transient attributes. It will be sending out
requests that based performs this change to the CIB, which conflicts
with the entire point of these patches - that controld is no longer in
the business of deleting transient attributes.
I think there's no way around this problem. No matter how you update
cluster nodes, you'll always have a DC that's the old version with an
old controld. If you take the existing DC out of the cluster to update
it, another existing node will become the DC and it will be the problem
node.
The fix here is to bump the attrd protocol version so we know if a node
has been updated or not. This is probably reasonable to do for the
change in the first place. Then, attrd can inspect the protocol version
of the peer that is telling it to remove a transient attribute. If the
peer version is old enough, attrd can simply remove the transient
attribute immediately instead of doing the NULL-then-delete process.1 parent 0dac64b commit 5335b8f
File tree
4 files changed
+48
-12
lines changed- daemons/attrd
4 files changed
+48
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
| |||
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
341 | | - | |
| 348 | + | |
342 | 349 | | |
343 | 350 | | |
344 | 351 | | |
| |||
355 | 362 | | |
356 | 363 | | |
357 | 364 | | |
| 365 | + | |
358 | 366 | | |
359 | 367 | | |
360 | 368 | | |
361 | | - | |
362 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
363 | 376 | | |
364 | 377 | | |
365 | 378 | | |
| |||
394 | 407 | | |
395 | 408 | | |
396 | 409 | | |
397 | | - | |
| 410 | + | |
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
| |||
431 | 444 | | |
432 | 445 | | |
433 | 446 | | |
434 | | - | |
| 447 | + | |
435 | 448 | | |
436 | 449 | | |
437 | 450 | | |
| |||
457 | 470 | | |
458 | 471 | | |
459 | 472 | | |
460 | | - | |
| 473 | + | |
461 | 474 | | |
462 | | - | |
| 475 | + | |
463 | 476 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | | - | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
241 | 258 | | |
242 | 259 | | |
243 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | | - | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| 236 | + | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
0 commit comments