This allows a user to use "-v|--verbose" to get some insight as to
what could be preventing radosgw from starting properly.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Changed "/etc/init.d/radosgw status" into a function that now
returns the appropriate exit code.
We now also verify that radosgw actually started properly.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
An exit 0 means everything went okay - we should exit 1 if there is a problem in
starting radosgw.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
This is the start of a potential unit test for get_block_device_size. An
actual unit test will probably need to be run as root, and either find a
device, have one specified, or create one (e.g. ramdisk) in a platform
agnostic way. In the mean time, this tool can be run by hand, or called
for a bash script.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Struct initialization using dot notation as in C99, but that happens to
not be valid C++, although apparently in C++11 it is valid. We'll need a
way to keep clang from throwing warnings at this initialization style,
either using some macros to detect the comiler environment, or perhaps
moving struct initialization to a C file rather than C++.
This reverts commit 6efc2b54d5.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
mon/OSDMonitor.cc: In member function 'int OSDMonitor::_prepare_rename_pool(int64_t, std::string)':
mon/OSDMonitor.cc:4370:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Two fixes for this crossed paths in
0c186096bb and
2181b4c946
Signed-off-by: Sage Weil <sage@inktank.com>
Example: warning: class 'ObjecterDispatcher' was previously declared as
a struct [-Wmismatched-tags]
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Use struct instead of class, even if it warns.
Warnings are lower priority than compilation break.
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
"hostname" can return either the hostname or the fqdn depending on
configuration.
This refers to the issue http://tracker.ceph.com/issues/6706
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Reviewed-by: Sage Weil <sage@inktank.com>
See the included unit test update. Consider:
1) x = lookup_or_create(1, 1)
2) remove(1)
3) y = lookup_or_create(1, 2)
4) x.reset()
5) z = lookup(1)
The bug is that z will be null since x.reset() caused the
cleanup callback to remove y's key value from contents.
To fix this, contents also records the pointer value for
the weak_ptr. The removal callback only removes the
key from contents if it matches the ptr in contents.
This should work since the pointer passed to the removal
callback must be unique up to that point since it has
not yet been deleted.
This allowed a pg removal -> pg recreation -> pg removal
sequence to cause the second pg removal entry to be
erroneously cleared by the first pg removal's destructor
as it finally made its way through the removal queue.
Fixes: #5951
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
For new SubQueues `cur` is not intialized, so front/pop_front will freak
out. I honestly I have no idea how this hasn't been seen, but it was
being triggered frequently on OSX.
Fixes: #6686
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.
Related: 0c2769d332
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
e22347df38 added a bad goto; just free
explicitly instead.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>