All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Xiaoxi Chen <superdebuger@gmail.com>
Cc: John Spray <jspray@redhat.com>,
	Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: Nodown/Noout by OSD_ID?
Date: Wed, 20 Jan 2016 20:58:15 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1601202056370.21498@cpach.fuggernut.com> (raw)
In-Reply-To: <CAEYCsV+ELKWAGHD4qo5Lw3_=99zp1ubK2E0n=DsiVHhStzWqXA@mail.gmail.com>

On Thu, 21 Jan 2016, Xiaoxi Chen wrote:
> Yeah,  mark a whole tree is cool.
> 
> We can do that in API level but in implementation, seems we still need
> to set the flag on OSD level for simplicity. For example, say RackA
> and B are belongs to Row A in crush tree, then if we do:
>      ceph [osdmap? crush? ] set RowA noout
>      ceph [osdmap? crush? ] set RackA noup
>      ceph [osdmap? crush? ] unset RackB noout
> 
> As a result, OSDs in Rack A should be noup+noout, but OSDs in RackB
> should have no flag setted.  The easiest way in my mind might be
> traversal the crush subtree and mark the flag on  vector<uint8_t>
> osd_state for every OSD, uint8_t is just enough for now....but next
> time if we want to have more state will be struggle.

Oh right--that is much simpler!

> 
> #define CEPH_OSD_NOUP     (1<<4)  /* osd cannot be marked up */
> #define CEPH_OSD_NODOWN     (1<<5)  /* osd cannot be marked down */
> #define CEPH_OSD_NOIN     (1<<6)  /* osd cannot be marked in */
> #define CEPH_OSD_NOOUT     (1<<7)  /* osd cannot be marked out */

+1

> The APIs we would like to support are:
> 
> 1. ceph XXX set/unset {crush_subtree_name} {flag}

ceph osd [un]set-osd {osd} {flag}
ceph osd [un]set-subtree {osd} {flag}

(This way we look like 'ceph osd crush reweight-subtree ...'.)

> 2. ceph osd tree will show flag of each OSD (if it has)
> 3. ceph health should show the number of OSD with flags.
> 4. ceph health detail show OSDs with flgas.
> 
> 3) and 4) need to iterate the  vector<uint8_t> osd_state in OSDMap.

Sounds good!
sage



      reply	other threads:[~2016-01-21  1:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  5:42 Nodown/Noout by OSD_ID? Xiaoxi Chen
2016-01-20 13:32 ` Sage Weil
2016-01-20 13:55   ` John Spray
2016-01-20 15:26     ` Sage Weil
2016-01-21  1:47       ` Xiaoxi Chen
2016-01-21  1:58         ` Sage Weil [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=alpine.DEB.2.11.1601202056370.21498@cpach.fuggernut.com \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jspray@redhat.com \
    --cc=superdebuger@gmail.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.