Bug 173526 - Samba Resource Agent
Summary: Samba Resource Agent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: rgmanager
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 173527
TreeView+ depends on / blocked
 
Reported: 2005-11-17 22:00 UTC by Lon Hohberger
Modified: 2009-04-16 20:18 UTC (History)
4 users (show)

Fixed In Version: RHBA-2006-0173
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-06 20:23:47 UTC
Embargoed:


Attachments (Terms of Use)
Implementation of samba resource agent (16.82 KB, patch)
2005-12-01 22:45 UTC, 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 17:45 UTC, Lon Hohberger
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0173 0 normal SHIPPED_LIVE rgmanager bug fix update 2006-01-06 05:00:00 UTC

Description Lon Hohberger 2005-11-17 22:00:18 UTC
Description of problem:

Customers want Samba integration.  We should give it to them.

Comment 1 Axel Thimm 2005-11-18 08:45:58 UTC
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 22:44:34 UTC
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 22:45:09 UTC
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 22:48:21 UTC
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 23:00:21 UTC
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
require.

Comment 7 Paul Kennedy 2005-12-02 14:22:23 UTC
Please advise on what needs to be changed in documentation.

Comment 8 Lon Hohberger 2005-12-02 17:43:17 UTC
Documentation-wise:

- 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
service.

- 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:

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

I will attach the resultant smb.conf.foooo

Comment 9 Lon Hohberger 2005-12-02 17:45:08 UTC
Created attachment 121769 [details]
Example smb.conf.foooo created when the above service is started.

Comment 10 Lon Hohberger 2005-12-02 17:47:17 UTC
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 17:58:12 UTC
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 18:48:51 UTC
Fixes in CVS ready for QA.

Branches: head, STABLE, RHEL4

Comment 13 Red Hat Bugzilla 2006-01-06 20:23:47 UTC
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.

http://rhn.redhat.com/errata/RHBA-2006-0173.html



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