| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Fixes: #5455
Backport: cuttlefish
This commit fixes a regression, where radosgw-admin buckets list
operation wasn't returning any data.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
|
|
| |
If the underwater dentry is a remove link, we shouldn't mark the
inode clean
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
(cherry picked from commit 81d073fecb58e2294df12b71351321e6d2e69652)
|
|
|
|
|
|
|
|
|
|
| |
If we short-circuit and bootstrap, cancel our timer. Otherwise it will
go off some time later when we are in who knows what state.
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 9ae0ec83dabe37ac15e5165559debdfef7a5f91d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we are probing and get (say) an election timeout that calls reset(),
cancel the timer. Otherwise, we assert later with a splat like
2013-06-24 01:09:33.675882 7fb9627e7700 4 mon.b@0(leader) e1 probe_timeout 0x307a520
2013-06-24 01:09:33.676956 7fb9627e7700 -1 mon/Monitor.cc: In function 'void Monitor::probe_timeout(int)' thread 7fb9627e7700 time 2013-06-24 01:09:43.675904
mon/Monitor.cc: 1888: FAILED assert(is_probing() || is_synchronizing())
ceph version 0.64-613-g134d08a (134d08a9654f66634b893d493e4a92f38acc63cf)
1: (Monitor::probe_timeout(int)+0x161) [0x56f5c1]
2: (Context::complete(int)+0xa) [0x574a2a]
3: (SafeTimer::timer_thread()+0x425) [0x7059a5]
4: (SafeTimerThread::entry()+0xd) [0x7065dd]
5: (()+0x7e9a) [0x7fb966f62e9a]
6: (clone()+0x6d) [0x7fb9652f9ccd]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Fixes: #5438
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 03d3be3eaa96a8e72754c36abd6f355c68d52d59)
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you get device names like sdaa you do not want to mistakenly conclude that
sdaa is a partition of sda. Use /sys/block/$device/$partition existence
instead.
Fixes: #5211
Backport: cuttlefish
Signed-off-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 8c0daafe003935881c5192e0b6b59b949269e5ae)
|
|
|
|
|
|
|
|
|
|
|
| |
client/Client.cc: In member function 'virtual void Client::ms_handle_remote_reset(Connection*)':
warning: client/Client.cc:7892:9: enumeration value 'STATE_NEW' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_OPEN' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_CLOSED' not handled in switch [-Wswitch]
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 8bd936f077530dfeb2e699164e4492b1c0973088)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create_initial called 2x
The create_initial() method may get called multiple times; make sure it
will unconditionally generate new/initial rotating keys. Move the block
up so that we can easily assert as much.
Broken by commit cd98eb0c651d9ee62e19c2cc92eadae9bed678cd.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 521fdc2a4e65559b3da83283e6ca607b6e55406f)
|
|
|
|
|
|
| |
Fixes: #5443
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 31d6062076fdbcd2691c07a23b381b26abc59f65)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ceph-mon recently started using Preforker to working around forking issues.
As a result, internal_safe_to_start_threads got set sooner and calls to
pick_addresses() which try to set string config values now fail because
there are no config observers for them.
Work around this by observing the change while we adjust the value. We
assume pick_addresses() callers are smart enough to realize that their
result will be reflected by cct->_conf and not magically handled elsewhere.
Fixes: #5195, #5205
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit eb86eebe1ba42f04b46f7c3e3419b83eb6fe7f9a)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit f985de28f86675e974ac7842a49922a35fe24c6c I mistakenly made
is_writeable() false while paxos was updating due to a misread of
Paxos::propose_new_value() (I didn't see that it would queue).
This is problematic because it narrows the window during which each service
is writeable for no reason.
Allow service to be writeable both when paxos is active and updating.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 11169693d086e67dcf168ce65ef6e13eebd1a1ab)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Treat this as an extension of the recovery process, e.g.
RECOVERING -> ACTIVE
or
RECOVERING -> UPDATING_PREVIOUS -> ACTIVE
and we are not active until we get to "the end" in both cases.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 392a8e21f8571b410c85be2129ef62dd6fc52b54)
|
|
|
|
|
|
|
|
|
| |
- make states mutually exclusive (an enum)
- rename locked -> updating_previous
- set state prior to begin() to simplify things a bit
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ee34a219605d1943740fdae0d84cfb9020302dd6)
|
|
|
|
|
|
|
|
|
|
|
| |
If we are re-proposing a previously accepted value from a previous quorum,
we should not consider it readable, because it is possible it was exposed
to clients as committed (2/3 accepted) but not recored to be committed, and
we do not want to expose old state as readable when new state was
previously readable.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ec2ea86ed55e00265c2cc5ad0c94460b4c92865c)
|
|
|
|
|
|
|
| |
This is never set when we block, and nobody looks at it.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 7b7ea8e30e20704caad9a841332ecb2e39819a41)
|
|
|
|
|
|
|
|
| |
Recast this in terms of paxos check + our conditions, and make it
match wait_for_writeable().
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit f985de28f86675e974ac7842a49922a35fe24c6c)
|
|
|
|
|
|
|
|
| |
Recast this in terms of the paxos check and our additional conditions,
which match wait_for_readable().
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3aa61a0beb540e48bf61ceded766d6ff52c95eb2)
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e832e76a4af04b091c806ad412bcfd0326d75a2d)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The update_from_paxos() methods occasionally like to trigger new activity.
As long as they check is_readable() and is_writeable(), they will defer
until we go active and that activity will happen in the normal callbacks.
This fixes the problem where we active but is_writeable() is still false,
triggered by PGMonitor::check_osd_map().
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e68b1bd36ed285e38a558899f83cf224d3aa60ed)
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit dc83430124a5fd37573202a4cc0986c3c03739ef)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do the paxos refresh inside finish_proposal, ordered *after* the leader
assertion so that MonmapMonitor::update_from_paxos() calling bootstrap()
does not kill us.
Also, remove unnecessary finish_queued_proposal() and move the logic inline
where the bad leader assertion is obvious.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a42d7582f816b45f5d19c393fd45447555e78fdd)
|
|
|
|
|
|
|
|
| |
Refresh the in-memory values when we are told the on-disk paxos state
may have changed.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 2fccb300bdf6ffd44db3462eb05115da11322ed4)
|
|
|
|
|
|
|
|
| |
The refresh is done explicitly by the monitor, independent of the more
fragile PaxosService callbacks.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d941363d6e4249e97b64faff0e573f75e918ac0c)
|
|
|
|
|
|
|
|
| |
The refresh() will do this when the state changes; no need to
opportunistically call this method all of the time.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 03014a4ecc06cde420fad0c6c2a0177ebd7b839d)
|
|
|
|
|
|
|
|
|
| |
Instead of opportunistically calling each service's update_from_paxos(),
instead explicitly refresh all in-memory state whenever we know the
paxos state may have changed. This is simpler and less fragile.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit cc339c07312006e65854207523f50542d00ecf87)
|
|
|
|
|
|
|
|
|
| |
This closes a very narrow race during mon creation where there are no
service keys.
Fixes: #5427
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit cd98eb0c651d9ee62e19c2cc92eadae9bed678cd)
|
|
|
|
|
|
|
|
|
|
| |
- Don't increment before we dereference!
- We need to update the iterator before we delete the item.
This code is changed in master, so this fix is for cuttlefish only.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
| |
CID 1019628 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member "test_ops_hook" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e30a03210c3efb768b1653df5ae58917ef26e579)
|
|
|
|
|
|
|
|
| |
CID 1019627 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member "next_notif_id" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 499edd8bfc355c2d590f5fa1ef197d1ea5680351)
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d60534b8f59798feaeeaa17adba2a417d7777cbf)
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 8a4ed58e39b287fd8667c62b45848487515bdc80)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes valgrind warning:
==14803== Use of uninitialised value of size 8
==14803== at 0x12E7614: sctp_crc32c_sb8_64_bit (sctp_crc32.c:567)
==14803== by 0x12E76F8: update_crc32 (sctp_crc32.c:609)
==14803== by 0x12E7720: ceph_crc32c_le (sctp_crc32.c:733)
==14803== by 0x105085F: ceph::buffer::list::crc32c(unsigned int) (buffer.h:427)
==14803== by 0x115D7B2: Message::calc_front_crc() (Message.h:441)
==14803== by 0x1159BB0: Message::encode(unsigned long, bool) (Message.cc:170)
==14803== by 0x1323934: Pipe::writer() (Pipe.cc:1524)
==14803== by 0x13293D9: Pipe::Writer::entry() (Pipe.h:59)
==14803== by 0x120A398: Thread::_entry_func(void*) (Thread.cc:41)
==14803== by 0x503BE99: start_thread (pthread_create.c:308)
==14803== by 0x6C6E4BC: clone (clone.S:112)
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit eb91f41042fa31df2bef9140affa6eac726f6187)
|
|\
| |
| |
| | |
Reviewed-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On XFS this call is problematic because it directly calls the filemap
writeback without vectoring through xfs. This can break the delicate
ordering of writeback and range zeroing; see #4976 and this thread
http://oss.sgi.com/archives/xfs/2013-06/msg00066.html
Drop this behavior for now to avoid subtle data corruption.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The use of sync_file_range(2) on XFS screws up XFS' delicate ordering
of writeback and range zeroing; see #4976 and this thread:
http://oss.sgi.com/archives/xfs/2013-06/msg00066.html
Instead, replace all sync_file_range(2) calls with fdatasync(2), which
*does* do ordered writeback and should not leak unzeroed blocks.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
common/Preforker.h: In member function ‘int Preforker::signal_exit(int)’:
warning: common/Preforker.h:82:45: ignoring return value of ‘ssize_t safe_write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
This is harder than it should be to fix. :(
http://stackoverflow.com/questions/3614691/casting-to-void-doesnt-remove-warn-unused-result-error
Whatever, I guess we can do something useful with this return value.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit ce7b5ea7d5c30be32e4448ab0e7e6bb6147af548)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
First of all, we must find a monmap to backup. The newest version.
Secondly, we must make sure we back it up before clearing the store.
Finally, we must make sure that we don't remove said backup while
clearing the store; otherwise, we would be out of a backup monmap if the
sync happened to fail (and if the monitor happened to be killed before a
new sync had finished).
This patch makes sure these conditions are met.
Fixes: #5256 (partially)
Backport: cuttlefish
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5e6dc4ea21b452e34599678792cd36ce1ba3edb3)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Always use the highest version amongst all the typically available
monmaps: whatever we have in memory, whatever we have under the
MonmapMonitor's store, and whatever we have backed up from a previous
sync. This ensures we always use the newest version we came across
with.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6284fdce794b73adcc757fee910e975b6b4bd054)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, we will end up losing the monmap we backed up when we started
the sync, and the monitor may be unable to start if it is killed or
crashes in-between the sync abort and finishing a new sync.
Fixes: #5256 (partially)
Backport: cuttlefish
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit af5a9861d7c6b4527b0d2312d0efa792910bafd9)
|
| |
| |
| |
| |
| |
| |
| | |
From 654299108bfb11e7dce45f54946d1505f71d2de8.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e9689ac6f5f50b077a6ac874f811d204ef996c96)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The %ghost %dir ... line will make this get cleaned up but won't install
it.
Reported-by: Derek Yarnell <derek@umiacs.umd.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit 64ee0148a5b7324c7df7de2d5f869b880529d452)
|
| |
| |
| |
| |
| |
| |
| |
| | |
This handles cases where the daemon is started without the benefit of
sysvinit or upstart (as with teuthology or ceph-fuse).
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 654299108bfb11e7dce45f54946d1505f71d2de8)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
merge_log and friends all take care of dirtying the log
as necessary.
Fixes: #5238
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 5deece1d034749bf72b7bd04e4e9c5d97e5ad6ce)
|
|/
|
|
|
|
|
|
|
|
|
| |
apply_incremental() may return -EINVAL. Don't ignore it.
[1] UfP = Update from Paxos
Fixes: #5343
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit e3c33f4315cbf8718f61eb79e15dd6d44fc908b7)
|
|
|
|
|
|
|
|
|
|
| |
If we get a reset during our attempt to open an MDS session, close out the
Connection* and retry to open the session, moving the waiters over.
Fixes: #5379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit df8a3e5591948dfd94de2e06640cfe54d2de4322)
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 8c6b24e9039079e897108f28d6af58cbc703a15a)
|
|
|
|
|
|
|
| |
The weird output from libreadline users is related to the TERM variable.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e538829f16ce19d57d63229921afa01cc687eb86)
|
|
|
|
|
|
|
|
| |
Make the ancient-udev/blkid workaround script for RHEL/CentOS create the
symlinks for us too.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d7f7d613512fe39ec883e11d201793c75ee05db1)
|
|
|
|
|
|
|
|
|
| |
Keep going even if we hit one activation error. This avoids failing to
start some disks when only one of them won't start (e.g., because it
doesn't belong to the current cluster).
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c9074375bfbe1e3757b9c423a5ff60e8013afbce)
|
|
|
|
|
|
|
| |
Commit f3234c147e083f2904178994bc85de3d082e2836 missed this.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 253069e04707c5bf46869f4ff5a47ea6bb0fde3e)
|