Commit Graph

24953 Commits

Author SHA1 Message Date
Gary Lowell
ee178fba49 ceph.spec.in: Additional clean-up on package removal
When removing the last instance of ceph, also remove the files
created by ceph during operation.  These consist of the files
under /var/lib/ceph, /etc/ceph, and /var/log/ceph. Bug #4415.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-15 16:25:39 -07:00
Sage Weil
65c31e1b97 ceph-fuse: invalidate cache by default
Closes: #2215
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-15 13:35:37 -07:00
Samuel Just
9edc87a54f Merge branch 'wip_4196'
Reviewed-by: Sage Weil <sage@inktank.com>
Fixes: #4196
2013-03-15 11:21:44 -07:00
Samuel Just
39a66b8637 Merge branch 'next' 2013-03-15 11:21:35 -07:00
Samuel Just
f3ad12eab3 test_filejournal: add tests for footer, header, payload corruption
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:07 -07:00
Samuel Just
a22cdc67b0 FileJournal: add testing methods to corrupt entries
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:07 -07:00
Samuel Just
3b767fa63f FileJournal,Journal: detect some corrupt journal scenarios
When the checksum or footer are invalid, we will now try to
look at the next entry.  If we find a valid entry, it is likely
that the journal is corrupt.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:07 -07:00
Samuel Just
cf00930021 FileJournal::wrap_read_bl: convert arguments to explicit in/out arguments
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:07 -07:00
Samuel Just
c3725e92ec FileJournal: add committed_up_to to header
header_t::committed_up_to provides a lower bound for safetly committed
journal entries.  If read_entry fails prior to committed_up_to, we
know we have a corrupt jorunal entry.  Furthermore, if
journal_write_header_frequency is not 0, we will write out the
journal header once every journal_write_header_frequency
journal writes.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:07 -07:00
Samuel Just
4aa0f8a274 FileStore: add more debugging for remove and split
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-15 11:21:01 -07:00
Samuel Just
de8edb732e FileJournal: queue_pos \in [get_top(), header.max_size)
If queue_pos == header.max_size when we create the entry
header magic, the entry will be rejected at get_top() on
replay.

Fixes: #4436
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-15 11:07:12 -07:00
Samuel Just
f1b031b3cf OSD: expand_pg_num after pg removes
Otherwise:
1) expand_pg_num removes a splitting pg entry
2) peering thread grabs pg lock and starts split
3) OSD::consume_map grabs pg lock and starts removal

At step 2), we run afoul of the assert(is_splitting)
check in split_pgs.  This way, the would be splitting
pg is marked as removed prior to the splitting state
being updated.

Backport: bobtail
Fixes: #4449
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-15 11:07:10 -07:00
Samuel Just
8222cbc8f3 PG: ignore non MISSING pg query in ReplicaActive
1) Replica sends notify
2) Prior to processing notify, primary queues query to replica
3) Primary processes notify and activates sending MOSDPGLog
to replica.
4) Primary does do_notifies at end of process_peering_events
and sends to Query.
5) Replica sees MOSDPGLog and activates
6) Replica sees Query and asserts.

In the above case, the Replica should simply ignore the old
Query.

Fixes: #4050
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-15 11:07:07 -07:00
Sage Weil
632f7200bb Merge branch 'next'
Conflicts:
	src/mon/AuthMonitor.cc
2013-03-14 21:11:35 -07:00
Sage Weil
11650c5a8c mon: only try to bump max if leader
I broke this in 4637752db6 when I
restructured this function.  Only try to increase the max if we are
the leader.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 21:10:46 -07:00
Sage Weil
80af5fb887 ceph-disk-activate: identify cluster .conf by fsid
Determine what cluster the disk belongs to by checking the fsid defined
in /etc/ceph/*.conf.  Previously we hard-coded 'ceph'.

Note that this has the nice side-effect that if we have a disk with a
bad/different fsid, we now fail to activate it.  Previously, we would
mount and start ceph-osd, but the daemon would fail to authenticate
because it was part of the wrong cluster.

Fixes: #3253
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 21:05:07 -07:00
Gary Lowell
6f15dba931 debian/control: Fix for moved file
The ceph-mds.conf file moced from the ceph package to the
ceph-mds package.  Add replaces/breaks statements to the
control file to handle this on upgrade.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-03-14 17:16:24 -07:00
Sage Weil
7370b55646 ceph-disk-activate: abort if target position is already mounted
If the target position is already a mount point, fail to move our mount
over to it.  This usually indicates that a different osd.N from a
different cluster instances is in that position.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 17:05:56 -07:00
David Zafman
18525ebf55 rados/test.sh fails in the nightly run
Make test more robust by using my_snaps vector for snap IDs

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-14 13:45:01 -07:00
Noah Watkins
1cbcc04467 Merge remote-tracking branch 'origin/wip-osd-addr-api'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-14 13:27:56 -07:00
Sage Weil
efd153e9e2 debian: add start ceph-mds-all on ceph-mds install
This ensures that when we then start individual mds instances, we can
stop ceph-mds-all and they will get stopped.  We do the same already for
ceph-all.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 41897fcba1)
2013-03-14 12:33:57 -07:00
Sage Weil
41897fcba1 debian: add start ceph-mds-all on ceph-mds install
This ensures that when we then start individual mds instances, we can
stop ceph-mds-all and they will get stopped.  We do the same already for
ceph-all.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 12:33:08 -07:00
Noah Watkins
47378d69ed libcephfs: add ceph_get_osd_addr interface
Return the network address for an OSD by ID.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-14 12:25:17 -07:00
Sage Weil
b6102c0945 Revert "ceph-disk-activate: rely on default/configured keyring path"
This reverts commit 936b8f20af.

This is necessary because we mount the osd in a temporary location.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 12:05:52 -07:00
Sage Weil
3e628eee77 Revert "ceph-disk-activate: don't override default or configured osd journal path"
This reverts commit 813e9fe2b4.

We run --mkfs with the osd disk mounted in a temporary location, so it is
necessary to explicitly pass in these paths.

If we want to support journals in a different location, we need to make
ceph-disk-prepare update the journal symlink accordingly.. not control it via
the config option.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-14 12:04:44 -07:00
Sage Weil
8f462d476a Merge pull request #109 from dalgaaf/wip-da-performance-1-v2
prefer prefix ++/--operator for e.g. iterators for performance reasons

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-14 11:41:04 -07:00
Sage Weil
ab54d67f8e Merge pull request #108 from ceph/wip-refuse-last-mon-remove
mon: refuse "mon remove" if only one mon left

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-14 11:38:21 -07:00
Danny Al-Gaaf
282d3aa478 monmaptool.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:02 +01:00
Danny Al-Gaaf
0c5532cfce mon/PGMonitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:02 +01:00
Danny Al-Gaaf
01c6a7e50f mon/MonmapMonitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:02 +01:00
Danny Al-Gaaf
45a3d0cc56 mon/Monitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:02 +01:00
Danny Al-Gaaf
a26a9f7ca8 mon/MonMap.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:02 +01:00
Danny Al-Gaaf
a6c454320d mon/MDSMonitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
a66170df11 mon/LogMonitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
23ce79ff13 mon/AuthMonitor.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
ab0dac1559 mds/mdstypes.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
c0506c2e2f mds/SnapServer.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
823a56f0b3 mds/SnapServer.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
6127f43158 mds/SnapServer.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
e98432c048 mds/Mutation.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:01 +01:00
Danny Al-Gaaf
e317a9787f mds/MDSTableServer.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
d0a0ee5460 mds/MDSTableClient.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
f8825a3603 mds/MDSMap.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
3ff204e376 mds/MDS.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
865d7a8d31 mds/MDLog.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
6735383c6b mds/MDCache.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
ce8060e867 mds/MDBalancer.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
180d93a2b7 mds/Locker.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:24:00 +01:00
Danny Al-Gaaf
f2452b1171 mds/MDCache.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:23:59 +01:00
Danny Al-Gaaf
a42e9ef802 mds/CInode.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:23:59 +01:00