Travis Rhoden [Mon, 20 Aug 2012 20:29:11 +0000 (13:29 -0700)]
init-ceph: use SSH in "service ceph status -a" to get version
When running "service ceph status -a", a version number was never
returned for remote hosts, only for the local. This was because
the command to query the version number didn't use the do_cmd
function, which is responsible for running the command over SSH
when needed.
Modify the ceph init.d script to use do_cmd for querying the
Ceph version.
Travis Rhoden [Fri, 17 Aug 2012 20:45:09 +0000 (16:45 -0400)]
doc: mkcephfs man page, -c ceph.conf is not optional
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "ANSI_X3.4-1968" character set. ]
[ Some characters may be displayed incorrectly. ]
The man page for mkcephfs and the output of mkcephfs --help
do not agree with each other. the man page says -c ceph.conf
is optional, while mkcephfs --help says it is required.
Through empirical evidence, I believe it is required. Update
the man page to make it so.
Sage Weil [Fri, 17 Aug 2012 19:10:05 +0000 (12:10 -0700)]
librbd: hide ENOENT on discard
AioZero, Truncate, and Remove are only used by discard and resize
operations where ENOENT can be safely ignored. If that changes in the
future, we'll need to move the enoent flag setting into discard explicitly.
Fixes: #2958 Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 16 Aug 2012 23:55:32 +0000 (16:55 -0700)]
osd: avoid dereferencing pg info without lock
The gen_prefix() is used for debug prefixes, but traverses data structures
that can be modified when the lock is held. Only include them in the
prefix if the lock is held; otherwise print an abbreviated prefix that is
similarly greppable to the normal output.
Fixes: #2957 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
Tommi Virtanen [Thu, 16 Aug 2012 23:35:30 +0000 (16:35 -0700)]
run-cli-tests: Check that virtualenv is found.
Commit 343cc792e847ca8901f6c08e41799a2fbbd2ca92 switched us from pip
-E to virtualenv, to keep up with the Python ecosystem, but left in
this old check for existence of "pip" as a command. We don't strictly
need that; what we need is a "virtualenv" command. PIP will be
available inside the virtualenv, by the time we get around to running
it. Check for virtualenv instead.
Sage Weil [Thu, 16 Aug 2012 21:34:01 +0000 (14:34 -0700)]
SyntheticClient: fix warnings
client/SyntheticClient.cc: In member function 'int SyntheticClient::play_trace(Trace&, std::string&, bool)':
client/SyntheticClient.cc:1494:22: warning: ordered comparison of pointer with integer zero [-Wextra]
CXX rados_sync.o
client/SyntheticClient.cc:1500:22: warning: ordered comparison of pointer with integer zero [-Wextra]
Sage Weil [Thu, 16 Aug 2012 00:48:06 +0000 (17:48 -0700)]
librbd: fix uninit var new_snap in ictrx_refresh()
Valgrind picked this up:
==22755== Conditional jump or move depends on uninitialised value(s)
==22755== at 0x4EC2A11: librbd::ictx_refresh(librbd::ImageCtx*) (internal.cc:1384)
==22755== by 0x4EC10F7: librbd::ictx_check(librbd::ImageCtx*) (internal.cc:1212)
==22755== by 0x4EBD246: librbd::info(librbd::ImageCtx*, rbd_image_info_t&, unsigned long) (internal.cc:841)
==22755== by 0x4E9D71A: rbd_stat (librbd.cc:584)
==22755== by 0x4039A5: check_trunc_hack (fsx.c:477)
==22755== by 0x4060FA: main (fsx.c:1508)
Sage Weil [Thu, 16 Aug 2012 21:27:35 +0000 (14:27 -0700)]
librbd: fix warning
librbd/internal.cc: In function 'int librbd::ictx_refresh(librbd::ImageCtx*)':
librbd/internal.cc:1334:59: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
Cap the number of maps we delete on each pass through handle_osd_map. As
long as the target transaction size is larger than the number of maps we
get in each message, we'll be fine. Ensure we at least keep pace with
incoming maps in case those values' relative sizes nave flipped.
Fixes: #2856 Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 25 Jul 2012 21:53:34 +0000 (14:53 -0700)]
osd: only commit past intervals at end of parallel build
We don't check for gaps in the past intervals, so we should only commit
this when we are completely done. Otherwise a partial run and rsetart will
leave the gap in place, which may confuse the peering code that relies on
this information.
Sage Weil [Thu, 16 Aug 2012 00:19:22 +0000 (17:19 -0700)]
osd: explicitly requeue waiting_for_map in on_change()
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>
Sage Weil [Thu, 16 Aug 2012 19:53:18 +0000 (12:53 -0700)]
mds: fix some gcc 4.7 warnings
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]
Sage Weil [Thu, 16 Aug 2012 18:38:46 +0000 (11:38 -0700)]
byteorder: fix gcc 4.7 warnings
./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]
Danny Kukawka [Thu, 16 Aug 2012 10:56:58 +0000 (12:56 +0200)]
fix keyring generation for mds and osd
[ 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>
Danny Kukawka [Thu, 16 Aug 2012 10:56:32 +0000 (12:56 +0200)]
fix ceph osd create help
[ 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>