Bug 15858 - CTDB does not put nodes running NFS into grace on graceful shutdown
Summary: CTDB does not put nodes running NFS into grace on graceful shutdown
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.21.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-21 02:05 UTC by Martin Schwenke
Modified: 2025-06-12 09:32 UTC (History)
1 user (show)

See Also:


Attachments
Patch for v4-22-test, v4-21-test (27.18 KB, patch)
2025-05-29 11:57 UTC, Martin Schwenke
amitay: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schwenke 2025-05-21 02:05:48 UTC
When CTDB shuts down gracefully on a node, it just releases any public IPs.  There is no takeover run before the NFS server is shut down and releases locks.  At this point, other nodes' NFS servers should be in grace so that locks released by the shut down node can be reclaimed by reconnecting clients (and not by other clients). The lack of grace on other nodes means that a client connected to another node can take the lock before it can be reclaimed.
Comment 1 Martin Schwenke 2025-05-21 02:08:03 UTC
Note that grace for kernel NFS is currently a mess.  This only matters for NFS-Ganesha, where the current callout script is still in ctdb/doc/example.  An updated NFS-Ganesha callout script should be available and supported soon.
Comment 2 Samba QA Contact 2025-05-29 10:58:03 UTC
This bug was referenced in samba master:

c03e6b9d50cac67fe33dc6b120996d1915331be6
631d1d38ad10c73aa559561bea6b5ed45c2226c4
b84fbd7b3fedc998633400981ce0c5dc963d052e
dd9b73119afd3a0c60c87c938b5aefc766ca78d2
4877541cfd8f782f516f6471edc52629720963fb
3a770c8d46934870f42059640b0aaa0c76a3f4fb
5a582bddd834fffe2b27cc8b2e9468fa84dfc6f2
Comment 3 Martin Schwenke 2025-05-29 11:57:36 UTC
Created attachment 18649 [details]
Patch for v4-22-test, v4-21-test

Commits cherry-pick cleanly into v4-22-test.  Resulting patch applies cleanly to v4-21-test.

Confirmed build on both versions.  Smoke tested with local daemons to ensure that 1 node, then remaining nodes shut down cleanly.  Also, "shutdown extra timeout" works as planned when ctdb.conf for the first node has it added and is then shut down.
Comment 4 Amitay Isaacs 2025-05-30 12:14:44 UTC
Hi Jule,

This is ready for v4.21 and v4.22.

Thanks.
Comment 5 Jule Anger 2025-06-02 11:26:19 UTC
Pushed to autobuild-v4-{22,21}-test.
Comment 6 Samba QA Contact 2025-06-02 12:45:03 UTC
This bug was referenced in samba v4-21-test:

1e773a73529ab14defa1c9862758e1300e38850e
72b32a4ee764e17e4db5156e37070cfd65f27f34
e7e4b44f3726f7ee0a81cc6ccc655890259906d3
dbb008703b6d18f615be220fb87060cb603565fc
ffe9e620cc9cd9b8bb9fb790e4a1f578dd0d309d
3a16697b9b23f962869eacbff128d68833d537d9
7f1fc08c428ba64031cf7afd21478fc1664756b8
Comment 7 Samba QA Contact 2025-06-03 06:51:07 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.6):

1e773a73529ab14defa1c9862758e1300e38850e
72b32a4ee764e17e4db5156e37070cfd65f27f34
e7e4b44f3726f7ee0a81cc6ccc655890259906d3
dbb008703b6d18f615be220fb87060cb603565fc
ffe9e620cc9cd9b8bb9fb790e4a1f578dd0d309d
3a16697b9b23f962869eacbff128d68833d537d9
7f1fc08c428ba64031cf7afd21478fc1664756b8
Comment 8 Samba QA Contact 2025-06-05 11:56:11 UTC
This bug was referenced in samba v4-22-test:

b0a66c42704b51329bee68cf49d9f9ce7de3b1d3
ee3415e3c86067cfc5bfe40fc35da6f88684c9ba
9e4b88f800bd838dacbf769b4319554ac391a3a2
8b49433a41bcc3ecfbce562363d0e2a3b07ce4ec
302af7a928e41ff8fbe73dbf076dd55c48e9890d
64e92bc93d1b42f0aeb937c75abbbe133d7d3d84
0c47b4e7ca21ef47aef43d13566bde678dc2740f
Comment 9 Samba QA Contact 2025-06-05 15:41:54 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.2):

b0a66c42704b51329bee68cf49d9f9ce7de3b1d3
ee3415e3c86067cfc5bfe40fc35da6f88684c9ba
9e4b88f800bd838dacbf769b4319554ac391a3a2
8b49433a41bcc3ecfbce562363d0e2a3b07ce4ec
302af7a928e41ff8fbe73dbf076dd55c48e9890d
64e92bc93d1b42f0aeb937c75abbbe133d7d3d84
0c47b4e7ca21ef47aef43d13566bde678dc2740f
Comment 10 Jule Anger 2025-06-12 09:32:05 UTC
Closing out bug report.

Thanks!