There are some corner-case bugs relating to CTDB database operations: * The transaction code (and the push record code derived from it) incorrectly only push records to nodes in the VNN map. This does not take into account active nodes with their lmaster capability disabled. All active nodes need the records pushed to them. * The persistent database traverse code will not select the local node for an efficient traversal if it does not have the lmaster capability. The local node is only selected if it is in the VNN map. It should be selected if it is active. * For persistent/replicated databases, the "ctdb catdb" function fetches the database from each node and does a volatile database style merge. This can conceal replicate database bugs. It should do a local traverse or use the same logic as the above traverse code.
I'm not planning to fix "ctdb catdb ..." as part of this bug. "ctdb cattdb ..." can be used to test this issue the pushing to non-lmaster active nodes. So, there is no real urgency to fix catdb, since it is just tool weirdness rather than underlying database breakage. Fixing catdb requires some thought about whether: * The current behaviour is sane * A local traverse should be used * The best node should be selected for a traverse
There are also several issues in the "ctdb pushrecord" command and some of the code used to implement it. Let's fix these here a couple parts of the fix are related.
This bug was referenced in samba master: 792942b7e9cfb51dac3ec1c406f40570098d429c 6420aba887c09590bbd46706b0a8ebdd4b848a96 65d55e410bc217e8ba02c7194a53412366dc8443 a8b99d264b87d96fe4af377ac127e64920d9ad1f f2fba08c1d7fc616ded2690b10ebefe86a17a5c0 7e1bc53dd9e7f4677a0b0a758d80d1780a18362d ac2bf232aca9966c551bb02f6c8120b62b938ccd 9fb6267aaed48f7400d1c14c721b53572662e85e a34ecddd44080144d11af68eff62fc2b14a0e725 508b04c3dae960e59593dcc56517eb5d3b9172d8 b124f9dc29b297756438520cb06c505a78bdb926 7c976de907a7871992bd26dc212b2112ce2c8745 87c7f950c1cb5c1c40917089c338ae2b3634d1a1 4421df999e474a77d84b1162443cab6778ac5986 acae3df63ca495d871bf6a1a252c125c87a494f1 5bf2f9e7d6d087467ab8025dea6b72334a375400 22daa1d18f9e6c24ae7773106bf19520b126b097
Created attachment 19251 [details] Patch for v4-25-test Cherry picks cleanly. Builds without problems. Smoke tested with the 2 new tests.
Created attachment 19252 [details] Patch for v4-24-test Cherry picks cleanly. Builds without problems. Smoke tested with the new test.
Created attachment 19253 [details] Patch for v4-23-test Patch for v4-23-test, if there will be another maintenance release. The v4-24-test patch applies cleanly to v4-23-test but, given there is a different patch for v4-25-test, it seems least confusing to post a separate patch. Cherry picks cleanly. Builds without problems. Smoke tested with the new test.
One extra test fix coming for v4-25-test.
Reasigning to Björn for inclusion in 4.25, 4.24 and 4.23.
Reassigning to Martin while we wait for the followup fixes to land.
Created attachment 19267 [details] Patch for v4-25-test v2 1 additional commit to fix a test bug. As per previous version of patch... Cherry picks cleanly. Builds without problems. Smoke tested with the 2 new tests.
This bug was referenced in samba v4-23-test: 3813e8e5c83244162c2de2b2f301e0bb3d5581d8 2af8d883ec1997e5bc564d64657726936875db20 6d85060e0c9e338acc1ee63f345fb274e1de9f45 fadbe51df8664299b63c7548e7a720580663637f 4fb9e6bfd18ae799106cb9219846f753d36c4f9e
This bug was referenced in samba v4-23-stable (Release samba-4.23.13): 3813e8e5c83244162c2de2b2f301e0bb3d5581d8 2af8d883ec1997e5bc564d64657726936875db20 6d85060e0c9e338acc1ee63f345fb274e1de9f45 fadbe51df8664299b63c7548e7a720580663637f 4fb9e6bfd18ae799106cb9219846f753d36c4f9e
This bug was referenced in samba v4-24-test: 37b5184cba3a6e29ea3fa31eab481182746cdf0b ac2e896c5a2d61cd8f1df9b9b3dd5914a500c7a8 e9f87255c3d575fcb81e52667116d415da5e607c 6906c87444fc4bfd777a178a16f40d81b2377f7f 6550b97465b76b3bded074c5096b4e82d617d4a8
Reasigning to Björn for inclusion in 4.25.
This bug was referenced in samba v4-25-test: 961fb52db168d450c27bdb5221accbf148410c76 0bc5af0d97ae85d6d052fa936bee791ddb6d55ac 0a8cb0610e77ab4a6efa43d4bdba108382bd033c ad586f29a99842dbce58f624fb02b0cd5158fce3 0d2d87bd37141757ff88597290808afc9354831a 9a5bb7591cf9b7f4fca131e6cc5832deef9d95b1 71c5ee6ca11d8f1d6003a456cb1d453445650a33 a2793a573628a8129dd791e56e9924545eeb8e03 d455e858b1a98619238f0bccd34bd9fab44f1fd8 97e568beeaa638303bb6a3c0f57888d53bf073d5 1aa831d9c2a39ebb5bbdef7c3283d35e1e2d0e51 9dc132430650bc3a75bb79d216bc52eb06c0af33 2d26150c8fa07f8ba5ea60adf5905d322399e5eb ac9bf9c62cfaf75833cd64ab059bec861ea926ea d0a4ec0caebabdc80f73bd0bc0f81dd2b7ff491b d58bdb549ca6fa8ce5820dd43742ac714aabd4a6 98ac072bb32be3366620857726232e6d0de66578