Project

General

Profile

Bug #11493

mon: adding exsting pool as tier with --force-nonempty clobbers removed_snaps

Added by Sage Weil over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
04/28/2015
Due date:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
firefly,hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

1. images had snapshots (and removed_snaps)

2. images was added as a tier of img, and img's removed_snaps was copied
to images, clobbering the removed_snaps value (see
OSDMap::Incremental::propagate_snaps_to_tiers)

3. tiering relation was undone, but removed_snaps was still gone

4. on OSD startup, when we load the PG, removed_snaps is initialized with
the older map. later, in PGPool::update(), we assume that removed_snaps
alwasy grows (never shrinks) and we trigger an assert.

To fix this I think we need to do 2 things:

1. make the OSD forgiving out removed_snaps getting smaller. This is
probably a good thing anyway: once we know snaps are removed on all OSDs
we can prune the interval_set in the OSDMap. Maybe.

2. Fix the mon to prevent this from happening, even when
--force-nonempty is specified. (This is the root cause.)


Related issues

Related to Ceph - Bug #7915: ./include/interval_set.h: 385: FAILED assert(_size >= 0) Duplicate 03/31/2014
Copied to Ceph - Backport #12312: mon: adding exsting pool as tier with --force-nonempty clobbers removed_snaps Resolved 04/28/2015
Copied to Ceph - Backport #12314: mon: adding exsting pool as tier with --force-nonempty clobbers removed_snaps Resolved 04/28/2015

Associated revisions

Revision bbec53ed (diff)
Added by Sage Weil over 3 years ago

mon: prevent pool with snapshot state from being used as a tier

If we add a pool with snap state as a tier the snap state gets clobbered
by OSDMap::Incremental::propogate_snaps_to_tiers(), and may prevent OSDs
from starting. Disallow this.

Include a test.

Fixes: #11493
Backport: hammer, giant, firefly
Signed-off-by: Sage Weil <>

Revision 13c8d58d (diff)
Added by Sage Weil over 3 years ago

mon: prevent pool with snapshot state from being used as a tier

If we add a pool with snap state as a tier the snap state gets clobbered
by OSDMap::Incremental::propogate_snaps_to_tiers(), and may prevent OSDs
from starting. Disallow this.

Include a test.

Fixes: #11493
Backport: hammer, giant, firefly
Signed-off-by: Sage Weil <>
(cherry picked from commit bbec53edf9e585af4e20bbc9ba9057d6fdfda342)

Revision d7f53442 (diff)
Added by Sage Weil about 3 years ago

mon: prevent pool with snapshot state from being used as a tier

If we add a pool with snap state as a tier the snap state gets clobbered
by OSDMap::Incremental::propogate_snaps_to_tiers(), and may prevent OSDs
from starting. Disallow this.

Include a test.

Fixes: #11493
Backport: hammer, giant, firefly
Signed-off-by: Sage Weil <>
(cherry picked from commit bbec53edf9e585af4e20bbc9ba9057d6fdfda342)

Conflicts:
qa/workunits/cephtool/test.sh
properly co-exist with "# make sure we can't create an ec pool tier"
src/mon/OSDMonitor.cc
properly co-exist with preceding "if (tp->ec_pool())"
(The changes to both files would have applied cleanly if
https://github.com/ceph/ceph/pull/5389 had not been merged first.)

History

#1 Updated by Sage Weil over 3 years ago

  • Description updated (diff)

#2 Updated by Sage Weil over 3 years ago

  • Status changed from New to Need Review

#3 Updated by Samuel Just over 3 years ago

  • Status changed from Need Review to Resolved
  • Regression set to No

#4 Updated by Nathan Cutler over 3 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to firefly,hammer

#6 Updated by Loic Dachary about 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF