]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: prepare --data-dir must not override files 1020/head
authorLoic Dachary <loic@dachary.org>
Mon, 30 Dec 2013 11:26:20 +0000 (12:26 +0100)
committerLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 10:48:24 +0000 (11:48 +0100)
commit7dfe550ce18623cde4ae43a2416e31ef81381ab9
treebf4c8a883ac9440db6e60c85c01516b7302d3918
parentfe3fd5fb4aa6327256dfaf731914dc4f79b0d44e
ceph-disk: prepare --data-dir must not override files

ceph-disk does nothing when given a device that is already prepared. If
given a directory that already contains a successfully prepared OSD, it
will however override it.

Instead of overriding the files in the osd data directory, return
immediately if the magic file exists. Make it so the magic file is
created last to accurately reflect the success of the OSD preparation.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/ceph-disk
src/test/cli/ceph-disk/data-dir.t [new file with mode: 0644]