CALLING THE WITNESS: SMB3 Failover with Samba/CTDB



Similar documents
SerNet. Samba Status Update. Linuxkongress Hamburg October 10, Volker Lendecke SerNet Samba Team. Network Service in a Service Network

Step by step guide for installing highly available System Centre 2012 Virtual Machine Manager Management server:

SAMBA AND SMB3: ARE WE THERE YET? Ira Cooper Principal Software Engineer Red Hat Samba Team

Clustered NAS meets GPFS. Andrew Tridgell LTC ALRT Team

SMB3 in Samba. Multi-Channel and Beyond. Michael Adam Red Hat / samba.org

Configuring the BIG-IP LTM v11 for Oracle Database and RAC

Guideline for setting up a functional VPN

Deploying Remote Desktop Connection Broker with High Availability Step-by-Step Guide

XenDesktop 5 Database Sizing and Mirroring Best Practices

SerNet. Clustered Samba. Nürnberg April 29, Volker Lendecke SerNet Samba Team. Network Service in a Service Network

SQL Server 2012/2014 AlwaysOn Availability Group

Going in production Winbind in large AD domains today. Günther Deschner (Red Hat / Samba Team)

NFS High Availability in Windows Roopesh Battepati Microsoft Corporation

Load Balancing. Outlook Web Access. Web Mail Using Equalizer

Developing Microsoft Azure Solutions 20532B; 5 Days, Instructor-led

Using RADIUS Agent for Transparent User Identification

Configuring Windows Server Clusters

Configuring Nex-Gen Web Load Balancer

INTRODUCTION TO FIREWALL SECURITY

TECHNICAL NOTE. Technical Note P/N REV 03. EMC NetWorker Simplifying firewall port requirements with NSR tunnel Release 8.

FioranoMQ 9. High Availability Guide

SMB a protocol example

Simple Network Management Protocol

Introducing. Markus Erlacher Technical Solution Professional Microsoft Switzerland

Scalable NAS Cluster With Samba And CTDB Source Talk Tage 2010

<Samba status report>

CA ARCserve and CA XOsoft r12.5 Best Practices for protecting Microsoft SQL Server

Ekran System Help File

INUVIKA TECHNICAL GUIDE

Deployment Guide July-2014 rev. a. Deploying Array Networks APV Series Application Delivery Controllers for Microsoft Lync Server 2013

Cluster to Cluster Failover Using Double-Take

Load Balancing and High availability using CTDB + DNS round robin

? Index. Introduction. 1 of 38 About the QMS Network Print Monitor for Windows NT

Cluster to Cluster Failover Using Double-Take

CHANGES IN GECS 3.50 PACKAGES

This guide provides detailed information on how to configure and use server redundancy on Yealink IP phones.

EMC VNX Series: Introduction to SMB 3.0 Support

Linux High Availability

POC Installation Guide for McAfee EEFF v4.1.x using McAfee epo 4.6. New Deployments Only Windows Deployment

RADIUS Server Load Balancing

Release Notes OPC-Server V3 Alarm Event for High Availability

RedundancyMaster Help Kepware Technologies

SiteCelerate white paper

Creating client-server setup with multiple clients

Bitrix Site Manager ASP.NET. Installation Guide

Microsoft SMB Running Over RDMA in Windows Server 8

Core Solutions of Microsoft Lync Server 2013

NAT TCP SIP ALG Support

UserLock advanced documentation

Core Solutions of Microsoft Lync Server 2013

This guide provides detailed information on how to configure and use server redundancy on Yealink IP phones.

IBM Tivoli Storage Manager for Virtual Environments Version Data Protection for Microsoft Hyper-V Installation and User's Guide IBM

Choices for implementing SMB 3 on non Windows Servers Dilip Naik HvNAS Pty Ltd Australians good at NAS protocols!

Best Practices for Integrating NetVanta UC Server with Microsoft Exchange Server

BlackBerry Enterprise Service 10 version 10.2 preinstallation and preupgrade checklist

Creating a New Database and a Table Owner in SQL Server 2005 for exchange@pam

Clustered CIFS For Everybody Clustering Samba With CTDB. LinuxTag 2009

Aqua Connect Load Balancer User Manual (Mac)

Application Protocols for TCP/IP Administration

Deploying the BIG-IP LTM system and Microsoft Windows Server 2003 Terminal Services

Manual. Netumo NETUMO HELP MANUAL Copyright Netumo 2014 All Rights Reserved

Backup and Restore of CONFIGURATION Object on Windows 2008

Napster and Gnutella: a Comparison of two Popular Peer-to-Peer Protocols. Anthony J. Howe Supervisor: Dr. Mantis Cheng University of Victoria

Network Interface Failover using FONA

Core Solutions of Microsoft Lync Server 2013

GlobalSCAPE DMZ Gateway, v1. User Guide

Shared Components PSTN gateways PSTN gateways New IP/PSTN Gateway Define New IP/PSTN Gateway Define the PSTN Gateway FQDN FQDN Next

DHCP Failover. Necessary for a secure and stable network. DHCP Failover White Paper Page 1

Installing GFI MailSecurity

IM and Presence Service Network Setup

Configuring Health Monitoring

AnyConnect VPN Client FAQ

High Availability Option for Windows Clusters Detailed Design Specification

Scalable Linux Clusters with LVS

Deployment Guide. AX Series with Microsoft Office SharePoint Server

DOSarrest Security Services (DSS) Version 4.0

Using the Linux Samba Client with iseries NetServer

Cluster APIs. Cluster APIs

Core Solutions of Microsoft Lync Server 2013

AUTOMATED DISASTER RECOVERY SOLUTION USING AZURE SITE RECOVERY FOR FILE SHARES HOSTED ON STORSIMPLE

Course Outline. Course 20336B: Core Solutions of Microsoft Lync Server Duration: 5 Days

Course Outline. Core Solutions of Microsoft Lync Server 2013 Course 20336B: 5 days Instructor Led. About this Course.

Course 20336: Core Solutions of Microsoft Lync Server 2013

PRINT CONFIGURATION. 1. Printer Configuration

Course 6292A: Installing and Configuring Windows 7 Client. About this Course. Audience Profile

F O U N D A T I O N. Using OPC via DCOM with Microsoft Windows XP Service Pack 2. Karl-Heinz Deiretsbacher, Siemens AG

Installing GFI MailSecurity

SMB Advanced Networking for Fault Tolerance and Performance. Jose Barreto Principal Program Managers Microsoft Corporation

Chapter 46 Terminal Server

RADIUS Server Load Balancing

Firewall Load Balancing

Sophos for Microsoft SharePoint startup guide

PolyServe Understudy QuickStart Guide

Workshop & Chalk n Talk Catalogue Services Premier Workshop & Chalk n Talk Catalogue

StreamServe Persuasion SP5 Control Center

Apache Traffic Server Extensible Host Resolution

Fundamentals of Windows Server 2008 Network and Applications Infrastructure

Configuring CSS Remote Access Methods

Transcription:

CALLING THE WITNESS: SMB3 Failover with Samba/CTDB Günther Deschner <gd@samba.org> Sr. Software Engineer Samba Team Member José A. Rivera <jarrpa@samba.org> Software Engineer Samba Team Member

About Samba, Red Hat, and Us Currently 7 Samba Team members inside Red Hat Developers and users of Samba technology for authentication and storage solutions gd: 11 years Samba Team member 8 years Red Hat (Samba Maintainer, Identity, Storage) jarrpa: 9 years working with Microsoft protocols 3 years Red Hat (Samba Maintainer, Storage) SDC 2015, Slide 2

Agenda Witness? Failover in SMB1/SMB2 Failover in SMB1/SMB2 with CTDB Failover in SMB3 The Witness Protocol Roadmap for Witness support in Samba Further reading & Q/A SDC 2015, Slide 3

Witness? 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 Controlled way of dealing with reconnects instead of detecting failures due to timeouts Available with SMB3 SDC 2015, Slide 4

Failover in SMB1/SMB2 Uncontrolled, clients detect unavailability by running into timeouts or by using keep alive mechanisms Clients reconnect after TCP/IP connection timeout Slow, unreliable, unpredictable Not all applications deal with stale connections good enough SDC 2015, Slide 5

Failover in SMB1/SMB2 Client SMB Node 1 SMB2 server Client is connected to Node 1 Node 2 SMB2 server Node 3 SMB2 server 3 Node Windows Cluster SDC 2015, Slide 6

Failover in SMB1/SMB2 Client SMB Node 1 SMB2 server Client is connected to Node 1 SMB Server on Node 1 fails, client does not notice the failure yet. Node 2 SMB2 server Node 3 SMB2 server 3 Node Windows Cluster SDC 2015, Slide 7

Failover in SMB1/SMB2 Client SMB Node 1 SMB2 server Client is connected to Node 1 SMB Server on Node 1 fails, client does not notice the failure yet. Client tries to use connection, runs into timeout. Node 2 SMB2 server Node 3 SMB2 server 3 Node Windows Cluster SDC 2015, Slide 8

Failover in SMB1/SMB2 Client SMB Node 1 SMB2 server Client is connected to Node 1 SMB Server on Node 1 fails, client does not notice the failure yet. Client tries to use connection, runs into timeout. Finally Client reconnects to Node 2 Node 2 SMB2 server Node 3 SMB2 server 3 Node Windows Cluster SDC 2015, Slide 9

Failover in SMB1/SMB2 with CTDB Since 2007, a Samba cluster with CTDB is usually aware of failures before the client is In case of failure CTDB can proactively route the clients to another node With CTDB the cluster coordinates the failover, not the client SDC 2015, Slide 10

Failover in SMB1/SMB2 with CTDB CTDB uses Tickle ACKs to speedup recovery Tickle ACKs: are TCP ACK packets with invalid sequence and acknowledge numbers cause a TCP client to reestablish a connection with proper sequence numbers, immediately were invented/discovered by tridge while working on CTDB The Pacemaker project also provides a Tickle ACK implementation for use outside of Samba, but that's another presentation. Slides and audio of said presentation. ;) -jarrpa SDC 2015, Slide 11

Failover in SMB1/SMB2 with CTDB Client SMB Node 1 SMB3 SMB2 server witness CTDB server Client connects to Node 1 Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 12

Failover in SMB1/SMB2 with CTDB Client SMB Node 1 SMB3 SMB2 server witness CTDB server Client connects to Node 1 SMB Server on Node 1 fails Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 13

Failover in SMB1/SMB2 with CTDB Client SMB Node 1 SMB3 SMB2 server witness CTDB server Client connects to Node 1 SMB Server on Node 1 fails CTDB notices the failure and IP takeover is started Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 14

Failover in SMB1/SMB2 with CTDB Client SMB Node 1 SMB3 SMB2 server witness CTDB server Client connects to Node 1 SMB Server on Node 1 fails CTDB notices the failure and IP takeover is started to Node 2 Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 15

Failover in SMB1/SMB2 with CTDB Client SMB Tickle ACK Node 1 SMB3 SMB2 server witness CTDB server Client connects to Node 1 SMB Server on Node 1 fails CTDB notices the failure and IP takeover is started to Node 2 Node 2 sends Tickle ACK Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 16

Failover in SMB1/SMB2 with CTDB Client Node 1 SMB3 SMB2 server SMB Client connects to Node 1 SMB Server on Node 1 fails CTDB notices the failure and IP takeover is started to Node 2 Node 2 sends Tickle ACK Client reconnects to Node 2 witness CTDB server Node 2 SMB3 SMB2 server witness CTDB server Node 3 SMB3 SMB2 server witness CTDB server 3 Node CTDB Cluster SDC 2015, Slide 17

Failover in SMB3 SMB3 achieves transparent failover via several new features: Continuous Availability Persistent Handles Witness This leads to faster recovery from unplanned node failures Also allows planned and controlled migration of clients between cluster nodes SDC 2015, Slide 18

Failover in SMB3 Client SMB Node 1 witness server Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 19

Failover in SMB3 Client SMB GetInterfaceList Node 1 witness server Node1 Node2 * Node3 * * usable for witness registration Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 20

Failover in SMB3 Client SMB Node 1 Register/RegisterEx witness server Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 21

Failover in SMB3 Client SMB Node 1 AsyncNotify request witness server Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 22

Failover in SMB3 Client SMB Node 1 AsyncNotify request witness server Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 23

Failover in SMB3 Client SMB Node 1 AsyncNotify reply witness server Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 24

Failover in SMB3 Client Node 1 witness server SMB Node 2 witness server Node 3 witness server 3 Node Windows Cluster SDC 2015, Slide 25

Wait. So why a new protocol? Witness is not strictly about failover, it should be thought of as a notification system Witness doesn't entirely care who its notifying of what This allows administrators to programmatically control clients for scenarios such as: Load balancing Server node maintenance SDC 2015, Slide 26

Relationship to SMB3 protocol Per share flag enables use of Witness Protocol MS SMB2: The specified share is present on a server configuration which provides monitoring of the availability of share through the Witness service specified in [MS SWN] SMB2 TREE_CONNECT Response Capability Flag: SMB2_SHARE_CAP_CLUSTER = 0x00000040 Witness support seems to be independent from SMB2_SHARE_CAP_SCALEOUT and SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY Currently for testing: smbd:announce CLUSTER = yes SDC 2015, Slide 27

The witness interface Surprisingly short spec (only 47 pages) Version 1, SMB 3.0 (Windows 2012, Windows 8) Version 2, SMB 3.02 (Windows 2012 R2, Windows 8.1) Only 5 opcodes in the interface: _witness_getinterfacelist _witness_register _witness_unregister _witness_asyncnotify _witness_registerex (witness version 2) SDC 2015, Slide 28

GetInterfaceList DWORD WitnessrGetInterfaceList( [in] handle_t Handle, [out] PWITNESS_INTERFACE_LIST * InterfaceList); Returns list of network interfaces with IPv4 and/or IPv6 addresses Each interface carries information about the interfaces version, state and whether it is a good candidate for witness use SDC 2015, Slide 29

Witness_InterfaceInfo interfaces: struct witness_interfaceinfo group_name : 'MTHELENA' version : WITNESS_UNSPECIFIED_VERSION ( 1) state : WITNESS_STATE_AVAILABLE (1) ipv4 : 192.168.56.108 ipv6 : :: flags : 0x00000005 (5) 1: WITNESS_INFO_IPv4_VALID 0: WITNESS_INFO_Ipv6_VALID 1: WITNESS_INFO_WITNESS_IF SDC 2015, Slide 30

Register DWORD WitnessrRegister( [in] handle_t Handle, [out] PPCONTEXT_HANDLE ppcontext, [in] ULONG Version, [in] [string] [unique] LPWSTR NetName, [in] [string] [unique] LPWSTR IpAddress, [in] [string] [unique] LPWSTR ClientComputerName); Only Wintess V1 can be used as version Registers client for notify events Registration is server based (NetName) (not share based) SDC 2015, Slide 31

UnRegister DWORD WitnessrUnRegister( [in] handle_t Handle, [in] PCONTEXT_HANDLE pcontext); Cleans up client registration SDC 2015, Slide 32

AsyncNotify DWORD WitnessrAsyncNotify( [in] handle_t Handle, [in] PCONTEXT_HANDLE_SHARED pcontext, [out] PRESP_ASYNC_NOTIFY * presp); Asynchronous call Clients send request and wait, and wait, and wait... Only in the event of a notification issued by the cluster the client receives a reply Witness keep alive mechanism available in Witness v2 (SMB 3.02) SDC 2015, Slide 33

AsyncNotify call 4 different events are currently defined in the protocol: WITNESS_NOTIFY_RESOURCE_CHANGE Notify about a resource change state (available, unavailable) WITNESS_NOTIFY_CLIENT_MOVE Notify a connected client to move no another node WITNESS_NOTIFY_SHARE_MOVE (only v2) Notify that a share has been moved to another node WITNESS_NOTIFY_IP_CHANGE (only v2) Notify about an ip address change (online, offline) SDC 2015, Slide 34

RegisterEx DWORD WitnessrRegisterEx( [in] handle_t Handle, [out] PPCONTEXT_HANDLE ppcontext, [in] ULONG Version, [in] [string] [unique] LPWSTR NetName, [in] [string] [unique] LPWSTR ShareName, [in] [string] [unique] LPWSTR IpAddress, [in] [string] [unique] LPWSTR ClientComputerName, [in] ULONG Flags, [in] ULONG KeepAliveTimeout); Available with Windows 2012 R2 (Witness v2) Witness keepalive as client can define KeepAliveTimeout Server returns with ERROR_TIMEOUT after KeepAliveTimeout has expired (Windows 8.1 default 120 seconds) SDC 2015, Slide 35

RegisterEx Optional ShareName allows share notify instead of server notify Allows for use of asymmetric storage (SMB 3.02) Flags field allows tracking of IP notifications SDC 2015, Slide 36

witness testing rpcclient witness command set smbtorture local.ndr.witness Just tests correctness of the NDR marshalling/unmarshalling smbtorture rpc.witness Test correctness of the DCE/RPC calls Fundamental problem: how to test a cluster? How to test resource changes? How to test node failures? Windows Failover Cluster Manager does resource changes with yet another DCE/RPC protocol SDC 2015, Slide 37

Sidetrack: clusapi Microsoft Cluster Management API > 200 opcodes > 600 pages protocol spec Used by Microsoft Failover Cluster Manager purely DCE/RPC based interface (over ncacn_ip_tcp[seal]) Samba now has IDL (for v3 of that protocol) and a torture test suite MS CRMP Failover Cluster: Management API (ClusAPI) Protocol Some ideas to use this protocol as front end for remote CTDB management SDC 2015, Slide 38

Sidetrack: clusapi Basic CLUSAPI v3 implementation in Samba Failover Cluster Manager on Windows insists on contacting DCOM interfaces which Samba currently does not support Spme Cluster Power Shell commandlets already work against Samba Current WIP branch: https://git.samba.org/?p=gd/samba/.git;a=shortlog;h=refs/heads/master clusapi SDC 2015, Slide 39

DCE/RPC requirements endpointmapper with ncacn_ip_tcp support DCE/RPC sign & seal (SPNEGO,KRB5,NTLMSSP) asynchronous DCE/RPC server Currently two unfinished implementations: David Disseldorp <ddiss@samba.org> Stefan Metzmacher <metze@samba.org> (also needed for MS PAR and possibly other protocols) mgmt service (Remote DCE/RPC service management) Two implementations available, none is published yet. mgmt_inq_princ_name() for different node principals SDC 2015, Slide 40

witnessd server Standalone binary, using new infrastructure invented for spoolssd Independent binary so any Samba server problem does not interfere with witness messaging Needs to register for at least 4 notification events (messaging) Configuration and possibly Server State store Very close integration with CTDB: CTDB maintains all available cluster state information CTDB already has mechanisms to communicate failures between the nodes CTDB could easily reuse tickle ack hooks for witness notifications SDC 2015, Slide 41

Roadmap: Witness support in Samba Early PoC implementation by Gregor Beck and Stefan Metzmacher from 2012 Wireshark dissector for witness protocol (not upstream yet) Full IDL and torture tests in Samba Git repository upstream Witness Service is on Samba Roadmap as a funded project Goal: Samba 4.4/4.5 should have a full witness implementation Currently resolving some infrastructure requirements SDC 2015, Slide 42

Roadmap: Witness client interface Frontend for management tasks of witness server: listing of active, connected clients (shared state stored in distributed database) Tool to manually move Clients to other nodes (similar to Move SmbWitnessClient PowerShell cmdlet) Tool to move share to other node Currently implemented as part of the smbcontrol management and messaging tool smbcontrol witnessd witnessnotify subcommands: change, move, sharemove, ipnotify SDC 2015, Slide 43

Roadmap: Integration w/external projects Several existing SMB clients would benefit from supporting Witness, including: CIFS Kernel module smbclient libsmbclient Alternatives to CTDB could be introduced for the purposes of tracking the state of resources in the cluster (e.g. Pacemaker). Possibly implement a stand alone Witness client service to monitor/witness non SMB connections. SDC 2015, Slide 44

Further reading Microsoft Protocol Documentation: MS SWN: Service Witness Protocol MS SMB2: Server Message Block (SMB) Protocol Versions 2 and 3 MS CMRP: Failover Cluster Management Protocol SMB 2.x and SMB 3.0 Timeouts in Windows http://blogs.msdn.com/b/openspecification/archive/2013/03/27/smb 2 x and smb 3 0 timeo uts in windows.aspx Samba Wiki https://wiki.samba.org/index.php/samba3/smb2#witness_notification_protocol SDC 2015, Slide 45

Questions and answers Mail gd@samba.org or jarrpa@samba.org #samba technical on irc.freenode.net Latest stable WIP: https://git.samba.org/?p=gd/samba/.git;a=shortlog;h=refs/heads/master witness ok SDC 2015, Slide 46

Thank you for your attention! www.redhat.com www.samba.org <gd@samba.org> <jarrpa@samba.org>