[RFC PATCH] Samba RADOS service registration

David Disseldorp ddiss at suse.de
Tue Feb 13 01:25:40 UTC 2018


Hi,

I've been working on having Samba's smbd daemon register itself with the
Ceph Cluster via rados_service_register(), and would appreciate some
input on what to include in the instance and metadata descriptors.

The attached patch implements basic Samba service registration
functionality, but only uses a $hostname:smbd string for the instance
and doesn't add any extra metadata (see [1] as a sample service dump).

I'd like to (at the very least) pack the CephFS backed share names and
paths into the service registration. For this, I'm leaning towards
adding the share name as an instance suffix (i.e.
$hostname:smbd:$share), with a separate registration for each share.
Each share could then include the CephFS path as instance specific
metadata. That still leaves me with a few questions:
- does it make sense to only register shares which are backed by CephFS?
  + consider a server with local and CephFS shares, or worse still,
    shared printers
  + what about a Samba service without any shares?
- I'd be using a single RADOS cluster connection to register all
  shares. Can these services can be deregistered individually in case of
  share removal, or are separate cluster connections required?
  + a rados_service_deregister() hook would be useful

Cheers, David

1. Sample Samba smbd service dump with shares ignored

> ceph service dump
{
    "epoch": 2,
    "modified": "2018-02-13 01:53:09.263133",
    "services": {
        "samba": {
            "daemons": {
                "summary": "",
                "rapido1:smbd": {
                    "start_epoch": 2,
                    "start_stamp": "2018-02-13 01:53:08.112102",
                    "gid": 4131,
                    "addr": "192.168.124.104:0/1984347853",
                    "metadata": {
                        "arch": "x86_64",
                        "ceph_version": "ceph version 12.2.1-387-g313479ab90 (313479ab90915289fa4905822d1f4825d1bf1e7c) luminous (stable)",
                        "cpu": "QEMU Virtual CPU version 2.5+",
                        "distro": "dracut",
                        "distro_description": "openSUSE Leap 42.3 dracut-044-29.1 (Initramfs)",
                        "distro_version": "044-29.1",
                        "hostname": "rapido1",
                        "kernel_description": "#21 SMP Tue Feb 13 01:05:27 CET 2018",
                        "kernel_version": "4.4.115+",
                        "mem_swap_kb": "0",
                        "mem_total_kb": "1022828",
                        "os": "Linux"
                    }
                }
            }
        }
    }
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ceph-add-rados-service-integration.patch
Type: text/x-patch
Size: 10206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180213/48be9080/0001-ceph-add-rados-service-integration.bin>


More information about the samba-technical mailing list