Bug 15320 - lockd connections are not tracked explicitly
Summary: lockd connections are not tracked explicitly
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.15.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-01 16:17 UTC by Ulrich Sibilller
Modified: 2025-01-21 13:49 UTC (History)
2 users (show)

See Also:


Attachments
Patch for v4-21-test (22.74 KB, patch)
2024-11-21 01:14 UTC, Martin Schwenke
vl: review+
Details
Patch for v4-20-test (22.73 KB, patch)
2024-11-21 01:18 UTC, Martin Schwenke
no flags Details
Patch for v4-20-test (27.83 KB, patch)
2024-11-21 02:52 UTC, Martin Schwenke
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Sibilller 2023-03-01 16:17:15 UTC
During a conversion on the samba ML (https://lists.samba.org/archive/samba/2023-February/244218.html) we came across lockd connections not being tracked/tickled explicitly:

> Martin Schwenke:
> In preparation for takeover, for NFS we only remember connections on
> 2049.  The other ports, such as lockd, would be handled on reboot
> (rather than crash) by the releasing side... but I doubt anyone has
> thought about this!  Perhaps we seen that part handling by UDP in the
> past?  Please feel free to open a bug to remind me to look at this.

This ticket is the requested reminder ;-)
Comment 1 Martin Schwenke 2023-03-02 02:06:52 UTC
This branch may be helpful:

https://git.samba.org/?p=martins/samba.git;a=shortlog;h=refs/heads/ctdb-connections
Comment 2 Martin Schwenke 2024-11-21 01:11:20 UTC
This finally went upstream as part of:

  https://gitlab.com/samba-team/samba/-/merge_requests/3840
Comment 3 Martin Schwenke 2024-11-21 01:14:36 UTC
Created attachment 18498 [details]
Patch for v4-21-test

Patch for v4-21-test.  This is a minimal subset of MR 3840 that fixes the bug.  Less patches and I need to "backport" instead of cherry-pick.
Comment 4 Martin Schwenke 2024-11-21 01:18:30 UTC
Created attachment 18499 [details]
Patch for v4-20-test

Patch for v4-20-test.  Once again, this is a minimal subset of MR 3840 that fixes the bug.  Less patches and I need to "backport" instead of cherry-pick.

Stupidly, I couldn't apply the v4-21-test patch with "git am".  But, I was able to cleanly cherry-pick the same commits into v4-20-test... and the patches look the same.
Comment 5 Martin Schwenke 2024-11-21 01:39:06 UTC
Comment on attachment 18499 [details]
Patch for v4-20-test

Replacement patch coming, since v4-20-test doesn't have CTDB_MY_PUBLIC_IPS_CACHE.  :-(
Comment 6 Martin Schwenke 2024-11-21 02:52:19 UTC
Created attachment 18500 [details]
Patch for v4-20-test

For this patch, the choice was to strip out extra patches and do a careful backport, or cherry-pick the additional patch that adds the CTDB_MY_PUBLIC_IPS_CACHE.  Given that the latter approach just worked, it seems worth doing it that way, due to clean cherry-picks.

Tested the build and ran the event script unit tests.  Looks good.
Comment 7 Jule Anger 2024-11-25 12:40:04 UTC
Pushed to autobuild-v4-{21,20}-test.
Comment 8 Samba QA Contact 2024-11-25 13:59:04 UTC
This bug was referenced in samba v4-20-test:

7c6963497333b4d392fcecc5fdd1ae4de0a464f0
71210ed0dff8d7b454ef4573c386c7528deb5e3b
aadc131405b78232e3c812b67a2e7205a8015634
76ddab97e7693e11b5b6952524bd9d5bb9e3f8b3
eb1c30341afa23d0f7345ca61958accf7883456e
a80b629491953af0050796d7185524fb9920901e
75701619fb60e34b35ca34d79410f8d752f47c30
20987bf505855944f2c4cbcfe726c0ab68aea221
664538a65fd6e195a07d9b98b85b66e64882ff90
1531eb538830fbb005f5e4794eadd506d4af0077
Comment 9 Samba QA Contact 2024-11-25 14:10:03 UTC
This bug was referenced in samba v4-21-test:

650ce39d63c5acada738bd6c1d697c99c879871a
0a571a6dbe37c3108db9e62592a2325115240ba3
5920d47149c2fbe2c7ab993d3d558be6b094f8a6
84deecc5e8e02aed2a6772620c64ba390aaf9b5a
7791375ccca1af8af328b94173d4d710649e1973
c6c0722cb722bba42c0e5c093b787395eee62096
f5fc8aa709c0b754a70bd44200e7cd05b982581d
53df2b78ae5c35746f01da477ee0ce443a525e8a
8da34956d687e60f5fe793d0194a30a6b7af701e
Comment 10 Samba QA Contact 2024-11-25 15:11:27 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.2):

650ce39d63c5acada738bd6c1d697c99c879871a
0a571a6dbe37c3108db9e62592a2325115240ba3
5920d47149c2fbe2c7ab993d3d558be6b094f8a6
84deecc5e8e02aed2a6772620c64ba390aaf9b5a
7791375ccca1af8af328b94173d4d710649e1973
c6c0722cb722bba42c0e5c093b787395eee62096
f5fc8aa709c0b754a70bd44200e7cd05b982581d
53df2b78ae5c35746f01da477ee0ce443a525e8a
8da34956d687e60f5fe793d0194a30a6b7af701e
Comment 11 Jule Anger 2024-11-25 15:27:33 UTC
Closing out bug report.

Thanks!
Comment 12 Samba QA Contact 2025-01-21 13:49:55 UTC
This bug was referenced in samba v4-20-stable (Release samba-4.20.7):

7c6963497333b4d392fcecc5fdd1ae4de0a464f0
71210ed0dff8d7b454ef4573c386c7528deb5e3b
aadc131405b78232e3c812b67a2e7205a8015634
76ddab97e7693e11b5b6952524bd9d5bb9e3f8b3
eb1c30341afa23d0f7345ca61958accf7883456e
a80b629491953af0050796d7185524fb9920901e
75701619fb60e34b35ca34d79410f8d752f47c30
20987bf505855944f2c4cbcfe726c0ab68aea221
664538a65fd6e195a07d9b98b85b66e64882ff90
1531eb538830fbb005f5e4794eadd506d4af0077