Since we are requeuing stuff anyway, do it all in the correct order. This
fixes a bug where take_waiters() comes along later (at activate_map time)
and puts waiting_for_map events at the front of the queue, in front of
e.g. waiting_for_missing. This breaks ordering from the client's
perspective.
The convention should be: whenever you requeue, requeuing everything
that logically follows it first.
Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Requeue them explicity from apply_and_flush_repops() and call it last, so
that the overall ordering is preserved.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
mds/Server.cc: In member function 'CDir* Server::validate_dentry_dir(MDRequest*, CInode*, const string&)':
mds/Server.cc:1607:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc:1620:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc: In member function 'CInode* Server::rdlock_path_pin_ref(MDRequest*, int, std::set<SimpleLock*>&, bool, bool, ceph_file_layout**)':
mds/Server.cc:1874:21: warning: converting 'false' to pointer type 'CInode*' [-Wconversion-null]
Signed-off-by: Sage Weil <sage@inktank.com>
./include/encoding.h: In function 'void encode(int64_t, ceph::bufferlist&, uint64_t)':
./include/encoding.h:101:1: warning: narrowing conversion of 'v' from 'int64_t {aka long int}' to '__le64 {aka long long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
Signed-off-by: Sage Weil <sage@inktank.com>
[ The following text is in the "UTF-8" character set. ]
[ Your display is set for the "ANSI_X3.4-1968" character set. ]
[ Some characters may be displayed incorrectly. ]
Fix config keys for OSD/MDS data dirs. As in documentation and other
places of the scripts the keys are 'osd data'/'mds data' and not
'osd_data'
In case if MDS: if 'mds data' doesn't exist, create it.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
[ The following text is in the "UTF-8" character set. ]
[ Your display is set for the "ANSI_X3.4-1968" character set. ]
[ Some characters may be displayed incorrectly. ]
Change ceph osd create <osd-id> to ceph osd create <uuid>, since this
is what the command is really doing.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
This lets us set a higher limit on messages from daemons (osd, mds) than
from clients, and throttle them independently.
Fixes: #2942
Signed-off-by: Sage Weil <sage@inktank.com>
Log banner from global_init(). This puts it at the very top of the log,
right when the daemon starts.
Fixes: #2940
Signed-off-by: Sage Weil <sage@inktank.com>
This is an imperfect check in that tunables may be set in past osdmaps,
and the OSDs may need that in order to peer correctly. However, in the
general case, this will catch most users. In particular, it will catch
- set tunables
- nothing works (osds or clients lack feature)
- reset/clear tunables
- things recover
But not
- set tunables
- osds have feature, behave
- new osds with old code added, lack feature
- remove tunables
- new osds may fail to peer properly because they lack the feature
Signed-off-by: Sage Weil <sage@inktank.com>
If the current crush map has non-default tunables, set our messengers to
require the tunables feature bit. If it does not, clear the bit.
Signed-off-by: Sage Weil <sage@inktank.com>
Before we were associating the throttler with a CLIENT specific policy
that didn't cover MDS. That's silly. Instead, associate the throttler
with the default policy (which is now possible).
Signed-off-by: Sage Weil <sage@inktank.com>
Add locking in set_policy_throttler.
Also, make it act on the default policy when the specified type does not
have a sepcific policy set for it.
Signed-off-by: Sage Weil <sage@inktank.com>
Introduce a policy_lock in SimpleMessenger to make this safe even after
the messenger has been started up. The user needs to be aware that
policy changes will not affect connections that are already established.
Signed-off-by: Sage Weil <sage@inktank.com>
This needs to be provided to the Accepter at bind time, not by start().
Otherwise the nonce is effectively always 0, which is useless and breaks
all sorts of things. Broken by 8453a8198c.
Signed-off-by: Sage Weil <sage@inktank.com>
If we are waiting for an osdmap for a command, track that explicitly so
that we know when to retry send_command().
Signed-off-by: Sage Weil <sage@inktank.com>