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>
Reviewed-by: Sage Weil <sage@inktank.com>
Fix OSDService::get_con_osd_hb() to not try to get_connection() without front interface
Fix OSD::handle_osd_map() to check for missing front interface
Fixes: #5460
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
If we see a 'ready' file in the target OSD dir, do not mount our device
on top of it.
Among other things, this prevents ceph-disk activate on stray disks from
stepping on teuthology osds.
Fixes: #5445
Signed-off-by: Sage Weil <sage@inktank.com>
If we have an election and refresh, but the osdmap does not change, there
is no need to recalculate the pg create maps. However, if we register new
creating pgs, we do... when the last_pg_scan update gets pulled out of
paxos (i.e., on both leader and peon mons).
Signed-off-by: Sage Weil <sage@inktank.com>
Test case for failure in #5467. Supplying new auth info overwrites.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
This was a regression from the old behavior introduced by the
CLI rewrite.
Fixes: #5467
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
ceph_test_cors had libglobal.la in its _LDFLAGS macro definition;
it should have been in _LDADD. Moreover, things using libglobal.la
ought to be using LIBGLOBAL_LDA to add it to _LDADD. Fix them all.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
We do two things here:
- make init an one-time unconditional init method, which is what the
health service expects/needs.
- switch PGMonitor::init to be post_paxos_update() which is called after
the other services update, which is what PGMonitor really needs.
This is a new version of the fix originally in commit
a2fe013794 (and those around it). That is,
this re-fixes a problem where osds do not see pg creates from their
subscribe due to map_pg_creates() not getting called.
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Some services need to update internal state based on other service's
state, and thus need to be run after everyone has pulled their info out of
paxos.
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
level doesn't seem to like this when it races with an internal compaction
attempt (see below). Instead, let the store get opened by the ceph_mon
caller, and pull a bit of the logic into the caller to make the flow a
little easier to follow.
-2> 2013-06-25 17:49:25.184490 7f4d439f8780 10 needs_conversion
-1> 2013-06-25 17:49:25.184495 7f4d4065c700 5 asok(0x13b1460) entry start
0> 2013-06-25 17:49:25.316908 7f4d3fe5b700 -1 *** Caught signal (Segmentation fault) **
in thread 7f4d3fe5b700
ceph version 0.64-667-g089cba8 (089cba8fc0e8ae8aef9a3111cba7342ecd0f8314)
1: ceph-mon() [0x649f0a]
2: (()+0xfcb0) [0x7f4d435dccb0]
3: (leveldb::Table::BlockReader(void*, leveldb::ReadOptions const&, leveldb::Slice const&)+0x154) [0x806e54]
4: ceph-mon() [0x808840]
5: ceph-mon() [0x808b39]
6: ceph-mon() [0x806540]
7: (leveldb::DBImpl::DoCompactionWork(leveldb::DBImpl::CompactionState*)+0xdd) [0x7f363d]
8: (leveldb::DBImpl::BackgroundCompaction()+0x2c0) [0x7f4210]
9: (leveldb::DBImpl::BackgroundCall()+0x68) [0x7f4cc8]
10: ceph-mon() [0x80b3af]
11: (()+0x7e9a) [0x7f4d435d4e9a]
12: (clone()+0x6d) [0x7f4d4196bccd]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Signed-off-by: Sage Weil <sage@inktank.com>
Do not touch the in-memory first_committed until the trim commits. This
avoids any possible confusion due to races and keeps commit() as similar
to store_state() as possible.
Similarly, do not touch first_committed from store_state. We should
*only* pull it out of the kv store.
Signed-off-by: Sage Weil <sage@inktank.com>
When using ceph-deploy to create a new monitor on a host that is not
in the initial set of hosts defined by the ceph-deploy new command,
a "public network" statement needs to be added to the ceph.conf file.
Fixes#5195.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
The trimming is handled by proposing transactions. Do not confuse matters
by writing (incorrect) first_committed values at any other point.
Signed-off-by: Sage Weil <sage@inktank.com>
In bug #5424 I observed leveldb failing internally and then returning
bad info. We then hit a random/confusing assert. Try to detect this
earlier by verifying that a get of a just-written last_committed gives
us back the right thing.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
In commit f985de28f8 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>
Instead of encoding incrementals and periodically dumping the whole encoded
PGMap, instead store everything in a range of keys, and update them
between versions using transactions. The per-version values are now
breadcrumbs indicating which keys were dirtied so they can be refreshed
via update_from_paxos().
This has several benefits:
- we avoid every encoding the entire PGMap
- we avoid dumping that blob into leveldb keys
- we limit the amount of data living in forward-moving keys, which leveldb
has a hard time compacting away
- pgmap data instead lives over a fixed range of keys, which leveldb
excels at
- we only keep the latest copy of the PGMap (which is all we care about)
Bump the internal monitor protocol version.
Signed-off-by: Sage Weil <sage@inktank.com>
Avoid aliasing simple accessors; use a single name instead. Also, function
name overloading will throw a wrench in the class inheritance later.
Signed-off-by: Sage Weil <sage@inktank.com>
Instead of failing if the attribute to be returned is larger than 4KB,
double the buffer size each time librados.rados_getxattr returns
-errno.ERANGE and try again.
http://tracker.ceph.com/issues/4907fixes#4907
Signed-off-by: Loic Dachary <loic@dachary.org>
The TEST(EXT4StoreTest, _detect_fs) test is meant to be run from
qa/workunits/filestore/filestore.sh, after the ext4 file system was
created. If the DISK and MOUNTPOINT environment variables are not
defined, display a message explaining the expected environment and
silentely skip the test. The tests in store_test.cc are not unit tests
because they depend on their environment.
http://tracker.ceph.com/issues/5312fixes#5312
Signed-off-by: Loic Dachary <loic@dachary.org>
Init script for mapping/unmapping rbd device on startup and shutdown.
On start, map rbd dev according to /etc/rbdmap, and force mount -a
On stop, umount file system depending on rbd and unmap all rbd
Since some distribution use symlink for /etc/mtab, the user-space attribute _netdev is not enough to umount file system before rbd dev.
(also concern: #1790)
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
We are the only caller for get_version(prefix, name), so move it inline
and drop it. Also rename full_version_name to full_prefix_name, which I
find slightly less confusing.
Signed-off-by: Sage Weil <sage@inktank.com>