1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 21:45:43 +01:00

15 Commits

Author SHA1 Message Date
Poornima G
54ce5f6f7a blockvolume: Code re-org to fix race condition and cleanup bhv
The block host volume will still exist even when the blocks are all
deleted. Manually deleting block host volume will need another step
of unmounting. With this patch we auto-delete the block host volume
if there are no blocks.

The availablility check of bhv free space is not done within lock, hence
there is a possiblity that the available space has changed by the
time we decide to create the volume. This patch also fixes the race
condition.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-03-29 20:30:50 +05:30
Poornima G
c82180e979 BlockVolume: Reduce the number of clusterlocks
Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-02-21 09:49:55 +05:30
Poornima G
2869f88344 BlockVolume: Input block host volume properties in block create request
Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-02-21 09:49:55 +05:30
Poornima G
9aed7a59a5 Gluster-virtblock: Improve the GET/DELETE blocks api performance
Currently, to GET/DELETE any block volume we mount all the block hosting
volumes and readdir all the volumes, and loop through it, to find the
block hosting volume, the block belongs to. This approach is not scalable.
Hence, in the metadata of the block hosting volume, we keep a list of all
the block volumes present in that host volume. This way, GET/DELETE walks
through the volume metadata rather than the readdir.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-02-07 18:54:31 +05:30
Poornima G
df3f7a764c Fix auto creation of block host volume
When the block host cluster options are set to values other
than default, the block volume creation fails on the first
attempt, but succeeds on the subsequent attempts. This is
due to the initialization of block vol create req before
reading the cluster options. In this patch, change the order
of the same to fix the issue.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-02-07 18:54:31 +05:30
Oshank Kumar
9c6ee47f50 blockvolume: change log level from info to debug in RegisterProvider func
closes #1475

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-29 11:23:19 +05:30
Oshank Kumar
ca3d113915 use cluster-options for host volume configuration
Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-24 13:23:47 +05:30
Kotresh HR
d51f60b084 gluster-virtblock: Rename to virtual block
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2019-01-17 16:48:43 +05:30
Poornima G
8034fbdd10 Add loopback block provider
Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-01-16 15:22:15 +05:30
Oshank Kumar
8ef2e187de block volume: added a common function for updating available hosting volume size
- moved hosts parameter from mandatory to optional field in  CreateBlockVolume
   method of BlockProvider interface,since hosts field may not required for
   other block providers like loopback.

 - a common function for updating available hosting volume size will prevent
   from duplicate code

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30
Oshank Kumar
cf94e9f39c update dependencies using dep ensure
Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30
Oshank Kumar
12aef05756 block-volume: change size type from int64 to uint64
Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30
Oshank Kumar
6cedc1082f block-volume: added a interface for host volume management.
- added block volume provider name in path parameter of url
 - block provider will not be responsible for managing host volumes.

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30
Oshank Kumar
6b4ba1037f block-volume: moved common code to a utils package
Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30
Oshank Kumar
9b6e78fe05 gd2 plugin: added a plugin for block volume management
- added APIs for creation,deleting and listing block volumes.
 - added pluggable interface for block volume providers.

Refer Design Doc: #1319

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-07 19:04:12 +05:30