Bug 1468882 - heketi allows to create block volumes exceeding the capacity of block hosting volume
heketi allows to create block volumes exceeding the capacity of block hosting...
Status: ON_QA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: heketi (Show other bugs)
cns-3.6
Unspecified Unspecified
unspecified Severity high
: ---
: CNS 3.6
Assigned To: Mohamed Ashiq
krishnaram Karthick
:
Depends On:
Blocks: 1445448
  Show dependency treegraph
 
Reported: 2017-07-09 06:43 EDT by krishnaram Karthick
Modified: 2017-07-12 07:22 EDT (History)
4 users (show)

See Also:
Fixed In Version: heketi-5.0.0-5 rhgs-volmanager-docker-3.3.0-7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description krishnaram Karthick 2017-07-09 06:43:46 EDT
Description of problem:

Block volume creation should fail when the total capacity of block hosting volume is exhausted.

For ex, when block hosting volume is 500 GB, the total size of all block devices that could be created should be limited to 500 GB and any attempt to create a block device over and above that mark should fail. 

Gluster allows to create block devices above the capacity of volume it is hosting on as only sparse files are created by default in gluster. so heketi cannot depend on gluster command to fail, rather the request to create block volume should not proceed from heketi to gluster if the capacity is exceeded.

[root@dhcp47-10 ~]# heketi-cli blockvolume create --size=480
Name: blockvol_be664f518291761bf14fd5741362b5b8
Size: 480
Volume Id: be664f518291761bf14fd5741362b5b8
Cluster Id: 6bed12159b987cf70338ac6d1d3d0720
Hosts: [10.70.46.248 10.70.47.49 10.70.47.72]
IQN: iqn.2016-12.org.gluster-block:15695855-a4ab-4f20-9670-6eb9901ba1a1
LUN: 0
Hacount: 3
Username: 
Password: 
Block Hosting Volume: 78dfd43a5abacb9e8365500d54d4f6e5

[root@dhcp47-10 ~]# heketi-cli blockvolume create --size=30
Name: blockvol_0ced9f74bb5cb6d364a35f2752603c6c
Size: 30
Volume Id: 0ced9f74bb5cb6d364a35f2752603c6c
Cluster Id: 6bed12159b987cf70338ac6d1d3d0720
Hosts: [10.70.46.248 10.70.47.49 10.70.47.72]
IQN: iqn.2016-12.org.gluster-block:cfa768eb-723a-4a30-8b41-fdc56dfab6a9
LUN: 0
Hacount: 3
Username: 
Password: 
Block Hosting Volume: 78dfd43a5abacb9e8365500d54d4f6e5
[root@dhcp47-10 ~]# heketi-cli blockvolume create --size=30
Name: blockvol_b7d4e9737f20d25f0b305a10dd519076
Size: 30
Volume Id: b7d4e9737f20d25f0b305a10dd519076
Cluster Id: 6bed12159b987cf70338ac6d1d3d0720
Hosts: [10.70.46.248 10.70.47.49 10.70.47.72]
IQN: iqn.2016-12.org.gluster-block:04a8d622-314d-49bf-80c4-28ad2137ded6
LUN: 0
Hacount: 3
Username: 
Password: 
Block Hosting Volume: 78dfd43a5abacb9e8365500d54d4f6e5


[root@dhcp47-10 ~]# heketi-cli blockvolume list
Id:0ced9f74bb5cb6d364a35f2752603c6c    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:blockvol_0ced9f74bb5cb6d364a35f2752603c6c
Id:a3b7006bde73028b651d7362f6ba78a1    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:blockvol_a3b7006bde73028b651d7362f6ba78a1
Id:b7d4e9737f20d25f0b305a10dd519076    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:blockvol_b7d4e9737f20d25f0b305a10dd519076
Id:be664f518291761bf14fd5741362b5b8    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:blockvol_be664f518291761bf14fd5741362b5b8
[root@dhcp47-10 ~]# heketi-cli volume list
Id:78dfd43a5abacb9e8365500d54d4f6e5    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:vol_78dfd43a5abacb9e8365500d54d4f6e5 [block]
Id:fee4f0b4b98d1c468d1ebac9ed5acd44    Cluster:6bed12159b987cf70338ac6d1d3d0720    Name:heketidbstorage


[root@dhcp47-10 ~]# heketi-cli volume info 78dfd43a5abacb9e8365500d54d4f6e5
Name: vol_78dfd43a5abacb9e8365500d54d4f6e5
Size: 500
Volume Id: 78dfd43a5abacb9e8365500d54d4f6e5
Cluster Id: 6bed12159b987cf70338ac6d1d3d0720
Mount: 10.70.46.248:vol_78dfd43a5abacb9e8365500d54d4f6e5
Mount Options: backup-volfile-servers=10.70.47.49,10.70.47.72
Block: true
Free Size: -50  ---->>> SIZE GONE NEGATIVE
Block Volumes: [0ced9f74bb5cb6d364a35f2752603c6c a3b7006bde73028b651d7362f6ba78a1 b7d4e9737f20d25f0b305a10dd519076 be664f518291761bf14fd5741362b5b8]
Durability Type: replicate
Distributed+Replica: 3

Version-Release number of selected component (if applicable):

heketi-client-5.0.0-4.el7rhgs.x86_64
cns-deploy-5.0.0-6.el7rhgs.x86_64

How reproducible:
Always

Steps to Reproduce:
1. create a block hosting device of 500GB
2. Try to create multiple block devices over above 500 GB mark

Actual results:
block vol creation succeeds oversubscribing from 500GB

Expected results:
block volume creation should fail

Additional info:

Note You need to log in before you can comment on or make changes to this bug.