From: Jeff Layton <jlayton@samba.org>
To: David Disseldorp <ddiss@suse.de>
Cc: Samba Technical <samba-technical@lists.samba.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH v2] Samba RADOS service registration
Date: Thu, 15 Feb 2018 14:05:55 -0500 [thread overview]
Message-ID: <1518721555.4086.56.camel@samba.org> (raw)
In-Reply-To: <20180215195219.259acfc8@suse.de>
On Thu, 2018-02-15 at 19:52 +0100, David Disseldorp wrote:
> Hi Jeff,
>
> On Thu, 15 Feb 2018 13:09:45 -0500, Jeff Layton wrote:
>
> > IIUC, if the program (samba in this case) dies, and then is restarted
> > (maybe host reboots?), it'll get a new instance_guid, right? Or am I
> > misunderstanding what rados_get_instance_id will return here?
>
> Yes, that's right. On smbd restart it'll reconnect and get a new
> instance ID. The hostname is carried in the metadata, which makes it a
> little easier to identify what's going on from the Ceph side.
>
> AFAICT the service record (unfortunately) remains present after
> rados_shutdown() until a timeout on the manager is tripped, so
> it's quite possible to have to registrations for the same host for a
> short amount of time.
>
> Cheers, David
Got it, thanks. I guess the fact that it changes it not a problem here?
I'm not that well versed in what ceph-mgr does, tbqh...
One thing you may want to be careful about: I found some thread safety
problems a few months ago in how CephContext objects are handled in the
ceph code. While I patched them up as best I could, a lot of older
shipping versions still have those bugs. Even with those fixes, I think
there may still be lurking problems when we have multiple ceph/rados
clients within the same process image.
The upshot here is that if you have the rados client here and (e.g.) a
vfs_ceph client for exporting cephfs, you can hit some races
particularly on setup and teardown of those clients that can cause
crashes.
libcephfs has a ceph_create_with_context image and librados has
something similar. You might consider having a truly global cct object,
and then have the vfs_ceph create a client handle with the same object.
--
Jeff Layton <jlayton@samba.org>
prev parent reply other threads:[~2018-02-15 19:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 1:25 [RFC PATCH] Samba RADOS service registration David Disseldorp
2018-02-13 1:46 ` Jason Dillaman
2018-02-13 2:30 ` Sage Weil
2018-02-13 11:07 ` John Spray
2018-02-13 12:29 ` David Disseldorp
2018-02-13 12:48 ` Volker Lendecke
2018-02-13 13:43 ` Samba Ceph dbwrap backend David Disseldorp
2018-02-13 19:27 ` [PATCH v2] Samba RADOS service registration David Disseldorp
2018-02-15 18:09 ` Jeff Layton
2018-02-15 18:52 ` David Disseldorp
2018-02-15 19:05 ` Jeff Layton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518721555.4086.56.camel@samba.org \
--to=jlayton@samba.org \
--cc=ceph-devel@vger.kernel.org \
--cc=ddiss@suse.de \
--cc=samba-technical@lists.samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox