More content...
[obnox/slides/2016-05-sambaxp.git] / multichannel.wiki
index 93ab0b20f3bc5bf80c2f1a9551bf67055058f36c..91bcfeb8ec077613bddabe96e7bfb3c1fdad5874 100644 (file)
 +<2->{
 # messaging rewrite using unix dgm sockets with sendmsg [DONE,4.2]
 # add fd-passing to messaging [DONE,4.2]
-# preparations in internal structures [DONE,4.4]
+# preparations in internal structures [DONE,4.2--4.4]
 # prepare code to cope with multiple channels [DONE,4.4]
 # implement smbd message to pass a tcp socket [DONE,4.4]
 # transfer connection in Negotiate (by ClientGUID) [DONE,4.4]
 # implement session bind [DONE,4.4]
-# implement channel epoch numbers [DONE,4.4]
+# implement channel sequence numbers [DONE,4.4]
 # implement interface discovery [DONE(linux/conf),4.4]
 # implement test cases [WIP(isn't it always?... $\smiley$)]
 # implement fd-passing in socket-wrapper [WIP]
 # implement lease break replay [TODO]
 }
 
-==== Multi-Channel $\in$ Samba : Details from @smbXsrv.idl@ ====
-%%==== @MSG\_SMBXSRV\_CONNECTION\_PASS@ ====
+==== Multi-Channel $\in$ Samba : How we got there ====
 
-<[block]{for @MSG\_SMBXSRV\_CONNECTION\_PASS@}
-<[code]
-typedef struct {
-    NTTIME                 initial_connect_time;
-    GUID                   client_guid;
-    hyper                  seq_low;
-    DATA_BLOB              negotiate_request;
-} smbXsrv_connection_pass0;
-[code]>
-[block]>
+* Based on preparations in 4.2 and earlier (200+ patches)
+* Since Summer 2015:
+** Polishing of large parts of massively WIP branch
+** Added new code (create replay, interface detection)
+** Result merged in units. Overall some ~130 patches.
+** Patches by:
+*** Michael Adam
+*** Stefan Metzmacher
+*** Günther Deschner
+*** Anoop C S
+*** Anubhav Rakshit
+* Just made it as experimental feature into Samba 4.4
 
-%%==== Internal Structures (@smbXsrv.idl@) ====
-==== Multi-Channel $\in$ Samba : Details from @smbXsrv.idl@ ====
 
+==== Multi-Channel $\in$ Samba : How to enable it ====
 
-<[block]{layering before}
+<[block]{smb.conf}
 <[code]
-smbXsrv_session
-  ->smbXsrv_connection
+\[global\]
+...
+server multi channel support = yes
+...
 [code]>
 [block]>
 
-<[block]{layering now}
-<[code]
-smbXsrv_session
-  ->smbXsrv_client
-    ->smbXsrv_connections
-[code]>
-[block]>
+%%==== Multi-Channel $\in$ Samba : Details from @smbXsrv.idl@ ====
+%%%%==== @MSG\_SMBXSRV\_CONNECTION\_PASS@ ====
+%%
+%%<[block]{for @MSG\_SMBXSRV\_CONNECTION\_PASS@}
+%%<[code]
+%%typedef struct {
+%%    NTTIME                 initial_connect_time;
+%%    GUID                   client_guid;
+%%    hyper                  seq_low;
+%%    DATA_BLOB              negotiate_request;
+%%} smbXsrv_connection_pass0;
+%%[code]>
+%%[block]>
+%%
+%%%%==== Internal Structures (@smbXsrv.idl@) ====
+%%==== Multi-Channel $\in$ Samba : Details from @smbXsrv.idl@ ====
+%%
+%%
+%%<[block]{layering before}
+%%<[code]
+%%smbXsrv_session
+%%  ->smbXsrv_connection
+%%[code]>
+%%[block]>
+%%
+%%<[block]{layering now}
+%%<[code]
+%%smbXsrv_session
+%%  ->smbXsrv_client
+%%    ->smbXsrv_connections
+%%[code]>
+%%[block]>
 
 
 %%% ==== Multi-Channel $\in$ Samba : Status ====
@@ -271,9 +298,11 @@ smbXsrv_session
 
 ==== Multi-Channel $\in$ Samba: TODOs ====
 
-* Replay lease breaks upon channel failure (server $\rightarrow$ client)
-* teach socket\_wrapper fd-passing ( ==> selftest...)
-* clustering integration (CTDB)
+*<2-> teach socket\_wrapper fd-passing ( ==> selftest...)
+*<3-> Replay lease breaks upon channel failure (server $\rightarrow$ client) \\ %
+_red_DANGER!_
+*<4-> clustering integration (CTDB) \\ %
+_red_DANGER!_
 
 ==== Multi-Channel $\in$ Samba : Clustering/CTDB ====
 
@@ -281,12 +310,24 @@ smbXsrv_session
 <[block]{Special considerations}
 * channels of one session only to one node !
 * do not bind connections to CTDB public IPs (can move)!
+* problem: CTDB clustering transparent to SMB clients...
 * ==> !add static IPs on public interfaces! \\ %
 use these for interface discovery
 [block]>
 }
 
+==== Multi-Channel $\in$ Samba : Clustering/CTDB ====
 
++<2->{
+<[block]{Plan for integration}
+* establish blacklist of addresses (e.g. CTDB public IPs)
+* optionally establish whitelist (interfaces ...)
+* ==> list of allowed addresses
+* only publish allowed addresses in interfaces info ioctl
+* only give more than one address in interface info when asked via an allowed address
+* deny session bind on non-allowed address
+[block]>
+}
 
 [frame]>