This is based on the OSDMap::print_tree(), but is a bit simpler because
we do not have up/down information at this level.
Signed-off-by: Sage Weil <sage@inktank.com>
For firstn mode, if we fail to make a valid placement choice, we just
continue and return a short result to the caller. For indep mode, however,
we need to make the position stable, and return an undefined value on
failed placements to avoid shifting later results to the left.
Signed-off-by: Sage Weil <sage@inktank.com>
This is only present to size the temporary scratch arrays that we put on
the stack. Let the caller allocate them as they wish and remove the
limitation.
Signed-off-by: Sage Weil <sage@inktank.com>
feed osd info about os, kernel, memory, arch to the mons
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
check the return value of statfs() in update_osd_stat()
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
test/mon/workloadgen: fixed typo in error message
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
add return value check for function calls, including mkdir, mkfs
and mount
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
test/filestore: fix return value check for mkdir
allow EEXIST from mkdir()
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
check return value of mkdir
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
test/filestore/workloadgen: fix return value check for mkdir
allow EEXIST from mkdir()
Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
blkid -s TYPE /dev/fd0 has been verified to hang forever on a
H8DMR-82 supermicro motherboard running
3.8.0-33-generic #48~precise1-Ubuntu SMP Thu Oct 24 16:28:06 UTC 2013
x86_64
It is unlikely that ceph will ever be used on floppy disks, they
can be blacklisted.
http://tracker.ceph.com/issues/6827fixes: #6827
Signed-off-by: Loic Dachary <loic@dachary.org>
These are supported as of kernel version v3.9:
- chooseleaf_descend_once was added in 1604f48
- others were added in 546f04e
And of course these are supported by bobtail and later.
Signed-off-by: Sage Weil <sage@inktank.com>
Set the tunables to the 'default' values on create.
Default to the legacy values when we decode, so that an old map without
values defined gets legacy values.
Signed-off-by: Sage Weil <sage@inktank.com>
4d140a71a1 refactored this and
introduced a bug. peek_meta() was accidentally reading into magic,
then replacing magic with val, which was always the empty string,
resulting in the osd always failing to start due to 'mismatched'
magic values.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
One use noted that they have a 'pdu' type in their type hierarchy that
typically spans multiple racks. Others are known to use the 'pod'
terminology; add that to. And I can imagine 'region' above datacenter.
Factor this into a helper to make things a bit less fragile.
Signed-off-by: Sage Weil <sage@inktank.com>
A chassis is usually bigger than a host but smaller than a rack. This will
be useful for a broad class of modern hardware that sticks multiple hosts
in the same chassis (in sleds, or on cards, or blades, or whatever).
Signed-off-by: Sage Weil <sage@inktank.com>
This reverts commit 08327fed82, except
for the hashpspool bit. We switched back to an integer argument in
commit 337195f046.
Signed-off-by: Sage Weil <sage@inktank.com>
This avoids parsing out the wrong value when a long device name makes
df wrap over two lines.
Fixes: #6699
Reported-by: Jan Harkes <jaharkes@cs.cmu.edu>
Reviewed-by: Noah Watkins <noah.watkins@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Move these from the OSD. Use a generic implementation in ObjectStore that
hopefully all backends can share (so that it can remain in sync with the
start/stop scripts, ceph-disk, and other orchestration machinery).
Signed-off-by: Sage Weil <sage@inktank.com>