Bug 173526 - Samba Resource Agent
Samba Resource Agent
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: rgmanager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
: FutureFeature
Depends On:
Blocks: 173527
  Show dependency treegraph
Reported: 2005-11-17 17:00 EST by Lon Hohberger
Modified: 2009-04-16 16:18 EDT (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2006-0173
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-06 15:23:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Implementation of samba resource agent (16.82 KB, patch)
2005-12-01 17:45 EST, Lon Hohberger
no flags Details | Diff
Example smb.conf.foooo created when the above service is started. (1.66 KB, text/plain)
2005-12-02 12:45 EST, Lon Hohberger
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0173 normal SHIPPED_LIVE rgmanager bug fix update 2006-01-06 00:00:00 EST

  None (edit)
Description Lon Hohberger 2005-11-17 17:00:18 EST
Description of problem:

Customers want Samba integration.  We should give it to them.
Comment 1 Axel Thimm 2005-11-18 03:45:58 EST
I have a good working samba.sh, which uses a modified /etc/rc.d/init.d/smb
script to allow for different concurrent instances. I'll try to shape it up and
submit it.

There should also be a way to have nmbd-only instances for setting up WINS. WINS
instances are the only kind of objects that don't come in smbd/nmbd pairs.
Comment 2 Lon Hohberger 2005-11-21 17:44:34 EST
We'll take whatever you have so far, and worry about expanding it later.  :) 
Jim's already starting on the canned-config-generator piece of the GUI.
Comment 3 Lon Hohberger 2005-12-01 17:45:09 EST
Created attachment 121718 [details]
Implementation of samba resource agent

This steals a bunch of configuration information from the parent service, such
as the IP and file system resources.  This does not work on top of GFS, which
doesn't work under Samba anyway.  Not tested with ipv6 yet.

The start/stop guts were taken from Red Hat Cluster Suite 3.

The only parameters to this resource agent (which are user-serviceable) are the
name and the workgroup name; everything else is dynamically created during the
start phase.
Comment 4 Lon Hohberger 2005-12-01 17:48:21 EST
As per RHCS3, proper documentation is necessary (most can be taken from RHCS3
documentation).  Certain things are not complete yet, such as placing the
per-instance private files (e.g. smbpasswd) in the .clumanager directory (which
is hidden per default).

Manual editing to create ACLs is absolutely necessary.
Comment 6 Lon Hohberger 2005-12-01 18:00:21 EST
This RA brings us up to the RHCS3 level of Samba support (and perhaps a bit
past!).  We can add more features to the agent later as customers and community
Comment 7 Paul Kennedy 2005-12-02 09:22:23 EST
Please advise on what needs to be changed in documentation.
Comment 8 Lon Hohberger 2005-12-02 12:43:17 EST

- Does not work with GFS; only traditional file systems.

- Place at the top level of the service.  Will not run if not at the top level
of the service (and the service will fail to start!).  This is because it needs
to know the service it is running under - it grabs configuration data about that

- Requires /etc/samba/smb.conf.NAME, where NAME is the name you gave to the
Samba instance.  An example basic configuration will be generated for you the
first time you start the service.  This template will need to be modified to add
ACLs, printers, etc., but will contain all of the top-level file system mount
points and IP addresses.

- Only works with SMB + NMB services for file serving currently.

Here is an example NFS + samba service XML:

                        <ip address="" monitor_link="yes"/>
                        <nfsclient name="world-rw" options="rw,no_root_squash"
                        <fs active_monitor="1" device="/dev/sdb8"
force_unmount="1" fstype="ext3" mountpoint="/mnt/cluster" name="NFS Mount"
                <service name="nfsservice">
                        <fs ref="NFS Mount">
                                <nfsexport name="nfs exports" type="nfs">
                                        <nfsclient ref="world-rw"/>
                        <fs device="/dev/sdb7" force_unmount="1" fstype="ext3"
mountpoint="/mnt/tmp" name="Foo"/>
                        <ip ref=""/>
                        <ip address="" monitor_link="yes"/>
                        <smb name="foooo" workgroup="samba"/>

I will attach the resultant smb.conf.foooo
Comment 9 Lon Hohberger 2005-12-02 12:45:08 EST
Created attachment 121769 [details]
Example smb.conf.foooo created when the above service is started.
Comment 10 Lon Hohberger 2005-12-02 12:47:17 EST
The SHA1 hash at the bottom is to detect user changes to the file.  If the hash
does not line up, the resource agent will *never* regenerate the configuration file.
Comment 11 Lon Hohberger 2005-12-02 12:58:12 EST
If the hash matches or the file does not exist, the file will be regenerated. 
This is for a few reasons:

(a) Users might want to add/change IPs or file system mounts during the course
of configuring the service for production.  If this is done before the
smb.conf.NAME has been tweaked, the agent will create a shiny new one with all
of the new data!

(b) We must have the smb.conf.NAME in order to start.
Comment 12 Lon Hohberger 2005-12-06 13:48:51 EST
Fixes in CVS ready for QA.

Branches: head, STABLE, RHEL4
Comment 13 Red Hat Bugzilla 2006-01-06 15:23:47 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.