Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #155 from lpabon/limits
Browse files Browse the repository at this point in the history
Update volume limits
  • Loading branch information
Luis Pabón committed Aug 25, 2015
2 parents 4798a58 + ec5ddca commit e78dd18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/glusterfs/volume_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const (
DEFAULT_THINP_SNAPSHOT_FACTOR = 1.5

// Default limits
BRICK_MIN_SIZE = uint64(1 * GB)
BRICK_MIN_SIZE = uint64(4 * GB)
BRICK_MAX_SIZE = uint64(4 * TB)
BRICK_MAX_NUM = 200
BRICK_MAX_NUM = 500
)

type VolumeEntry struct {
Expand Down
8 changes: 4 additions & 4 deletions apps/glusterfs/volume_entry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,13 @@ func TestVolumeEntryCreateRunOutOfSpaceMaxBrickLimit(t *testing.T) {
40, // devices_per_node,

// Must be larger than the brick min size
BRICK_MIN_SIZE*2, // disksize, 2G)
BRICK_MIN_SIZE*2, // disksize
)
tests.Assert(t, err == nil)

// Create a volume who will be broken down to
// Shouldn't be able to break it down enough to allocate volume
v := createSampleVolumeEntry(BRICK_MAX_NUM * 2)
v := createSampleVolumeEntry(BRICK_MAX_NUM * 2 * int(BRICK_MIN_SIZE/GB))
err = v.Create(app.db, app.executor)
tests.Assert(t, err == ErrNoSpace)

Expand Down Expand Up @@ -1103,8 +1103,8 @@ func TestVolumeEntryExpandNoSpace(t *testing.T) {
*vcopy = *v

// Asking for a large amount will require too many little bricks
err = v.Expand(app.db, app.executor, 500)
tests.Assert(t, err == ErrMaxBricks)
err = v.Expand(app.db, app.executor, 5000)
tests.Assert(t, err == ErrMaxBricks, err)

// Asking for a small amount will set the bricks too small
err = v.Expand(app.db, app.executor, 10)
Expand Down

0 comments on commit e78dd18

Please sign in to comment.