All of lore.kernel.org
 help / color / mirror / Atom feed
From: Owen Synge <osynge@suse.com>
To: Sage Weil <sage@newdream.net>, John Spray <john.spray@redhat.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: autodetecting init system.
Date: Tue, 12 May 2015 09:25:47 +0200	[thread overview]
Message-ID: <5551AAFB.5070307@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1505111032530.28239@cobra.newdream.net>



On 05/11/2015 07:34 PM, Sage Weil wrote:
> On Mon, 11 May 2015, John Spray wrote:
>> On 11/05/2015 17:29, Owen Synge wrote:
>>> Dear all,
>>>
>>> Many init systems are used in linux now. Some ceph code needs to know
>>> the init system. (I must admit I have not looked into Solaris, MacOS and
>>> BSD and probably should have)
>>>
>>> It would be nice to have one function that detects the init system
>>>
>>> Since the init system can be specified in ceph and ceph-deploy
>>> explicitly it seems to be its reasonable to fail clearly to detect init
>>> system.
>>
>> I think I'm missing some background here.  I was under the impression that
>> distros generally had a preferred init system (even if they let you switch),
>> and if another is in use then compatibility links are usually provided (e.g.
>> sysv-style calling through to systemd or vice versa).  Given that, the distro
>> packaging then uses whatever the "right" way to start a service is for that
>> distro, and it's up to the distro to make sure that command is available.
>>
>> Otherwise don't we descend into a kind of madness where a package post-install
>> script can't start a service, because it doesn't know what command to run?
> 
> Ceph daemons are marked with a file like 
> /var/lib/ceph/$type/.../{upstart,systemd,sysvinit} indicating which init 
> system is responsible for starting/stopping them.  This is necesary mainly 
> because on most systems they *do* coexist--at least with sysvinit scripts.
> 
> Owen, this is basically what ceph-detect-init is doing now, right?

ceph-detect-init detects the init system and is intended to be used for
marking the init system. Once marked the init system will not need to be
detected a second time.

> IIRC the users are:
> 
>  - ceph-disk, when creating a new osd
>  - ceph-deploy, when deploying a mon or mds or rgw

Yes though maybe it will be used by other services such as mon and mds
if needed in the future.

Best regards

Owen

  reply	other threads:[~2015-05-12  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 16:29 autodetecting init system Owen Synge
2015-05-11 16:37 ` John Spray
2015-05-11 17:26   ` Owen Synge
2015-05-11 17:34   ` Sage Weil
2015-05-12  7:25     ` Owen Synge [this message]
2015-05-11 17:28 ` Owen Synge
2015-05-11 21:45 ` Loic Dachary
2015-05-12  7:56   ` Owen Synge
2015-05-12  9:45     ` Loic Dachary
2015-05-12 10:27       ` Owen Synge
2015-05-12 12:34         ` Loic Dachary

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=5551AAFB.5070307@suse.com \
    --to=osynge@suse.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=john.spray@redhat.com \
    --cc=sage@newdream.net \
    /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.