...not very elegantly because this is bash, but
at least check the expected value is somewhere
present in the JSON output.
Signed-off-by: John Spray <john.spray@redhat.com>
This was using an array_section so we were getting
a list of only the times, instead of an array
mapping addr to time.
Signed-off-by: John Spray <john.spray@redhat.com>
The error stream in the erasure code path is broken and the error
message is sometime not reported back to the user. For instance the
ErasureCodePlugin::factory method has no error stream: when an error
happens the user is left with a cryptic error code that needs lookup in
the sources to figure it out.
The error stream is made more systematic by:
* always pass it as ostream *ss (instead of something passing it as
a reference and sometime as a stringstream)
* ostream *ss is added to ErasureCodePlugin::factory
* define the ErasureCodeInterface::init pure virtual. It is
already implemented by all plugins, only in slightly different
ways. The ostream *ss is added so the init function has a way to
report error in a human readable way to the caller, in addition to
the error code.
The ErasureCodePluginJerasure::init return value was incorrectly ignored
when called from ErasureCodePluginJerasure::factory and now returns when
it fails.
The ErasureCodeLrc::layers_init method is given ostream *ss for error
messages instead of printing them via derr.
The ErasureCodePluginLrc::factory method no longer prints errors via
derr: this workaround is made unnecessary by the ostream *ss argument.
The ErasureCodeShec::init ostream *ss argument is ignored. The
ErasureCodeShec::parse method entirely relies on derr to report errors
and converting it goes beyond the scope of this cleanup. There is a
slight risk of getting it wrong and it deserves a separate commit and
careful and independent review.
The PGBackend, OSDMonitor.{cc,h} changes are only about prototype
changes.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If the shec plugin fails to initialize the instance, it must be deleted
before returning to the caller, otherwise it will be leaked.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
When the lrc layers are defined, the semantic of the D,c and _
characters are defined, the rest is undefined. The test that verifies
the guard against layers of different size uses the A character which
is undefined. Depending on the implementation, the size test could fail
because the A character is undefined and a guard to forbid undefined
characters is added. Replace A with D to make sure the undefined
character A will not interfere with the test.
This may seem nitpicking but it actually caused problems after a code
refactor that will appear in a few commits from here.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Instead of map<string,string>. Make it a non const when initializing
an ErasureCodeInterface instance so that it can be modified.
Rename parameters into profile for consistency with the user
documentation. The parameters name was chosen before the user interface
was defined. This cosmetic update is made in the context of larger
functional changes to improve error reporting and user interface
consistency.
The init() method are made to accept non const parameters. It is
desirable for them to be able to modify the profile so that is
accurately reflects the values that are used. The caller may use this
information for better error reporting.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
With "rbd: timeout watch teardown on unmap with mount_timeout" going
into kernel 4.2, document its effect in the man page.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* since the eio tests crashes some of the OSD nodes, before the
change, the tests try to undo the crash before moving on, so it
won't interfere with following tests. a more robust/clean way to
do this is to isolate individual tests in a sandbox, so each eio
test will have its own:
setup + inject + verify crash + teardown
cycle. this change helps to remove the cleanup/undo steps in
invidual test.
* update the disabled tests accordingly.
* use a minimum set of OSDs and R-S(2,1) for the testing to speed
up the test.
* add the new testsuite to check_SCRIPTS
Fixes: #11693
Signed-off-by: Kefu Chai <kchai@redhat.com>
* the "daemon" parameter was not respected.
* update the test_get_config() to check the overrided option instead of
the default one.
* add set_config()
Signed-off-by: Kefu Chai <kchai@redhat.com>
man pages have to be preprocessed now, and can't be installed directly.
skip installing them until we add the cmake-fu to copy what man/Makefile.am
is doing
Signed-off-by: Casey Bodley <casey@cohortfs.com>
If a file has been deleted with a loopback device attached, then the
`losetup --all` output will carry:
/dev/loopX: [0032]:344213 (/.../src/test-ceph-disk/vdf.disk (deleted))
This causes the losetup parsing in reset_leftover_dev() to throw an
error, e.g.:
rreset_leftover_dev: 430: test
'(/home/ddiss/ceph/src/test-ceph-disk/vdf.disk' '(deleted))' =
'(/home/ddiss/ceph/src/test-ceph-disk/vdf.disk)'
test/ceph-disk.sh: line 430: test: too many arguments
Fix this by quoting the path variable for the string comparison.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Run cephtool-test-{mon,osd,mds}.sh with CEPH_CLI_TEST_DUP_COMMAND=1 to
detect idempotency related problems during make check. This is how
ceph-qa-suite/tasks/workunit.py will run
suites/rados/singleton/all/cephtool.yaml and it's easier to fix when
make check fails rather than later on when a fully populated rados suite
has one failed job.
http://tracker.ceph.com/issues/11618 Refs: #11618
Signed-off-by: Loic Dachary <ldachary@redhat.com>
When CEPH_CLI_TEST_DUP_COMMAND=1 is set, ceph osd create will consume
two osd id and return the later. Fix the test to account for that and
not assume the osd id being allocated by osd create is always the
next available osd id.
The other osd create tests do not suffer from the same variation because
they provide a UUID argument that guarantees the same osd id is going to
be returned every time.
http://tracker.ceph.com/issues/11618Fixes: #11618
Signed-off-by: Loic Dachary <ldachary@redhdat.com>
On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.
Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Prior to this commit, the Network Configuration Reference guide and
Troubleshooting guide recommended opening a number of ports that were
unique to the number of daemons that we ran.
This doesn't really cover all use cases. Users can easily restart
daemons in ways that cause the daemons to bind to higher ports. This
leads to OSDs or MDSs binding to ports that are firewalled.
Update the Network Configuration Reference guide and Troubleshooting
guides to simply recommend that users open all the ports between 6800
and 7300 on their OSDs and MDSs.
http://tracker.ceph.com/issues/11688 Refs: #11688
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
The upper limit for OSD/MDS ports changed from 7100 to 7300 in commit
f9ec5a7945. Update the Quick Start
Preflight documentation to reflect this change.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
The xio_msg pointers to be freed in XioPortal::release_xio_rsp() are no
longer valid after a call to xio_connection_destroy(). We were already
avoiding the call to xio_release_msg() in this case, but were still
dereferencing the xio_msg for its user_context pointer. Moved the check
for is_connected() outside of the loop to avoid any access to msg.
Suggested-by: Vu Pham <vuhuong@mellanox.com>
Signed-off-by: Casey Bodley <casey@cohortfs.com>
accelio is using rdtsc to generate xio_msg.timestamp, which can't be
reliably converted to a timeval. now uses ceph_clock_now() to assign
the Message::recv_stamp and recv_complete_stamp
Signed-off-by: Casey Bodley <casey@cohortfs.com>
A missing nonce in the osd addrs was preventing the monitor from
detecting osd restarts. XioMessenger::bind() now sets the nonce in the
same way that SimpleMessenger and AsyncMessenger do
Signed-off-by: Casey Bodley <casey@cohortfs.com>
Signed-off-by: Vu Pham <vu@mellanox.com>
Better way to assign connections to a specific lane of a portal
Avoiding lane competition/hogging.
This change resolves the slow ramping up and spiky behaviors during
clients starting/running I/Os.
Signed-off-by: Vu Pham <vu@mellanox.com>
Prior to this commit, if a user installed the "ceph-common" Debian
package without installing "ceph", then /usr/bin/ceph would crash
because it was missing the ceph_argparse library.
Ship the ceph_argparse library in "ceph-common" instead of "ceph". (This
was the intention of the original commit that moved argparse to "ceph",
2a23eac549)
http://tracker.ceph.com/issues/11388 Refs: #11388
Reported-by: Jens Rosenboom <j.rosenboom@x-ion.de>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>