All of lore.kernel.org
 help / color / mirror / Atom feed
From: Owen Synge <osynge@suse.com>
To: ceph-devel@vger.kernel.org
Subject: call for comments -> "ceph-disk" making OSD directories on typos and is inconsistent (useability).
Date: Fri, 01 Aug 2014 10:45:16 +0200	[thread overview]
Message-ID: <53DB539C.8090306@suse.com> (raw)

Dear all,

By default "ceph-disk" will do the following:

# ceph-disk -vvvv prepare  --fs-type xfs --cluster ceph -- /dev/sdk
DEBUG:ceph-disk:Preparing osd data dir /dev/sdk

No block device "/dev/sdk" exists so "ceph-disk" decides a block device
is not wanted and makes a directory for an OSD.

I think as policy "ceph-disk" should not assume by default, that a non
existent target is correct, make a directory for the "disk" type OSD to
reside in, and set it up as a "disk" type OSD.

Hence I proposed this patch:

https://github.com/ceph/ceph/pull/2160

As a second best option I would be happier with an explicit "don’t fail
if target is not present and just make a directory at the target". But
then you get on to the question of deeper directory structures being
handled:

The current behavior with deeper directory structures is currently
inconsistent as this output shows:

# ceph-disk prepare --fs-type xfs --cluster ceph -- /mnt/vdu/vdu
Traceback (most recent call last):
  File "/usr/sbin/ceph-disk", line 2605, in <module>
    main()
  File "/usr/sbin/ceph-disk", line 2583, in main
    args.func(args)
  File "/usr/sbin/ceph-disk", line 1311, in main_prepare
    os.mkdir(args.data)
OSError: [Errno 2] No such file or directory: '/mnt/vdu/vdu'

I think as a third best option would be to only make directories the
"--data-dir" parameter is used, but still suffers the deeper directory
structures question.

I am still unsure if I like the idea of creating directories for deeper
directory structures, as again the potential for typos leading to vastly
different directory paths with a single misplaced character, and for
consistency would rather "ceph-disk" just failed if the target is not
available.

Although I propose failing fast and clearly with a clear error message
when a target does not exist, removing the assumption that all non
existent targets are valid and "disk" based OSD's and to try and make an
"appropriate" directory, I do see 2 issues with this change:

(A) This is a change to the current default behavior so effecting
deployment frameworks.
(B) This would effect "ceph-deploy" which under some circumstances uses
this behavior.

I propose the following patch to mitigate side effect (B).

https://github.com/ceph/ceph-deploy/pull/224

I see no way to resolve issue (A) in general if my proposal for change
is selected.

I have discussed this issue with "alfredodeza" on IRC both privately and
later on the "ceph-devel" IRC channel and he is "really divided here"
hence we decided I would bring this up for discussion on this mailing list.

Best regards

Owen
--
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

             reply	other threads:[~2014-08-01  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  8:45 Owen Synge [this message]
2014-08-01 15:10 ` call for comments -> "ceph-disk" making OSD directories on typos and is inconsistent (useability) Sage Weil
2014-08-01 17:26   ` Owen Synge

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=53DB539C.8090306@suse.com \
    --to=osynge@suse.com \
    --cc=ceph-devel@vger.kernel.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.