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

228 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
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
Sridhar Seshasayee
ec25ca6619 Tracing: Implement glustercli command to disable the trace configuration
Implement glustercli command to disable and delete the current tracing
configuration on the cluster. The changes include gd2 transaction that
first deletes the trace configuration from the store on one node and then
a subsequent step clears the in-memory trace configuration on all nodes.

closes #1368

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2019-02-12 08:08:00 +05:30
Sridhar Seshasayee
219ce69b48 Tracing: Implement glustercli command to update the trace configuration
Implement glustercli command to update the current tracing status on the
cluster. All trace config options are passed as flags to the command. If
any option is not passed, the existing value for that option will be
retained.

closes #1368

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2019-02-12 08:08:00 +05:30
Sridhar Seshasayee
4c65b6f95a Tracing: Implement glustercli command to get current tracing status
Implement glustercli command to get the current tracing status on the
cluster. The tracing info is read from the store and presented to the
user in table format with info like Status, Jaeger Endpoints, Sampler
type and sample fraction. For e.g.,

+------------------------+----------------------------+
|      TRACE OPTION      |           VALUE            |
+------------------------+----------------------------+
| Status                 | enabled                    |
| Jaeger Endpoint        | http://192.168.122.1:14268 |
| Jaeger Agent Endpoint  | http://192.168.122.1:6831  |
| Jaeger Sampler         | 2 (Probabilistic)          |
| Jaeger Sample Fraction | 0.99                       |
+------------------------+----------------------------+

Add "trace enable" e2e test cases. The tests also exercise the
"trace status" request.

closes #1368

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2019-02-12 08:08:00 +05:30
Sridhar Seshasayee
fc9596d555 Tracing: Implement Undo step for trace enable transaction.
Implement the undo step for trace enable transaction. This
step removes the trace configuration from the store if
written.

closes #1368

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2019-02-12 08:08:00 +05:30
Sridhar Seshasayee
76a5a9f928 Tracing: Implement gd2 plugin that enables tracing across the cluster.
This commit implements a gd2 plugin that allows management of tracing
operations across the cluster. This change-set implements the server side
handling of the request to enable tracing on all gd2 nodes. The
pre-condition to execute this transaction is that there shouldn't be any
existing trace configuration in etcd. The steps
involved in the transaction are,
 1. Node receiving the request Validates the passed tracing configuration,
 2. Node Stores the tracing configuration in etcd, and,
 3. Set the in-memory trace configuration on all nodes

Failure in steps 2 and 3 will result in the undo logic restoring the
previous configuration both in memory and in etcd.

closes #1368

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2019-02-12 08:08:00 +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
Aravinda VK
c896a94589 Skip lvs command during thinpool delete
If a Volume is cloned from another volume, the bricks of cloned volume
will also belong to same LV thinpool as the original Volume. So before
removing the thinpool a check was made to confirm if number of Lvs in
that thinpool is zero. This check was causing hang when parallel
Volume delete commands were issued.

With this PR, number of Lvs check is removed, instead of that captured
the failure of thinpool delete and handled it gracefully.

This PR also adds support for gracefully delete the volume if lv or
thinpool already deleted by previous failed transaction or manual delete.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-01-08 15:39:39 +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
Aravinda VK
0839909c62 Removed redundant log messages
If the details already available as API response, additional logging
for success is removed.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-01-04 12:04:05 +05:30
Madhu Rajanna
e432ed380d Add total and used field to device response
it will be user friendly if we have total,
free,used field in device response.

total size= total size of device.
free size= available size of device for
volume creation.
used size= space used for volume creation.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-12-17 10:34:35 +05:30
Aravinda VK
ee2fb7f89a Normalize the xlator name when stored in Volinfo
Category prefix is optional when setting Volume options. For example
to set replicate.eager-lock, we can pass `replicate.eager-lock` or
`cluster/replicate.eager-lock`. With this PR, always stored with
category prefix.

Also fixed the issue of loosing template variables when xlator default
options and volinfo.Options are loaded(Fixes: #1397)

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-13 18:57:09 +05:30
Kaushal M
5f889176c9 Update transactions to use Sync 2018-12-11 19:07:22 +05:30
Aravinda VK
8de2a9ee49 Fix Option names in group profile and add db profile
- Group profile for transactional DB workload added
- Fixed the option names used in other group profiles
- Fixed the validation issues related to setting the options

glusterfs PR to support enable/disable of xlators
https://review.gluster.org/21813

Fixes: #1250
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-07 11:25:17 +05:30
Aravinda VK
931b7a2e80 Refactor Device management
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-05 11:21:29 +05:30
rishubhjain
3d9707a63a Edit device API 2018-12-05 09:09:14 +05:30
Aravinda VK
af5928bf77 Volume expand: Consider peer id while checking available size
If a device exists with same name in different Peer, it is possible to
get the available size information of the device from different
Peer than getting information locally.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-29 18:00:30 +05:30
Aravinda VK
66a9b6e308 geo-rep: Fixes for remote authentication and gsyncd path
- gsyncd path defaulted to /usr/libexec/glusterfs/gsyncd
- Fixes remote REST API auth issues
- Workaround to make it work with marker xlator

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-29 11:40:33 +05:30
Madhu Rajanna
2de8ee9596 rebalance start: Allow requests without a body
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-11-28 14:00:12 +05:30
Vishal Pandey
c7be1da250 Changes in format to run glfsheal to get heal info.
The change is basically in the way we pass xml flag to glfsheal binary.
Previously it was passed with a simple 'xml', now after the change
https://review.gluster.org/#/c/glusterfs/+/21501/
its passed as '--xml' to glfsheal.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-28 13:42:43 +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
Aravinda VK
552d07b7d9 lvm and fs utils code refactor
Moved lvm related functions from `$SRC/glusterd2/snapshot/lvm`
and `$SRC/plugins/device/deviceutils/` to `$SRC/pkg/lvmutils`

Also moved fs related functions from `plugins/deviceutils` to
`$SRC/pkg/fsutils`.

Fixes: #1187
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-22 22:38:37 +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
rishubhjain
643fb9dd1b Using bytes instead of KB for volume creation 2018-11-19 15:16:41 +05:30
Hari Gowtham
b5e55a7427 Arbiter brick size calculation for smart volume creation.
This patch creates the arbiter brick for the smart volume as per the
calculation:

brick size = 4 KB * ( size in KB of largest data brick in volume or
replica set / average file size in KB)

Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
2018-11-12 09:58:13 +05:30
Aravinda VK
d4dd56b397 volgen: volgen changes for glustershd
Fixes: #1111 and #1190
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-09 09:11:18 +05:30
Aravinda VK
95db1b2296 volgen: volgen changes for bitrot
Fixes: #1111 and #1190
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-09 09:11:18 +05:30
Aravinda VK
341e02a0df volgen: quota support for volgen changes
Fixes: #1111 and #1190
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-09 09:11:18 +05:30
Aravinda VK
f704fc87f0 volgen: volgen changes for Rebalance
Fixes: #1111 and #1190
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-09 09:11:18 +05:30
Atin Mukherjee
c0a3aa0ee3 device/plugin: rename used to device-used in api response
Fixes: #1286
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2018-11-08 16:40:02 +05:30
Vishal Pandey
da8bc4d5ce Heal-info command fails when any one of the bricks is offline in a volume
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-08 16:25:17 +05:30
imjoey
72ccf646db Fix capitalized error message format. 2018-10-26 09:31:33 +05:30
Mohammed Rafi KC
73c66caf16 snapshot: Delete parent lv's during restore
During a snapshot restore, we need to delete the parent
lv's if it is auto provisioned or snapshot provisioned

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-10-16 11:36:06 +05:30
Redhat
fe29991a2a Fixed GeorepStatusList response
Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2018-10-11 16:17:50 +05:30
Prashanth Pai
f63544464e Fix ineffectual assignments detected by ineffassign
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-10-05 11:41:04 +05:30
Prashanth Pai
19bca18f92 Fix gofmt nonconformity introduced by PR #1234
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-09-14 17:11:38 +05:30
Sidharth Anupkrishnan
3fb301d278 Correction for fixing request and response methods
Correction for fixing the request and response for Methods: GeoReplicationConfigGet and GeoReplicationConfigSet. Fixed the code in plugins/georeplication/init.go. Also regenerated the endpoints.md file.

Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2018-09-14 14:11:29 +05:30