From: Josh Durgin <josh.durgin@inktank.com>
To: Tim Spriggs <tims@uahirise.org>, ceph-devel@vger.kernel.org
Subject: Re: /etc/init.d/ceph vs upstart
Date: Mon, 25 Nov 2013 14:02:35 -0800 [thread overview]
Message-ID: <5293C8FB.4040709@inktank.com> (raw)
In-Reply-To: <CAEUrXvy6u3zWtJYhfsggaK_akW5eeb_Agm6eVa8Tipxjhpqb0Q@mail.gmail.com>
On 11/25/2013 11:01 AM, Tim Spriggs wrote:
> ... ping
>
> On Thu, Nov 7, 2013 at 3:31 PM, Tim Spriggs <tims@uahirise.org> wrote:
>> Oops, I just realized I did the patch in the wrong direction :)
>>
>> On Thu, Nov 7, 2013 at 3:06 PM, Tim Spriggs <tims@uahirise.org> wrote:
>>> Hi All,
>>>
>>> I am battling extraneous error messages from two sources:
>>>
>>> logrotate which is run in cron.daily and has a definition from the
>>> ceph package in /etc/logrotate.d. The message I get in an email from
>>> every node once a day is:
>>>
>>> cat: /var/run/ceph/osd.3.pid: No such file or directory
>>>
>>> This comes up because upstart is actually running ceph-osd while the
>>> init.d script expects a pidfile.
>>>
>>>
>>> /var/log/ceph/ceph-osd.$id.log which complains:
>>>
>>> ERROR: error converting store /var/lib/ceph/osd/ceph-3: (16) Device or
>>> resource busy
>>>
>>> This happens on boot as well as on log rotation.
>>>
>>>
>>> After talking with dmick on irc.oftc.net#ceph, I was alerted to the
>>> fact that there are bits in upstart as well as the sysvinit style
>>> script that attempt to only use one scheme or the other. However, the
>>> logic seems wrong. Inside of ceph_common.sh, there is a function named
>>> check_host which looks for /var/lib/ceph/$type/ceph-$id/sysvinit and
>>> if it exists, it returns. If it doesn't exist, it just goes on to the
>>> next check (which passes in my environment.) Instead, it should return
>>> a non-0 value. Attached is an example patch.
I think continuing if the host matches is intentional, so the init
script continues working for daemons deployed before
/var/lib/ceph/$type/ceph-$id/sysvinit or
/var/lib/ceph/$type/ceph-$id/upstart were used.
To maintain backwards compatibility, and prevent both upstart and
sysvinit from trying to manage the same daemons, I think we can exit
if the file for the other init system is present, like this patch:
https://github.com/ceph/ceph/commit/b1d260cabb90bb9155f18c8e38a1dca102e6466c
Does this work for you?
Josh
next prev parent reply other threads:[~2013-11-25 22:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEUrXvweJa50=ZVFvWOknCSzO9NKvvxikYhn7-Mmz4NgvYAkTA@mail.gmail.com>
2013-11-07 22:06 ` /etc/init.d/ceph vs upstart Tim Spriggs
2013-11-07 22:31 ` Tim Spriggs
2013-11-25 19:01 ` Tim Spriggs
2013-11-25 22:02 ` Josh Durgin [this message]
2013-12-03 18:15 ` Tim Spriggs
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=5293C8FB.4040709@inktank.com \
--to=josh.durgin@inktank.com \
--cc=ceph-devel@vger.kernel.org \
--cc=tims@uahirise.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 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.