Centralized configuration management using registry tdb in a CTDB cluster

Similar documents
Experiences in Clustering CIFS for IBM Scale Out Network Attached Storage (SONAS)

From an open storage solution to a clustered NAS appliance

AutoRID module extensions to control ID generation

Clustered NAS For Everyone Clustering Samba With CTDB. NLUUG Spring Conference 2009 File Systems and Storage

Samba in a cross protocol environment

Clustered NAS For Everyone Clustering Samba With CTDB A Tutorial At sambaxp 2009

Clustering Samba With CTDB A Tutorial At sambaxp 2010

Clustering Samba With CTDB A Tutorial At sambaxp 2010

Running And Troubleshooting A Samba/CTDB Cluster. A Tutorial At sambaxp 2011

CIFS ON OPENVMS. Tips and Hints. Paul Bakker, Hans Hosang. Platform Integration Competency Center.

Clustered Samba Challenges and Directions. SDC 2016 Santa Clara

SIOS Protection Suite for Linux v9.0. Samba Recovery Kit Administration Guide

Clustered Samba Not just a hack any more

PLAYING NICE WITH OTHERS: Samba HA with Pacemaker

IBM Active Cloud Engine centralized data protection

Polarion Enterprise Setup 17.2

IBM Active Cloud Engine/Active File Management. Kalyan Gunda

Polarion 18 Enterprise Setup

Configuring High-Availability DNS Servers

SMB2 and SMB3 in Samba: Durable File Handles and Beyond. sambaxp 2012

SIOS Protection Suite for Linux Samba Recovery Kit v9.2. Administration Guide

SIOS Protection Suite for Linux Samba Recovery Kit v Administration Guide

KillTest 䊾 䞣 催 ࢭ ད ᅌ㖦䊛 ᅌ㖦䊛 NZZV ]]] QORRZKYZ TKZ ϔᑈܡ䊏 ᮄ ࢭ

B. The configuration will deny access to /var/web/dirl/private.html, but it will allow access to /var/web/dirl/subdir2/private.html, for example.

Exam Questions Demo LPI. Exam Questions Linux Networking Administration.

Maintenance Tasks CHAPTER

Delegating Samba Administration

Maintenance Tasks CHAPTER

RHCE BOOT CAMP. File Sharing Services. Wednesday, November 28, 12

CTDB Remix - Dreaming the Fantasy

Installing HP Device Manager 4.5

Intellicus Cluster and Load Balancing- Linux. Version: 18.1

Prepared by Shiba Ratna Tamrakar

Change and Configuration Management Administration

IceWarp to IceWarp Migration Guide

CONFIGURING IBM STORWIZE. for Metadata Framework 6.3

GlusterFS and RHS for SysAdmins

Services, logging, accounting Todd Kelley CST8177 Todd Kelley 1

Mission Critical Linux

System Verification At Scale: Thousands of Users Do you need to test with them or not?

FreeIPA Cross Forest Trusts

Java Concurrency in practice Chapter 9 GUI Applications

Configuring and Managing Embedded Event Manager Policies

XDMCP Operations. Section Network and Host System Operations. HDS ViewStation System Administrator s Guide. 3.

Startup, Login, Logout scripts. By James Reynolds

SNIA SDC 2018 Santa Clara

LiveNX BACKUP GUIDE. LiveAction, Inc. LIVEACTION, INC.

Configure the IM and Presence Service

7 Network Drive Mapped

SMB3 Multi-Channel in Samba

CTDB + Samba: Scalable Network Storage For The Cloud. Storage Networking World Europe 2011

Cisco WAAS Software Command Summary

Samba4 Progress - March Andrew Tridgell Samba Team

WebSphere Process Server Business Process Choreographer Process Cleanup Service Sample V2 Enhanced business process instance deletion

VI. Corente Services Client

Implementing Persistent Handles in Samba. Ralph Böhme, Samba Team, SerNet

Release Date May StorNext NAS Release Notes 2. New Features for Release Performing System Installations and Upgrades 4

ExpressCluster for Linux Version 3 Web Manager Reference. Revision 6us

This course is intended for those who provide basic support for and perform administrative functions of the Data ONTAP operating system.

SerNet. Samba Status Update. SNIA SDC 2011 Santa Clara, CA. Volker Lendecke SerNet Samba Team

Technical Brief. Network Port & Routing Requirements Active Circle 4.5 May Page 1 sur 15

Working with Configuration Files

RTC 502 and its Git adapter, Git and its prerequisite

Tivoli Monitoring. Login Daemon. Feb 28, 2013

Managing Configurations

System Configuration

MarkLogic Server. Database Replication Guide. MarkLogic 9 May, Copyright 2017 MarkLogic Corporation. All rights reserved.

Step by Step Gluster Setup Table of Contents

Cisco Prime Network Services Controller 3.0 CLI Configuration Guide

Central Administration Console Installation and User's Guide

IBM Campaign Version-independent Integration with IBM Engage Version 1 Release 3.1 April 07, Integration Guide IBM

WebSphere Flat File Adapter V7.5 - What's New?

G-router GSM/GPRS to RS-232 and Ethernet Gateway Release Notes

The State of Samba (June 2011) Jeremy Allison Samba Team/Google Open Source Programs Office

Very large searches present a number of challenges. These are the topics we will cover during this presentation.

Finding Support Information for Platforms and Cisco IOS Software Images

Developing Management Strategies and Tools for Samba. Jeffrey Bianchine

Linux Administration

Best practices on deployment of IBM Rational. servers

Implementing a Primary Domain Controller for Windows 2000 Clients using Samba

To do. Consensus and related problems. q Failure. q Raft

CVS Application. William Jiang

Configuring TACACS+ Finding Feature Information. Prerequisites for TACACS+

Samba 4 Status Report

Carbon Black QRadar App User Guide

Keepalive Configuration Mode Commands

MarkLogic Server. Database Replication Guide. MarkLogic 6 September, Copyright 2012 MarkLogic Corporation. All rights reserved.

Samba4 Status - April Andrew Tridgell Samba Team

Installing a Cisco Prime Network Unit

Central Administration Console Installation and User's Guide

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Configuring Cisco IOS CNS Agents

WLM1200-RMTS User s Guide

Storware vprotect: How to backup Red Hat Virtualization to EMC Data Domain Boost File System plug-in. by Marcin Kubacki & Łukasz Błocki, Storware

1 Motivation Frontend Fine-Tuning Parameters Location On Windows On Linux... 5

BlackBerry Enterprise Server for IBM Lotus Domino Version: 5.0. Administration Guide

Setting up DHCP, DNS and NFS on the CLTC Server

VTrak G1100. NAS Gateway SR3.3. Release Notes for Service Release 3.3. NAS Gateway Build R1.01

User s Guide. Lattus A X Rev A

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 3 Configure Network Services

Transcription:

Mathias Dietz Christian Ambach Centralized configuration management using registry tdb in a CTDB cluster

Introduction Christian Ambach and Mathias Dietz Working for IBM Research and Development in Mainz on the IBM SONAS product since 2008. Have experiences with Samba as part of the IBM SoFS offering since 2006 and the IBM OESV offering since 2003. IBM SONAS - Scale Out Network Attached Storage Modular high performance storage with massive scalability and high availability. Supports multiple petabytes of storage for organizations that need billions of files in a single file system. Based on Open Source technologies (Samba, CTDB, Linux,...) CIFS NFS FTP Link: http://www.ibm.com/systems/storage/network/sonas/ Storage Building Block 2 May 2010

Why do you need a Centralized Configuration In large cluster environments it is hard to keep the configuration in sync IBM SONAS supports up to 96 cluster nodes of which 31 participate in a CTDB cluster Writing configuration changes to many cluster nodes can be tricky If something fails during the change some of the nodes might be updated already some not. If cluster nodes are down during configuration changes they will not be changed at all Administrators are in favor of changing config files on a single node directly When adding new nodes to the cluster the configuration must be synced manually CTDB already distributes persistent TDBs like secrets.tdb, registry.tdb, etc. across all nodes,so why not use this mechanism for configuration data?! 3 May 2010

General Approach The registry format is well structured and supports many data types Store cluster wide configuration in the registry tdb. Let CTDB distribute the changes across all cluster nodes. Always get the most current configuration out of the registry. write config CTDB - registry.tdb CTDB - registry.tdb read This approach has been introduced in IBM SoFS 1.5 (August 2008) 4 May 2010

Use the registry for Samba configuration Samba can store its configuration in the clustered registry include=registry option in smb.conf No need to keep smb.conf synchronized across all cluster nodes any more Updates are automatically pushed via CTDB Command line tools for editing the samba configuration in registry exist (net conf) You could even modify your Samba configuration with regedit from a Windows box :) Caveats vi cannot be used anymore to modify the configuration SWAT will not work any more CTDB must be up and running to allow access to the registry 5 May 2010

How to convert your existing Samba config into the registry Make sure that CTDB is up and running Import your existing smb.conf with net conf import Will overwrite existing registry contents in HKLM\Software\Samba\smbconf Requires to have clustering=yes in smb.conf to enable CTDB clustering Minimize your smb.conf to just include the registry contents and previous includes [global] clustering = yes include=registry include=/etc/samba/smb.conf.%i Restart Samba daemons (smbd, winbind) to pick up the change Check with net conf list and testparm From now on each change to the registry will be automatically distributed to all CTDB nodes 6 May 2010

What about the other configuration files? Other services than Samba require local config files and cannot access TDBs directly. Besides CIFS, IBM SONAS supports FTP, HTTP, NFS and SCP access. Store configuration files for other services (e.g. /etc/exports) in custom registry keys CTDB keeps them synchronized across the nodes of your cluster Synchronize local configuration files with the registry configuration (one-way) Read from registry and write out to configuration files Use the net registry command family to put your own arbitrary values into the registry net registry createkey 'HKLM\Software\ACME' net registry setvalue 'HKLM\Software\ACME' nfsexports sz "/shared/export1 *(ro,fsid=4711)" 7 May 2010

Using the CTDB rc.local hook (hack) You can use rc.local to extend CTDB eventscript behavior, e.g. to pull contents from the registry into local files By default, CTDB will call /etc/ctdb/rc.local (when present) each time an eventscript is called rc.local must finish quickly, its execution time counts into the general script timeout Try to do things in the background rc.local is called for each and every eventscript on each event only handle events that you are interested in You can introduce fake events that only have a meaning for rc.local and are ignored by the CTDB eventscripts use ctdb eventscript <myevent> to trigger execution Do not use echo for debugging outputs 8 May 2010

rc.local 9 May 2010

Simple rc.local which manages NFS exports in /etc/exports updatenfsconfig() { net registry getvalueraw 'HKLM\Software\ACME' 'nfsexports' > /etc/exports exportfs -r logger -t rc.local -p info "updated NFS config" } if [ "x$1" == "xstartup" -o "x$1" == "xreload" ]; then if [ "x$0" == "x/etc/ctdb/events.d/60.nfs" ]; then updatenfsconfig & fi fi 10 May 2010

DEMO DEMO 11 May 2010

What are the problems with this implementation? No error code checking Maybe listen on each 10 th monitoring interval and check if contents in the registry have changed? Implementation can get overly complex quickly when lots of services are to be configured Complex rc.local can lead to general script timeouts Called implicitly from every eventscript for every event High risk of deadlocks (net registry wait for CTDB, CTDB waits for eventscript complete) CTDB cannot differentiate between eventscript errors and rc.local errors Hard to debug Sometimes false error reporting All eventscripts are called and managed by CTDB only No external interface for triggering configuration updates All services handled the same way although they may have different requirements Configuration can only be reloaded for all services (all or nothing) There is no separation of duty: CTDB wasn t designed for service configuration management 12 May 2010

Configuration Management Daemon A Configuration Management Daemon can be used to keep the configuration files in sync Introduce a daemon that runs independently from CTDB Can run periodic tasks independently from CTDB events Can listen on CTDB events (like startup, recovered,...) Provides command line interface for administrators Can respond back to CTDB and influence CTDB status (unhealthy, banned) New status file handling added to CTDB 13 May 2010

Configuration Management Daemon Command Command line line tool tool eventscript reconfiguration/status CTDB CTDB 01.cm 01.cm Events Status File Status File Configuration Configuration Management Management Daemon Daemon HTTP HTTP FTP FTP NFS NFS httpd.conf vsftpd.conf /etc/exports Access registry.tdb net registry net registry 14 May 2010

Configuration Management Daemon The concept of a Configuration Daemon can solve the issues of the rc.local solution. Introduce a daemon that runs independently from CTDB No risk of deadlocks (CTDB does not wait for the Daemon) Can run periodic tasks independently from CTDB events No need for e.g. 10 th monitoring interval logic Interfaces with CTDB in order get notified about events and to report service status back Not called implicitly from every eventscript for every event Configuration for a single service can be reloaded Provides interfaces for administrators and management code to trigger re-configuration External interface for triggering configuration updates Handles service configurations individually, checks that reconfiguration was successful Not limited by CTDB script timeout Allow different requirements for different services (e.g. configuration timeouts) Clear separation of duty and therefore easier to debug 15 May 2010

Hints Define registry security descriptors so that not everybody can read the configuration net registry setsd Split large configuration files into separate registry values to avoid Linux argument limits e.g. for 1000 nfs exports use one registry value per export below one common key Use net registry getvaluesraw to efficiently read the whole configuration Make sure to have a backup of your registry ctdb backupdb registry.tdb <tofile> You can even store some of the CTDB configurations in the registry. CTDB_MANAGES_XXXX variables But many CTDB configuration options cannot be stored in registry, yet public_addresses, static_routes, reclock directory, nat gw,... 16 May 2010

Questions? 17 May 2010

Thank you! 18 May 2010