All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joao Eduardo Luis <joao.luis@inktank.com>
To: Andrey Korolyov <andrey@xdel.ru>
Cc: Sage Weil <sage@inktank.com>, ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: parsing in the ceph osd subsystem
Date: Thu, 29 Nov 2012 19:49:54 +0000	[thread overview]
Message-ID: <50B7BC62.6020408@inktank.com> (raw)
In-Reply-To: <CABYiri_QS0C1gxygOEW58J7+BQyzjt5X8KJA3Hh8XPGWhnHtRA@mail.gmail.com>

On 11/29/2012 07:01 PM, Andrey Korolyov wrote:
> On Thu, Nov 29, 2012 at 8:34 PM, Sage Weil <sage@inktank.com> wrote:
>> On Thu, 29 Nov 2012, Andrey Korolyov wrote:
>>> $ ceph osd down -
>>> osd.0 is already down
>>> $ ceph osd down ---
>>> osd.0 is already down
>>>
>>> the same for ``+'', ``/'', ``%'' and so - I think that for osd subsys
>>> ceph cli should explicitly work only with positive integers plus zero,
>>> refusing all other input.
>>
>> which branch is this?  this parsing is cleaned u pin the latest
>> next/master.
>>
>>
> 
> It was produced by 0.54-tag. I have built
> dd3a24a647d0b0f1153cf1b102ed1f51d51be2f2 today and problem has
> gone(except parsing ``-0'' as 0 and 00000/0000001 as 0 and 1
> correspondingly).

We use strtol() to parse numeric values, and '-0', '00000' or '00001'
are valid numeric values. I suppose we could enforce the argument to be
numeric only, hence getting rid of '-0' and enforce stricter checks on
the parameters to rule out valid numeric values that look funny, which
in the '0*\d' cases it should be fairly simple.

  -Joao

  reply	other threads:[~2012-11-29 19:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29  7:45 parsing in the ceph osd subsystem Andrey Korolyov
2012-11-29  7:53 ` Gregory Farnum
2012-11-29 16:34 ` Sage Weil
2012-11-29 16:49   ` Joao Eduardo Luis
2012-11-29 19:01   ` Andrey Korolyov
2012-11-29 19:49     ` Joao Eduardo Luis [this message]
2012-11-30  1:04     ` Joao Eduardo Luis
     [not found]       ` <1354237947.86472.YahooMailNeo@web121901.mail.ne1.yahoo.com>
2012-11-30  1:22         ` What is the new command to add osd to the crushmap to enable it to receive data Isaac Otsiabah
2012-11-30  1:54           ` Joao Eduardo Luis
     [not found]           ` <1357591756.80653.YahooMailNeo@web121903.mail.ne1.yahoo.com>
2013-01-07 21:00             ` osd down (for 2 about 2 minutes) error after adding a new host to my cluster Isaac Otsiabah
2013-01-07 21:27               ` Gregory Farnum
     [not found]                 ` <1357680673.72602.YahooMailNeo@web121904.mail.ne1.yahoo.com>
2013-01-10 18:32                   ` Gregory Farnum
2013-01-10 18:45                     ` What is the acceptable attachment file size on the mail server? Isaac Otsiabah
2013-01-10 18:57                       ` Gregory Farnum
2013-01-12  1:41                       ` Yan, Zheng 

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=50B7BC62.6020408@inktank.com \
    --to=joao.luis@inktank.com \
    --cc=andrey@xdel.ru \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.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.