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

40 Commits

Author SHA1 Message Date
Aravinda VK
bebbc65052 Support for loopback bricks
Register the Bricks hosting directory using,

```
glustercli device add <peerid> <path> --provisioner loop
```

Example:

```
glustercli device add 70d79c3f-e7af-43f6-8b65-05dff2423da1 \
	   /exports --provisioner loop
```

Now create the volume using,

```
glustercli volume create gv1 --size 1G \
	   --provisioner loop \
	   --replica 3
```

Fixes: #1418
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-02-14 10:49:17 +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
Oshank Kumar
5dd12549da check connectivity to peer before sending join cluster request.
Fixes: #1436

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2019-01-03 12:07:59 +05:30
Vishal Pandey
5814720454 Implement max-bricks-per-process option for brick multiplexing.
The implementation is an extension to brick-multiplexing. The max-bricks-per-process is being
monitored by using entries in pmap corresponding to a particular port.
So, If a brick needs to be multiplexed following are the series of steps that needs to be followed. The following are the genralised sets of steps -
- look into all started volumes with same options as the current volume(one by one)
- traverse through all local bricks of taregtVolume
- find the port of the local  brick by using its path
- look for number of entries in pmap corresponding to particular port No. and count num of bricks already attached to that port
- If the number of bricks attached to a port is less that max-bricks-per-process constraint
- Then we have our target brick or repeat from step 1 until all targetVolumes are covered.
- Since current volume is not considered into started volumes list, so if we don't have any target brick yet from any of the
started volumes then
- look for any target brick in the current volume
- If even the current volume doesn't have any target brick then
- start seperate glusterfsd.

Cases Handles in this PR and approach followed -
1- If no started volume already present
	-  check current volume for target brick
	- if taregt brick not found, start seperate glusterfsd
2- If atleast one started volume present
	- if Target volume found, out of all the started volumes
		* if target brick found, attach to the brick
		* if taregt brick not found, look through other taregt volumes
		* if still target brick not found, look into current volume
		* if still taregt brick not found, start seperate glusterfsd process
	- if target Volume not found
		* look into current volume for any target bricks
		* if taregt brick not found, start seperate glusterfsd

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-12-17 08:33:22 +05:30
Madhu Rajanna
040c63d8a8 Fix error message
error messages should start with small case.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-12-13 20:49:22 +05:30
Aravinda VK
9361638cfc Default Options for new Volumes
- Added default group profiles for each volume
  types(replicate,disperse,distribute)
- Included perf xlators in volfile template and disabled in default
  profiles. So that these xlators can be enabled/disabled if
  required.
- Included "features/shard" xlator in client volfile(Fixes: #954)
- Enabled self heal by default for replicate and disperse volumes.
- On glusterd2 start/restart, group profiles are saved in
  `$workdir/templates/profiles.json` (Ex:
  `/var/lib/glusterd2/templates/profiles.json)
- To modify profile defaults, update respective default profile and
  restart glusterd2.(Note: Already created Volume options will not
  change, only applicable for new volumes)
- All perf xlators are disabled by default till we decide the best
  defaults.
- Disabled set/reset of default option profiles.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-11 16:42:27 +05:30
Vishal Pandey
119cbb6823 ISSUE -
MountLocalBricks() and MountVolumeBricks() are called during GD2 startup.
Both these methods are responsible for mounting bricks for all the volumes in the store.
MountLocalBricks() exits as soon as there is some issue with mounting any volume's localBricks because of
which other volumes' localBricks(which are yet to be processed) are skipped for mounting.
MountVolumeBricks() exits as soon as any one of the brick of that volume is unable to be mounted because of which
other localBricks of that volume(which are yet to be processed), are skipped for mounting.

FIX-

Modify both the methods to not exit after an error but log the error and continue the mounting process for othe volumes and localBricks

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-12-06 10:31:26 +05:30
Aravinda VK
931b7a2e80 Refactor Device management
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-05 11:21:29 +05:30
Vishal Pandey
933aa93c8f split brain operations API and CLI
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-23 19:46:46 +05:30
Vishal Pandey
48a7ebfd28 Brick resize for volume expand
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-22 17:19:02 +05:30
Aravinda VK
367de6f577 added comments to volgen structs and snapshot related fixes
Brick volfiles generation added during Snapshot activate and
volfiles delete added during snapshot deactivate.

Also fixed client volfile regeneration of snapshot volume during
snapshot restore undo.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-09 09:11:18 +05:30
Madhu Rajanna
ca1639a80f Move snapshot error msg to error pkg
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-10-23 10:30:10 +05:30
Prashanth Pai
3aa07db926 Add function to get value of single cluster option
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-10-11 16:26:30 +05:30
Prashanth Pai
edda2c5063 Refactor cluster options package
* Merge 'glusterd2/cluster' package into `glusterd2/options` package.
* Rename 'glusterd2/commands/global' to 'glusterd2/commands/options'.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-10-11 16:26:30 +05:30
Mohammed Rafi KC
d284f086d0 snapshot:update options during snap create using default value
This also address review comments in PR 846.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-09-03 14:43:13 +05:30
Mohammed Rafi KC
82f980deda Address review comments captured in PR-846
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-07-13 13:06:10 +05:30
Mohammed Rafi KC
e85bb81ad5 snapshot/status: implement snapshot status
This PR includes test functionality change, cli and test cases

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-07-13 13:06:10 +05:30
Hari Gowtham
806a203695 quota: disable quotad
quota enable and disable as a volume set option
The daemon start and stop are called using the actor
framework.

Updates: #421
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
2018-07-04 12:37:40 +05:30
Madhu Rajanna
e010dd6fdb format error strings: error strings should not
be capitalized,make first letter as lower case

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-06-20 16:21:29 +05:30
Madhu Rajanna
fcae94d2ad added function to return HTTP status code and
error based on error

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-06-11 15:06:34 +05:30
Prashanth Pai
9bbf00fbad Merge branch 'master' into add-size-constraint-to-volume-peer-metadata 2018-05-31 18:16:06 +05:30
root
20ae919453 Merge branch 'master' into add-size-constraint-to-volume-peer-metadata 2018-05-30 17:42:15 +05:30
Kaushal M
8778da24de Merge branch 'master' into snapshot1 2018-05-29 19:25:07 +05:30
Kaushal M
2a3599bd27 Merge branch 'master' into snapshot1 2018-05-29 17:37:42 +05:30
Madhu Rajanna
203f5ea5e9 added functionality to expose flags in
volume create and volume expand

added additional flag to create brick dir if its not exists

exposed flags for volume create and expand
in glustercli

added e2e test cases for flags in
volume create and volume expand

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-29 10:17:18 +05:30
rishubhjain
8ad368dbd7 Merge branch 'master' of https://github.com/gluster/glusterd2 into group 2018-05-23 00:17:49 -04:00
rishubhjain
62273e4c30 Merge branch 'master' of https://github.com/gluster/glusterd2 into group
Conflicts:
	pkg/errors/error.go
2018-05-23 00:16:14 -04:00
Madhu Rajanna
01e5f9d798 regex validation will handle empty volname,
removed validation for empty volume name

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-21 13:40:16 +05:30
Madhu Rajanna
91b0a8e78a validate volume name
It is necessary to validate volume
name before volume creation

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-21 13:34:36 +05:30
rishubhjain
3ed7136984 Renaming commands folder to utils 2018-05-21 00:53:24 -04:00
Mohammed Rafi KC
71b540a18e snapshot-info,list,volume-list
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-16 16:15:14 +05:30
Mohammed Rafi KC
76794f3af1 snapshot-create
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-16 16:12:27 +05:30
Madhu Rajanna
c2640301e3 added Rest functinality for get volfile
based on id

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-11 15:25:46 +05:30
Madhu Rajanna
af75b1b603 check for duplicate brick entry
check if provided brick entry already present in
volume

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-03 16:39:16 +05:30
Madhu Rajanna
11171d7da3 check for duplicate brick entry in
volume create request

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-03 15:42:09 +05:30
Samikshan Bairagya
3296ec8c6f Seperate cluster wide option handling from volume set/get interface
Setting of cluster wide options like cluster-op-version,
cluster.brick-multiplex, do not require volfile changes. It makes
sense to separate the handling of such cluster wide options outside
of the traditional volume set/get interface. Added a new cluster
object instance that contains a map of <option:value> for cluster
wide options.

Issue: #493

Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
2018-02-20 11:58:10 +05:30
Kotresh HR
4c16bde7f6 bitrot: Add scrub ondemand support
Bitrot scrubber daemon supports ondemand scrub by
providing brick-op service. Glusterd invokes rpc
to avail the service.

Updates: #431
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-01-26 23:27:02 -05:00
Kamal Mohanan
7eff741285 Group options
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-24 16:14:15 +05:30
Kotresh HR
f3468ff5b5 bitrot: Add bitrot plugin to glusterd2
This patch adds following support
1. Enable bitrot : Enables bitrot-stub xlator and starts bitd and scrubber
2. Disable bitrot: Disables bitort-stub xlator and stops bitd and scrubber

Updates: #431
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-01-18 04:01:22 -05:00
Kaushal M
380e007991 Move errors to pkg/errors 2017-11-02 22:10:13 +05:30