This aligns the internal identifier names with the user-visible names in
the decompiled crush map language.
Signed-off-by: Sage Weil <sage@inktank.com>
Since we can specify the recursive retries in a rule, we may as well also
specify the non-recursive tries too for completeness.
Signed-off-by: Sage Weil <sage@inktank.com>
Parameterize the attempts for the _firstn choose method, and apply the
rule-specified tries count to firstn mode as well. Note that we have
slightly different behavior here than with indep:
If the firstn value is not specified for firstn, we pass through the
normal attempt count. This maintains compatibility with legacy behavior.
Note that this is usually *not* actually N^2 work, though, because of the
descend_once tunable. However, descend_once is unfortunately *not* the
same thing as 1 chooseleaf try because it is only checked on a reject but
not on a collision. Sigh.
In contrast, for indep, if tries is not specified we default to 1
recursive attempt, because that is simply more sane, and we have the
option to do so. The descend_once tunable has no effect for indep.
Signed-off-by: Sage Weil <sage@inktank.com>
Explicitly control the number of sample attempts, and allow the number of
tries in the recursive call to be explicitly controlled via the rule. This
is important because the amount of time we want to spend looking for a
solution may be rule dependent (e.g., higher for the wide indep pool than
the rep pools).
(We should do the same for the other tunables, by the way!)
Signed-off-by: Sage Weil <sage@inktank.com>
Pass down the parent's 'r' value so that we will sample different values in
the recursive call when the parent tries multiple times. This avoids doing
useless work (calling multiple times and trying the same values).
Signed-off-by: Sage Weil <sage@inktank.com>
Pass numrep (the width of the result) separately from the number of results
we want *this* iteration. This makes things less awkward when we do a
recursive call (for chooseleaf) and want only one item.
Signed-off-by: Sage Weil <sage@inktank.com>
Add a mode (firstn or indep) to the create-simple command. Make it
optional and default to firstn (for compatiblity and simplicity).
Note: a "default=..." option for mon commands would be easier.
Signed-off-by: Sage Weil <sage@inktank.com>
If it is a replicated pool, remove and shift to the left. For erasure
pools, replace nonexistent items with CRUSH_ITEM_NONE.
Signed-off-by: Sage Weil <sage@inktank.com>
Now that indep is handled by crush_choose_indep, rename crush_choose to
crush_choose_firstn and remove all the conditionals. This ends up
stripping out *lots* of code.
Note that it *also* makes it obvious that the shenanigans we were playing
with r' for uniform buckets were broken for firstn mode. This appears to
have happened waaaay back in commit dae8bec9 (or earlier)... 2007.
Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>