Project

General

Profile

Fix #8820

calamari: min_size is not set correctly when pool size is non-default

Added by Alexandre Marangone about 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Backend (REST API)
Target version:
% Done:

0%

Source:
Support
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

Creating a pool with a non-default size will not set min_size properly.

We created a pool with a size of 2 with the UI, min_size was also set to 2 (default calculated for default size - 3).

I guess Calamari is doing:
- create pool
- change size to non-default value,
- change crush_ruleset if needed

Additionally, min_size should be set according the formula: size-size/2.

However, if osd_pool_default_min_size is set and equal (is higher possible?), then we should display a warning (and present a field to change the value?).

Associated revisions

Revision d88dfb55 (diff)
Added by Dan Mick about 7 years ago

cthulhu: set appropriate min_size on pool create/update

Use an algorithm similar to Ceph's: requested min_size or
default, compare to size, use whichever is smaller; or if
no requested or default, use size - size/2.

On update, only recalculate min_size if size or min_size is given.

Fixes: #8820
Signed-off-by: Dan Mick <>

History

#1 Updated by Dan Mick about 7 years ago

  • Assignee set to Dan Mick

#2 Updated by John Spray about 7 years ago

My take on this is that we should probably automagically set min_size during creation, but on subsequent updates we should take the user at their word (it being legal and reasonable in some cases to have e.g. size and min_size both set to 2). We could do this in the backend in PoolRequestFactory.create, if attributes['size'] is set but attributes['min_size'] isn't then apply the defaults policy for min_size:

  unsigned get_osd_pool_default_min_size() const {
    return osd_pool_default_min_size ?
      MIN(osd_pool_default_min_size, osd_pool_default_size) :
      osd_pool_default_size - osd_pool_default_size / 2;
  }

However, following up on this I notice there is is bigger issue that min_size simply isn't settable in the current UI, in either the create or the edit views for pools. I suppose this was something done to be simpler, but it feels like an unnecessary limitation to me.

#3 Updated by Dan Mick about 7 years ago

  • Tracker changed from Bug to Fix
  • Target version set to v1.2.1-rc1

#4 Updated by Dan Mick about 7 years ago

  • Target version changed from v1.2.1-rc1 to v1.3-dev1

#5 Updated by Dan Mick about 7 years ago

  • Target version changed from v1.3-dev1 to 1.3-dev4

#6 Updated by Dan Mick about 7 years ago

  • Priority changed from Normal to High

A customer has expressed interest in this fix.

#7 Updated by Dan Mick about 7 years ago

wip-8820 created with a suggested impl. Should add some tests.

#8 Updated by Dan Mick about 7 years ago

  • Target version changed from 1.3-dev4 to v1.3-dev1

#9 Updated by Dan Mick about 7 years ago

  • Target version changed from v1.3-dev1 to 1.3-dev5

#10 Updated by Dan Mick about 7 years ago

  • Category set to Backend (REST API)
  • Status changed from New to Resolved

#11 Updated by Dan Mick almost 7 years ago

  • translation missing: en.field_story_points set to 5.0

Also available in: Atom PDF