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

29 Commits

Author SHA1 Message Date
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
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
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
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
31f09bfd7d Fix TestWriteStatedump test
The unit test (TestWriteStatedump) uses a filename derived from current
timestamp and the actual code (WriteStatedump) being tested also uses
filename of the same pattern but that one may have another timestamp as
that code executes slightly later. Hence, it can so happen that the file
name written by WriteStatedump() is different than the filename expected
by the test. As these two timestamps are at seconds level granularity,
we didn't see it fail earlier.

This change modifies the test to look for a pattern that resembles
statedump file.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-09-14 17:11:38 +05:30
Madhu Rajanna
3c9ca8411b log errors with log.WithError()
during error logging we should log
with WithError()

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-09 14:29:28 +05:30
Madhu Rajanna
312ae58167 add QSH to the jwt token to avoid URL tampering
A query string hash (QSH) is an important technique
to prevent URL tampering and secure HTTP requests,
When a Client makes a request without a QSH claim,
or with a bad QSH claim (one that doesn’t match
the request), then the glusterd2 will respond with
HTTP status 401 Unauthorized

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-06 17:14:06 +05:30
Aravinda VK
5427a32251 Added extra information to os/exec errors
The err string returned by `exec.Command.{Run,Output}` will
not contains `stderr`, Output in log/CLI will just display `exited with
status 1`. This patch adds the content of `stderr` along with the error
message.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-06-25 17:15:16 +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
8cdab77b23 store peer address provided during
peer add in ETCD.

if peer address already present in store
update configuration on startup

this allows the users to use peer address
provided during peer add, for any other
operations(ex:- volume create,expand)

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-23 14:03:49 +05:30
Madhu Rajanna
f4ecd14441 Fix golint and ineffassign issues
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-15 13:14:36 +05:30
Madhu Rajanna
14854e3d75 removed unit testing for auto-generated files
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-26 15:46:30 +05:30
Madhu Rajanna
b45382e877 pkg:utils unit test
added unit test for pkgs/utils

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-26 15:46:30 +05:30
Madhu Rajanna
b758adb3a3 pkg:utils unit testing
added more unittesting

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-26 15:46:29 +05:30
Madhu Rajanna
1313ad9309 pkgs:utils added return if failed to write to file
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-25 11:33:11 +05:30
Prashanth Pai
af0da645c8 Allow only one cluster join/leave request at a time
If a glusterd2 instance is already processing a cluster membership
request (leave or join), return 409 (Conflict) to the other such
client requests immediately.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-04-06 23:35:56 +05:30
Mohammed Rafi KC
acf41b0a82 glusterd2: Refactoring of functions for snapshot
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-03-16 14:56:29 +05:30
Mohammed Rafi KC
82eaf05360 Refactor brick status to use as a generic function
Changed the brick status function to use generic strcture
instead of client api strcture.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-03-16 14:56:29 +05:30
Prashanth Pai
5516dccedd volume-create: Fix few outstanding issues
* Separated brick validation step from the step which modified it by
  setting xattrs.
* Added rollback functions.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-02-21 12:08:04 +05:30
Prashanth Pai
21e3be2033 Add request and response types
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-02-14 14:08:07 +05:30
Sheena Artrip
c9beeb8441 Support ipv6-only hosts 2018-02-02 17:54:39 -08:00
Kaushal M
567a128a75 Merge branch 'master' into nuke-heketitests 2017-11-22 12:40:03 +05:30
Prashanth Pai
2ba871f723 Remove heketitests as dependency
...as we were using only the Patch() function.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2017-11-21 17:57:08 +05:30
Prashanth Pai
16e2b3c400 Create and move UnmarshalRequest to restutils
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2017-11-21 15:52:58 +05:30
Kaushal M
b4cf164ecf Update tests to use assert package 2017-11-15 12:45:19 +05:30
Kaushal M
e515103421 Move tests to pkg/testutils 2017-11-14 19:00:37 +05:30
Kaushal M
2e22efa375 Fix utils build
gomvpkg expands source files with cgo, which prevents packges from being
built.
2017-11-13 16:02:08 +05:30
Kaushal M
380e007991 Move errors to pkg/errors 2017-11-02 22:10:13 +05:30
Kaushal M
0cd3c18467 Move utils to pkg/utils 2017-11-02 22:06:52 +05:30