Red Hat Bugzilla – Bug 173526
Samba Resource Agent
Last modified: 2009-04-16 16:18:40 EDT
Description of problem:
Customers want Samba integration. We should give it to them.
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
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.
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.
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
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.
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
Please advise on what needs to be changed in documentation.
- 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="192.168.79.21/22" 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"
<fs ref="NFS Mount">
<nfsexport name="nfs exports" type="nfs">
<fs device="/dev/sdb7" force_unmount="1" fstype="ext3"
<ip address="192.168.79.20/22" monitor_link="yes"/>
<smb name="foooo" workgroup="samba"/>
I will attach the resultant smb.conf.foooo
Created attachment 121769 [details]
Example smb.conf.foooo created when the above service is started.
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.
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.
Fixes in CVS ready for QA.
Branches: head, STABLE, RHEL4
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.