All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Tim Serong <tserong@suse.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: subpackages for mgr modules
Date: Fri, 19 May 2017 12:14:24 +0000 (UTC)	[thread overview]
Message-ID: <alpine.DEB.2.11.1705191212450.3646@piezo.novalocal> (raw)
In-Reply-To: <3c199f5d-a09a-f600-5c16-7e0c25495efc@suse.com>

On Fri, 19 May 2017, Tim Serong wrote:
> Hi All,
> 
> At some point, we're going to want to have (some of) mgr's python
> modules shipped not as part of the ceph-mgr package, but as subpackages
> that can be optionally installed (ceph-mgr-foo, ceph-mgr-bar, whatever).
>  That's easy to do.  What I'm wondering about is having installation of
> an mgr module subpackage automatically enable the loading of that module.
> 
> Ordinarily, to enable an mgr module that isn't enabled by default at
> compile time, you'd set "mgr modules = foo bar" in the [mgr] section of
> ceph.conf.  But that will get irritating.
> 
> We can't have mgr just load everything that exists (someone might want
> to disable some modules, without necessarily uninstalling them).
> 
> A couple of approaches I thought of are:
> 
> 1) Add a command line argument (or arguments) to ceph-mgr to list
> modules to enable (or disable).  This could in turn be set by some
> variable(s) in /etc/sysconfig/ceph.  Subpackages then tweak those
> variables at install time.
> 
> 2) Do something with symlinks; set up a directory structure something
> like this:
> 
> /usr/lib64/ceph/mgr/enabled/
> /usr/lib64/ceph/mgr/modules/
> /usr/lib64/ceph/mgr/modules/fsstatus
> /usr/lib64/ceph/mgr/modules/rest
> /usr/lib64/ceph/mgr/modules/...
> 
> Then, any module you want to enable, create a symlink to it from the
> "enabled" directory.  Subpackages could do this at install time.  mgr
> iterates through that directory and loads anything present.
> 
> (Personally I rather prefer approach 2 to approach 1).
> 
> I'm sure there's other possibilities.  Thoughts, anyone?

I like #2, too!  This is similar to the sites-enabled thing apache does.

We can make the config option blank (or something like *?) to indicate 
using the directory, otherwise the specified list?

sage

  reply	other threads:[~2017-05-19 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  6:19 subpackages for mgr modules Tim Serong
2017-05-19 12:14 ` Sage Weil [this message]
2017-05-19 18:25 ` Ken Dreyer
2017-05-20  0:24   ` kefu chai
2017-05-21 22:31   ` John Spray
2017-05-22  8:22     ` Tim Serong
2017-05-22  8:51       ` Willem Jan Withagen
2017-05-22 15:45     ` Ken Dreyer
2017-05-24 20:15       ` Alfredo Deza
2017-05-24 20:53         ` John Spray

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=alpine.DEB.2.11.1705191212450.3646@piezo.novalocal \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=tserong@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.