All of lore.kernel.org
 help / color / mirror / Atom feed
* osd_heartbeat_grace read by MON and OSD?
@ 2017-01-25 10:51 Wido den Hollander
  2017-01-25 11:37 ` John Spray
  0 siblings, 1 reply; 3+ messages in thread
From: Wido den Hollander @ 2017-01-25 10:51 UTC (permalink / raw)
  To: ceph-devel

Hi,

Looking at the code I see that the MON (mon/OSDMonitor.cc) and OSD (osd/OSD.cc) use the configuration setting osd_heartbeat_grace.

The name *osd* suggest that it's only read by the OSDs, but according to the source it doesn't seem to be the case.

bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi)
{
  ...
  utime_t orig_grace(g_conf->osd_heartbeat_grace, 0);
  ...
}

bool OSDMonitor::prepare_failure(MonOpRequestRef op)
{
  ...
  utime_t failed_since =
    m->get_recv_stamp() -
    utime_t(m->failed_for ? m->failed_for : g_conf->osd_heartbeat_grace, 0);
  ...
}

Before I submit a PR to update the docs, am I reading the code correctly?

Wido

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: osd_heartbeat_grace read by MON and OSD?
  2017-01-25 10:51 osd_heartbeat_grace read by MON and OSD? Wido den Hollander
@ 2017-01-25 11:37 ` John Spray
  2017-01-25 12:13   ` Wido den Hollander
  0 siblings, 1 reply; 3+ messages in thread
From: John Spray @ 2017-01-25 11:37 UTC (permalink / raw)
  To: Wido den Hollander; +Cc: ceph-devel

On Wed, Jan 25, 2017 at 10:51 AM, Wido den Hollander <wido@42on.com> wrote:
> Hi,
>
> Looking at the code I see that the MON (mon/OSDMonitor.cc) and OSD (osd/OSD.cc) use the configuration setting osd_heartbeat_grace.
>
> The name *osd* suggest that it's only read by the OSDs, but according to the source it doesn't seem to be the case.
>
> bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi)
> {
>   ...
>   utime_t orig_grace(g_conf->osd_heartbeat_grace, 0);
>   ...
> }
>
> bool OSDMonitor::prepare_failure(MonOpRequestRef op)
> {
>   ...
>   utime_t failed_since =
>     m->get_recv_stamp() -
>     utime_t(m->failed_for ? m->failed_for : g_conf->osd_heartbeat_grace, 0);
>   ...
> }
>
> Before I submit a PR to update the docs, am I reading the code correctly?

Yes -- we have a similar situation with mds_beacon_grace which is used
from both sides of the mon-mds code.  For now we have to live with the
fragility of needing these settings to be set uniformly across the
cluster to avoid issues (and in the long run we should be storing
config centrally).

John

>
> Wido
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: osd_heartbeat_grace read by MON and OSD?
  2017-01-25 11:37 ` John Spray
@ 2017-01-25 12:13   ` Wido den Hollander
  0 siblings, 0 replies; 3+ messages in thread
From: Wido den Hollander @ 2017-01-25 12:13 UTC (permalink / raw)
  To: John Spray; +Cc: ceph-devel


> Op 25 januari 2017 om 12:37 schreef John Spray <jspray@redhat.com>:
> 
> 
> On Wed, Jan 25, 2017 at 10:51 AM, Wido den Hollander <wido@42on.com> wrote:
> > Hi,
> >
> > Looking at the code I see that the MON (mon/OSDMonitor.cc) and OSD (osd/OSD.cc) use the configuration setting osd_heartbeat_grace.
> >
> > The name *osd* suggest that it's only read by the OSDs, but according to the source it doesn't seem to be the case.
> >
> > bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi)
> > {
> >   ...
> >   utime_t orig_grace(g_conf->osd_heartbeat_grace, 0);
> >   ...
> > }
> >
> > bool OSDMonitor::prepare_failure(MonOpRequestRef op)
> > {
> >   ...
> >   utime_t failed_since =
> >     m->get_recv_stamp() -
> >     utime_t(m->failed_for ? m->failed_for : g_conf->osd_heartbeat_grace, 0);
> >   ...
> > }
> >
> > Before I submit a PR to update the docs, am I reading the code correctly?
> 
> Yes -- we have a similar situation with mds_beacon_grace which is used
> from both sides of the mon-mds code.  For now we have to live with the
> fragility of needing these settings to be set uniformly across the
> cluster to avoid issues (and in the long run we should be storing
> config centrally).
> 

Thank you for the quick answer!

Submitted a PR for this: https://github.com/ceph/ceph/pull/13098

Wido

> John
> 
> >
> > Wido
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-25 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 10:51 osd_heartbeat_grace read by MON and OSD? Wido den Hollander
2017-01-25 11:37 ` John Spray
2017-01-25 12:13   ` Wido den Hollander

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.