diff options
author | Sage Weil <sage@inktank.com> | 2014-04-03 01:03:37 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-03 01:03:37 +0200 |
commit | 6bf46e23e09c38717a83e6eba202f15e56090748 (patch) | |
tree | cf27bc901c99cc92c8e75861560d36f3312c1db6 | |
parent | Merge pull request #1580 from ceph/wip-7937 (diff) | |
download | ceph-6bf46e23e09c38717a83e6eba202f15e56090748.tar.xz ceph-6bf46e23e09c38717a83e6eba202f15e56090748.zip |
OSDMap: bump snap_epoch when adding a tier
When we make an existing pool a tier, we start copying the snap metadata
from the base tier. That includes removed_snaps. In order for the OSD
to recognize that this value is changing for the first time, we need to
set snap_epoch, or else the OSD doesn't update it's in-memory PGPool
with removed snaps and we eventually hit an assertion failure because
PGPool::cached_remove_snaps is incorrect (e.g., empty).
Fix this by bumping snap_epoch when we add the new tier.
Fixes: #7915
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/mon/OSDMonitor.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 3604a16d58a..4de2b423a38 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4929,6 +4929,7 @@ done: return true; } np->tiers.insert(tierpool_id); + np->set_snap_epoch(pending_inc.epoch); // tier will update to our snap info ntp->tier_of = pool_id; ss << "pool '" << tierpoolstr << "' is now (or already was) a tier of '" << poolstr << "'"; wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, ss.str(), @@ -5176,6 +5177,7 @@ done: return true; } np->tiers.insert(tierpool_id); + np->set_snap_epoch(pending_inc.epoch); // tier will update to our snap info ntp->tier_of = pool_id; ntp->cache_mode = mode; ntp->hit_set_count = g_conf->osd_tier_default_cache_hit_set_count; |