add / update content
authorMichael Adam <obnox@samba.org>
Wed, 20 Apr 2016 03:27:26 +0000 (05:27 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 20 Apr 2016 03:27:26 +0000 (05:27 +0200)
16 files changed:
Makefile
content.wiki
intro-history.wiki
multichannel.wiki [new file with mode: 0644]
smb3-mc-daemons-n1.dia [new file with mode: 0644]
smb3-mc-daemons-n1a.dia [new file with mode: 0644]
smb3-mc-daemons-n2.dia [new file with mode: 0644]
smb3-mc-daemons-n3.dia [new file with mode: 0644]
smb3-mc-samba-v2.dia [new file with mode: 0644]
smb3-mc-samba-v2.old.dia [new file with mode: 0644]
smb3-mc-samba.dia [new file with mode: 0644]
smb3-mc-samba.old.dia [new file with mode: 0644]
smb3-rdma-samba-v2.dia [new file with mode: 0644]
smb3-rdma-samba-v2.old.dia [new file with mode: 0644]
smb3-rdma-samba.dia [new file with mode: 0644]
smb3.wiki

index 85cfc01..25ed84b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,31 +6,31 @@ TARGET_HO2 = $(TARGET_BASE_NAME).ho2
 
 TARGET = $(TARGET_BASE_NAME)
 
-IMAGE_MC_V1 = smb3-mc-samba
-IMAGE_MC_V2 = smb3-mc-samba-v2
-IMAGE_MC_DAEMONS_N1 = smb3-mc-daemons-n1
-IMAGE_MC_DAEMONS_N1A = smb3-mc-daemons-n1a
-IMAGE_MC_DAEMONS_N2 = smb3-mc-daemons-n2
-IMAGE_MC_DAEMONS_N3 = smb3-mc-daemons-n3
+IMAGE_MC_V1 = smb3-mc-samba
+IMAGE_MC_V2 = smb3-mc-samba-v2
+IMAGE_MC_DAEMONS_N1 = smb3-mc-daemons-n1
+IMAGE_MC_DAEMONS_N1A = smb3-mc-daemons-n1a
+IMAGE_MC_DAEMONS_N2 = smb3-mc-daemons-n2
+IMAGE_MC_DAEMONS_N3 = smb3-mc-daemons-n3
 # IMAGE_RDMA_V2 = smb3-rdma-samba-v2
 # IMAGE_CTDB_3N = design-ctdb-three-nodes
 # IMAGE_CTDB_DAEMONS = ctdb-design-daemons
 # IMAGE_SAMBA_LAYERS = samba-layers
 # IMAGE_SAMBA_RELEASES = samba-release-stream
 # 
-DIAIMAGES_BASE := $(IMAGE_MC_V1) \
-#                $(IMAGE_MC_V2) \
-#                $(IMAGE_MC_DAEMONS_N1) \
-#                $(IMAGE_MC_DAEMONS_N1A) \
-#                $(IMAGE_MC_DAEMONS_N2) \
-#                $(IMAGE_MC_DAEMONS_N3) \
+DIAIMAGES_BASE := $(IMAGE_MC_V1) \
+                 $(IMAGE_MC_V2) \
+                 $(IMAGE_MC_DAEMONS_N1) \
+                 $(IMAGE_MC_DAEMONS_N1A) \
+                 $(IMAGE_MC_DAEMONS_N2) \
+                 $(IMAGE_MC_DAEMONS_N3)
 #                $(IMAGE_RDMA_V2) \
 #                $(IMAGE_CTDB_3N) \
 #                $(IMAGE_CTDB_DAEMONS) \
 #                $(IMAGE_SAMBA_LAYERS) \
 #                $(IMAGE_SAMBA_RELEASES)
 
-DIAIMAGES_BASE :=
+#DIAIMAGES_BASE :=
 
 DIAIMAGES :=     $(foreach image, $(DIAIMAGES_BASE), $(image).dia)
 DIAIMAGES_PNG := $(foreach image, $(DIAIMAGES_BASE), $(image).png)
@@ -50,7 +50,8 @@ IMAGES = $(DIAIMAGES_PNG)
 
 EXTRA_WIKI_FILES = \
                   intro-history.wiki \
-                  smb3.wiki
+                  smb3.wiki \
+                  multichannel.wiki
 
 
 CMN_DEPS = Makefile $(IMAGES)
index 37117c7..3043873 100644 (file)
@@ -4,8 +4,18 @@
 %  _red_text text_
 %
 
+==== agenda ====
 
-%%%[frame]>
+* History of SMB
+* History of Samba
+* SMB 2+
+* SMB 2+ in Samba
+* SMB3 Multi-Channel
+* Outlook: SMB3 Persistent Handles
+* Outlook: SMB3 Clustering/Witness
+* Outlook: SMB3 over RDMA
+
+[frame]>
 
 <[sambabg]
 
@@ -38,7 +48,9 @@
 
 >>>smb3.wiki<<<
 
-[frame]>
+>>>multichannel.wiki<<<
+
+
 <[sambabg]
 ==== Thanks for your attention! ====[plain]
 
index 6d71735..bed80cb 100644 (file)
@@ -20,7 +20,7 @@ Turn DOS INT 21h local file access into network
 ==== Enter Samba ... ====
 
 * ... implements SMB ...
-* ... ''old'' Open Source project (similar to Linux) ...
+* ... ''old'' Open Source project ...
 * ... opens windows to a wider world ... \smiley
 * ...
 
@@ -39,8 +39,8 @@ Turn DOS INT 21h local file access into network
 representing 1,637,229 lines of code"
 [block]>
 * present on millions of NAS devices and routers
-* one of the oldest OSS projects (older than Windows NT)
-* large codebase and very active development team
+* one of the oldest OSS projects (24 years)
+* large codebase and small but very active development team
 
 ==== Samba - History ====
 
@@ -63,17 +63,17 @@ representing 1,637,229 lines of code"
 
 ==== Samba - Today ====
 
-*<1-> Performant, scalable SMB file server \\ %
+* Performant, scalable SMB file server \\ %
   ==> Ongoing SMB3 implementation
-*<2-> Active Directory domain member with @winbindd@ \\ %
+* Active Directory domain member with @winbindd@ \\ %
   ==> flexible, performant, clusterable
-*<3-> Full Active Directory Domain Controller \\ %
+* Full Active Directory Domain Controller \\ %
   (Kerberos KDC, LDAP, DNS, Trusted Domains, etc) \\ %
   "AWS Directory Service" is powered by Samba AD
-*<4-> Established SMB clients for Linux: \\ %
+* Established SMB clients for Linux: \\ %
   cifs.ko, libsmbclient (nautilus, dolphin, konqueror)
-*<5-> Comprehensive testsuite \\ %
+* Comprehensive testsuite \\ %
   ==> wrappers now published outside of Samba: cwrap.org
-*<6-> IDL compiler, autogenerated DCE/RPC code \\ %
+* IDL compiler, autogenerated DCE/RPC code \\ %
   ==> another 1,141,095 lines of code % wc -l bin/default/{source3,source4,""}/librpc/gen_ndr/{*.c,*.h}
-*<7-> Powerful python(3) bindings, partly autogenerated
+* Powerful python(3) bindings, partly autogenerated
diff --git a/multichannel.wiki b/multichannel.wiki
new file mode 100644 (file)
index 0000000..ed4b75b
--- /dev/null
@@ -0,0 +1,305 @@
+[frame]>
+
+<[sambabg]
+
+==== ====[plain]
+
+<[center]
+\Large
+'''Multi-Channel'''
+[center]>
+
+[frame]>
+[sambabg]>
+
+
+==== Multi-Channel - General ====
+
+<[block]{multiple transport connections in one SMB(3) session}
+* '''channel''': transport connection bound to a session
+* client decides which connections to bind and to use
+* session is valid as long as at least one channel is intact
+[block]>
+
+<[block]{two purposes}
+# increase throughput:
+#* use multiple connections of same type
+# improve fault tolerance:
+#* channel failure: replay/retry detection
+%%#* session is valid as long as one channel is still intact
+[block]>
+
+==== Multi-Channel - General ====
+
+<[block]{use case: channels of different type/quality}
+* use only the channels of best quality
+* fall back to inferior channels if superior ones fail
+* e.g.: laptop switching between WiFi and LAN (?)
+[block]>
+
+==== Multi-Channel - Windows/Protocol ====
+
+# establish initial session on TCP connection
+# find interfaces with interface discovery: \\ %
+@FSCTL\_QUERY\_NETWORK\_INTERFACE\_INFO@
+# bind additional TCP (or later RDMA) connection (channel) to established SMB3 session (''session bind'')
+# Windows: uses connections of same (and best) quality
+# Windows: binds only to a single node
+# replay / retry mechanisms, epoch numbers
+
+==== Multi-Channel $\in$ Samba ====
+
+<[block]{samba/smbd: multi-process}
+* '''Currently:''' process $\Leftrightarrow$ TCP connection
+*<0> '''Idea:''' transfer new TCP connection to existing smbd
+*<0> '''How?''' ==> use fd-passing (sendmsg/recvmsg)
+*<0> '''When?'''
+** ''Natural choice'': at SessionSetup (Bind)
+** !Idea!: as early as possible, based on ClientGUID \\ %
+==> per ClientGUID single process model
+*<0> !But!: This may not work! \frownie
+[block]>
+
+==== Multi-Channel $\in$ Samba ====
+
+<[center]
+<<<smb3-mc-daemons-n1.png,width=.9\textwidth>>>
+[center]>
+
+==== Multi-Channel $\in$ Samba ====
+
+<[block]{samba/smbd: multi-process}
+* '''Currently:''' process $\Leftrightarrow$ TCP connection
+* '''Idea:''' transfer new TCP connection to existing smbd
+*<0> '''How?''' ==> use fd-passing (sendmsg/recvmsg)
+*<0> '''When?'''
+** ''Natural choice'': at SessionSetup (Bind)
+** !Idea!: as early as possible, based on ClientGUID \\ %
+==> per ClientGUID single process model
+*<0> !But!: There may be problems! ... \frownie
+[block]>
+
+
+==== Multi-Channel $\in$ Samba ====
+
+-<1>{
+<[center]
+<<<smb3-mc-daemons-n1a.png,width=.9\textwidth>>>
+[center]>
+}
+
+-<2>{
+<[center]
+<<<smb3-mc-daemons-n2.png,width=.9\textwidth>>>
+[center]>
+}
+
+-<3>{
+<[center]
+<<<smb3-mc-daemons-n3.png,width=.9\textwidth>>>
+[center]>
+}
+
+
+%%%% ==== Multi-Channel $\in$ Samba ====
+%%%% 
+%%%% <[block]{samba/smbd: multi-process}
+%%%% * '''Currently:''' process $\Leftrightarrow$ TCP connection
+%%%% * '''Idea:''' transfer new TCP connection to existing smbd
+%%%% * '''How?''' ==> use fd-passing (sendmsg/recvmsg)
+%%%% *<2-> '''When?'''
+%%%% ** ''Natural choice'': at SessionSetup (Bind)
+%%%% ** !Idea!: as early as possible, based on ClientGUID \\ %
+%%%% ==> per ClientGUID single process model
+%%%% *<0> !But!: There may be problems! ... \frownie
+%%%% [block]>
+%%%% 
+%%%% 
+%%%% ==== Multi-Channel $\in$ Samba : pass by ClientGUID ====
+%%%% 
+%%%% <[center]
+%%%% %%<<<smb3-mc-samba_exp.png,height=.9\textheight>>>
+%%%% <<<smb3-mc-samba.png,height=.9\textheight>>>
+%%%% [center]>
+%%%% 
+%%%% 
+%%%% ==== Multi-Channel $\in$ Samba : pass by ClientGUID ====
+%%%% 
+%%%% <[block]{Wait a minute - what about performance?}
+%%%% * Single process...
+%%%% * But we use short-lived worker-pthreads for I/O ops!
+%%%% * Benchmarks and tunings still to be done.
+%%%% [block]>
+%%%% 
+%%%% ==== Multi-Channel $\in$ Samba ====
+%%%% 
+%%%% <[block]{samba/smbd: multi-process}
+%%%% * '''Currently:''' process $\Leftrightarrow$ TCP connection
+%%%% * '''Idea:''' transfer new TCP connection to existing smbd
+%%%% * '''How?''' ==> use fd-passing (sendmsg/recvmsg)
+%%%% * '''When?'''
+%%%% ** ''Natural choice'': at SessionSetup (Bind)
+%%%% ** ''Idea'': as early as possible, based on ClientGUID \\ %
+%%%% ==> per ClientGUID single process model
+%%%% * !But!: There may be problems! ... \frownie
+%%%% [block]>
+%%%% 
+%%%% 
+%%%% ==== The Relevance of the ClientGUID ====
+%%%% 
+%%%% +<1->{
+%%%% <[block]{Assumption was:}
+%%%% * All channels in a session have the same ClientGUID
+%%%% * The server enforces this
+%%%% [block]>
+%%%% }
+%%%% 
+%%%% +<2->{
+%%%% <[block]{Evidence from [MS-SMB2]:}
+%%%% * 3.3.5.9 Receiving an SMB2 CREATE Request:
+%%%% ** sets Open.ClientGuid to Connection.ClientGuid
+%%%% ** replay detection checks \\ %
+%%%% Open.ClientGuid == Connection.ClientGuid
+%%%% * 3.3.5.9.7/12 Durable (v2) Reconnect Create Context:
+%%%% ** check Open.ClientGuid == Connection.ClientGuid
+%%%% [block]>
+%%%% }
+%%%% 
+%%%% +<3->{
+%%%% <[block]{The truth is...}
+%%%% The Windows server does not enforce it!
+%%%% [block]>
+%%%% }
+%%%% 
+%%%% 
+%%%% ==== The Relevance of the ClientGUID ====
+%%%% 
+%%%% <[block]{Windows behaviour according to MS}
+%%%% * The server does NOT enforce same ClientGUID in a session.
+%%%% * But clients can be expected to do it.
+%%%% * But it is not explicitly documented like this.
+%%%% [block]>
+%%%% 
+%%%% +<2->{
+%%%% <[block]{The good news:}
+%%%% There will be documentation notes:
+%%%% * Things will not work as expected when clients behave differently.
+%%%% * It is OK for a server to enforce equality of ClientGUID within session.
+%%%% [block]>
+%%%% }
+%%%% 
+%%%% ==== More digression on ClientGUID : Leases ====
+%%%% 
+%%%% <[block]{According to [MS-SMB2]}
+%%%% * Server Global data Structures:
+%%%% ** GlobalLeaseTableList indexed by ClientGuid (3.3.1.5)
+%%%% *** LeaseTable indexed by LeaseKey (3.3.1.11)
+%%%% * Requesting a lease (3.3.1.4):
+%%%% ** Object store takes an abstract ClientLeaseId
+%%%% *** Win7: combination of ClientGuid and LeaseKey
+%%%% *** Win8+: LeaseKey
+%%%% * Object store indicates a lease break (3.3.4.7):
+%%%% ** smb server uses ClientGuid and LeaseKey given by ObjectStore
+%%%% 
+%%%%  ==> !Inconsistent\! -- What to do?!
+%%%% [block]>
+%%%% 
+%%%% 
+%%%% ==== Multi-Channel $\in$ Samba : pass by SessionID (plan B) ====
+%%%% 
+%%%% <[center]
+%%%% <<<smb3-mc-samba-v2.png,height=.9\textheight>>>
+%%%% [center]>
+
+
+==== Multi-Channel $\in$ Samba : Status ====
+
++<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]
+# 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 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 : Status ====
+%%% 
+%%% <[block]{WIP code}
+%%% * @git://git.samba.org/obnox/samba/samba-obnox.git@
+%%% * branch: @master-multi-channel-obnox@
+%%% [block]>
+
+
+==== Multi-Channel $\in$ Samba: TODOs ====
+
+* Replay lease breaks upon channel failure (server $\rightarrow$ client)
+* teach socket\_wrapper fd-passing ( ==> selftest...)
+* clustering integration (CTDB)
+
+==== Multi-Channel $\in$ Samba : Clustering/CTDB ====
+
++<2->{
+<[block]{Special considerations}
+* channels of one session only to one node !
+* do not bind connections to CTDB public IPs (can move)!
+* ==> !add static IPs on public interfaces! \\ %
+use these for interface discovery
+[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]>
+
+
+[frame]>
+
+<[sambabg]
+
+
+==== ====[plain]
+
+<[center]
+\Large
+Multi-Channel Demo
+[center]>
+
+[frame]>
+[sambabg]>
diff --git a/smb3-mc-daemons-n1.dia b/smb3-mc-daemons-n1.dia
new file mode 100644 (file)
index 0000000..0b014e8
Binary files /dev/null and b/smb3-mc-daemons-n1.dia differ
diff --git a/smb3-mc-daemons-n1a.dia b/smb3-mc-daemons-n1a.dia
new file mode 100644 (file)
index 0000000..727214d
Binary files /dev/null and b/smb3-mc-daemons-n1a.dia differ
diff --git a/smb3-mc-daemons-n2.dia b/smb3-mc-daemons-n2.dia
new file mode 100644 (file)
index 0000000..445f9f0
Binary files /dev/null and b/smb3-mc-daemons-n2.dia differ
diff --git a/smb3-mc-daemons-n3.dia b/smb3-mc-daemons-n3.dia
new file mode 100644 (file)
index 0000000..9b27f28
Binary files /dev/null and b/smb3-mc-daemons-n3.dia differ
diff --git a/smb3-mc-samba-v2.dia b/smb3-mc-samba-v2.dia
new file mode 100644 (file)
index 0000000..d9d0af0
Binary files /dev/null and b/smb3-mc-samba-v2.dia differ
diff --git a/smb3-mc-samba-v2.old.dia b/smb3-mc-samba-v2.old.dia
new file mode 100644 (file)
index 0000000..d77e334
Binary files /dev/null and b/smb3-mc-samba-v2.old.dia differ
diff --git a/smb3-mc-samba.dia b/smb3-mc-samba.dia
new file mode 100644 (file)
index 0000000..b5c23db
Binary files /dev/null and b/smb3-mc-samba.dia differ
diff --git a/smb3-mc-samba.old.dia b/smb3-mc-samba.old.dia
new file mode 100644 (file)
index 0000000..08877a0
Binary files /dev/null and b/smb3-mc-samba.old.dia differ
diff --git a/smb3-rdma-samba-v2.dia b/smb3-rdma-samba-v2.dia
new file mode 100644 (file)
index 0000000..88f905f
Binary files /dev/null and b/smb3-rdma-samba-v2.dia differ
diff --git a/smb3-rdma-samba-v2.old.dia b/smb3-rdma-samba-v2.old.dia
new file mode 100644 (file)
index 0000000..a5cc6b5
Binary files /dev/null and b/smb3-rdma-samba-v2.old.dia differ
diff --git a/smb3-rdma-samba.dia b/smb3-rdma-samba.dia
new file mode 100644 (file)
index 0000000..413197b
Binary files /dev/null and b/smb3-rdma-samba.dia differ
index 51e47b6..7674543 100644 (file)
--- a/smb3.wiki
+++ b/smb3.wiki
 ** SMB direct [designed/starting]
 ** cluster features [designing]
 *** witness [WIP+]
+* SMB 3.0.2: [4.3]
 * SMB 3.1.1:
-** basic support [4.3]
+** negotiate contexts, preauth: [4.3]
 
 
-==== Witness - General ====
-
-New DCE/RPC Service to “witness” availability of other services, in particular SMB3 connections
-* Prompt and explicit notifications about failures in highly available systems
-* Allows Continuous Availability of SMB shares in clustered environments (together with persistent handles)
-* Controlled way of dealing with reconnects instead of detecting failures due to timeouts
-* Available since SMB3 (Windows 8 / Windows Server 2012)
-* More advanced failover mechanism than Tickle-ACK that is used within CTDB
-
-%%% ==== Witness - Failover with SMB3 in a Samba/CTDB cluster ====
-%%% 
-%%% -<1>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step0.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<2>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step1.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<3>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step2a.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<4>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step2b.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<5>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step3a.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<6>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step3b.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<7>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step4.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-%%% 
-%%% -<8>{
-%%% <[center]
-%%% <<<design-ctdb-three-nodes-with-witness-step5.png, width=.95\textwidth>>>
-%%% [center]>
-%%% }
-
-==== Witness - Samba ====
-
-Currently under development in Samba
-* PoC implementation available
-* Currently on hold until new DCE/RPC async infrastructure is available
-* {\footnotesize @https://wiki.samba.org/index.php/Samba3/ \\ %
-   SMB2\#Witness\_Notification\_Protocol@}
-* WIP branch: \\ %
-  {\footnotesize @https://git.samba.org/?p=gd/samba/.git;a=shortlog; \\ %
-   h=refs/heads/master-witness@}
-
-Samba Witness service will cause Windows clients to reconnect:
-* when client admin tool is used
-* when CTDB (or any other cluster resource control manager) moves resources or IP addresses
-
-==== What's next ? ====
-
-* SMB3 Multichannel (in Samba 4.4)
-* SMB3 DCE/RPC Witness service
-* SMB3 Persistent Handles / CA
-* SMB Direct (SMB3 over RDMA)
-* Multi-Protocol access (NFS,SMB...)
-* SMB2+ Unix Extensions