Avoid possibility that we create multiple OSDs do to retries by passing in
the optional uuid arg. (A stray osd id will make the osd tell tests a
few lines down fail.)
Fixes: #8728
Signed-off-by: Sage Weil <sage@inktank.com>
send_message_osd_cluster() et al are *trying* to protect their Connection
lookups (and not re-open zapped Connections) via map reservations, but
that only works if we know that we haven't already called mark_down() on
the entities they might be looking up. So we need to await_reserved_maps
before we do any mark_down calls.
Since the waiting might take some time (fast dispatch in progress), only do
so if we are actually going to mark somebody down.
Fixes: #8512
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Fixes: #8608
Backport: dumpling, firefly
Bucket instance id is a concatenation of zone name, rados instance id,
and a running counter. We need to allocate enough space to account zone
name length.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Read max 'sizeof(target) - 1' to not write out of bound
later on the 'target[r] = 0;' call in case we read the
full PATH_MAX.
CID 1128416 (#1 of 1): Out-of-bounds write (OVERRUN)
overrun-local: Overrunning array target of 4096 bytes
at byte offset 4096 using index r (which evaluates to 4096).
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1219611 (#1 - 5): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable saw_name going out of scope
leaks the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Check the result of rados_ioctx_create()before using io_ctx.
Free io_ctx where needed. Fix messages at the end of testrados().
CID 1219613 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable io_ctx going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1219612 (#1 - 3): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable iter going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Commit 7dc93a9651 fixed an incorrect
behavior with the OSD's 'osd bench' value hard-caps. The test wasn't
appropriately modified unfortunately.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
'max_count' is the maximum number of bytes that we are to allow for an
'osd bench' command. This value is a hard-cap that takes into account
a predefined throughput, the 'osd bench' duration and, for a rather large
block size, can be taken as the amount of bytes that we would ever be
able to write in that period of time.
The explanation wasn't appropriate enough, hence this patch, which
hopefully will avoid confusion in the future.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
The test was a big sequence of commands being run and it has been growing
organically for a while, even though it has maintained a sense of
locality with regard to the portions being tested.
This patch intends to split the commands into functions, allowing for a
better semantic context and easier expansion. On the other hand, this
will also allow us to implement mechanisms to run specific portions of
the test instead of always having to run the whole thing just to test a
couple of lines down at the bottom (or have to creatively edit the test).
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Run failed always running into the '|| cat $OUT' case due
to bad escaping of '\t'. This is caused by different shells
on different distros (e.g. bash on SUSE vs dash on Ubuntu).
Use 'grep -P ' and fix the regex to make it shell independet.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>