expect_false does not extend past the pipe and fails because the command
succeeds
introduced in f05c977bbc
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Use strncpy() instead of strcpy and make sure the result
is '\0' terminated.
Fix for:
CID 1063700 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
fixed_size_dest: You might overrun the 4088 byte fixed-size string
vol_args.name by copying the return value of c_str without checking
the length.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
shutdown() resets initialized to 0, but we can still receive messages
after this point, so fix message handlers to skip messages in this
case instead of asserting.
Also read initialized while holding Objecter::rwlock to avoid races
where e.g. handle_osd_map() checks initialized -> 1, continues,
shutdown() is called, sets initialized to 0, then handle_osd_map()
goes about its business and calls op_submit(), which would fail the
assert(initialized.read()) check. Similar races existed in other
message handlers which change Objecter state.
The Objecter is not destroyed until after its Messenger in
the MDS, OSD, and librados, so this should be safe.
Fixes: #9617
Backport: giant
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Fixes: #9013
Originally the configurable was empty, now setting explicitly both
fastcgi and civetweb (on port 7480).
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fix for:
const: At condition do_sync, the value of do_sync must be equal to 0.
dead_error_condition: The condition do_sync cannot be true.
CID 716893 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement op.OSDOp()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for coverity issue:
const: At condition unsafe > 0, the value of unsafe must be equal to 0.
dead_error_condition: The condition unsafe > 0 cannot be true.
CID 716892 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1240202 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member prio is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This is done in fedora packaging. Do it here too so that you can move
between upstream packages (from ceph.com) and fedora and other derivatives
will builds.
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
Fix two other paths where may change the mon state so that we wait for the
pending write first. start_election() in particular can be triggered at
almost any time if we see an election message from another mon.
Signed-off-by: Sage Weil <sage@redhat.com>
We are hitting a strange issue with valgrind and pthread spinlocks. Avoid
the issue by using an atomic_t here (which is simpler anyway).
Avoids: #8822
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
The ctime changes any time the inode does. That can happen even without
the file itself having changed, so we'd better accept the update whenever
the auth caps have dirtied, without worrying about the file caps!
Fixes: #9514
Backport: firefly
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
Add test for "lower_bound" method.
Add multithread tests for "lookup" and "lower_bound" methods.
Signed-off-by: Cheng Cheng <ccheng.leo@gmail.com>
Loic Dachary <loic@dachary.org>
* Introduction explaining what they are used for
* Commented example to illustrate the abstract description
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
following sequence events may happen.
- client sends reconnect message to a recovering MDS.
- MDS::ms_verify_authorizer() create a session for the client, the
session is in closed state.
- MDS::handle_client_reconnect() sends session close message to
the client.
- client closes the old connection and opens a new connection
- MDS::ms_verify_authorizer() is called for a new connection
- MDS::ms_handle_reset() is called for the old connection
- MDS::ms_handle_accept() is called for the new connection
MDS::ms_handle_reset() removes client's session from the session map, this
can cause null pointer dereference when handling client request. The fix
is add session to sessionmap when its state becomes 'opening' and remove
session from sessionmap when its state becomes 'closed'
Signed-off-by: Yan, Zheng <zyan@redhat.com>