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

46 Commits

Author SHA1 Message Date
Prashanth Pai
212a6f7dc0 Use Node UUID in brick volfile path
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2017-02-22 11:19:10 +05:30
Prashanth Pai
ce5a51292f Name configurable addresses to be more meaningful
The name of the configurable options should represent the services
provided or consumer of the port and not the protocol used.

* Renamed 'rpcaddress' to 'peeraddress': Denotes the address used
  for peer to peer communication.
* Renamed 'restaddress' to 'clientaddress': Denotes the address
  used by clients to communicate with glusterd2.

Coincidentally, these are analogous to those provided by etcd.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2017-01-16 12:50:45 +05:30
Prashanth Pai
68fc336ca3 Normalize peer address before comparison
Peer addresses given during volume create may or may not have
a port number. This should be taken into account when check is
made if peer is present or not based on the address.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-15 21:00:26 +05:30
Prashanth Pai
3caccd6506 Allow addresses without ports during add peer operation
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-15 19:18:03 +05:30
Prashanth Pai
1ee8dcef84 Merge branch 'master' into fix-volume-id 2016-12-15 14:38:14 +05:30
Prashanth Pai
5096a50222 Update arg name and xattr key variable
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-15 12:18:14 +05:30
Prashanth Pai
5a42fa6533 Create dirs required by brick processes
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-13 17:47:45 +05:30
Prashanth Pai
8d7cd1e338 Address review comments
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-09 17:17:45 +05:30
Prashanth Pai
24b2fad305 Allow UUIDs and ports as part of brick location
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-09 15:23:39 +05:30
Prashanth Pai
2677d94919 Enable multiple glusterd2 instances per node
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-12-09 10:52:00 +05:30
Prashanth Pai
863a59f0e8 Remove test and unused function that checks for etcd process
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-11-18 13:53:32 +05:30
Prashanth Pai
f92dde5504 Fix golint warnings
Barring transaction subpackage which contains mainly generated code,
other subpackages have had their golint warnings fixed.

We would want to ensure that all new code adheres to golint.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-10-28 17:14:28 +05:30
Prashanth Pai
caa3dbf3f7 Residual cleanup of utils
During review of daemon-framework PR, these functions were copied from
utils package to daemon package which consumes them. However, I missed
removing these from utils package. Doing that now.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-09-29 15:33:04 +05:30
Prashanth Pai
edea9769e3 Address review comments
* Removed most hardcodings
* Removed writing the pid file itself.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-09-27 13:31:00 +05:30
Prashanth Pai
10019461fc Introduce brick daemon
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-09-26 20:14:57 +05:30
Prashanth Pai
5096227959 Add process related utility functions
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-09-26 20:14:57 +05:30
Prashanth Pai
189cdb772e Move generic volgen functions into utils package
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-09-26 20:14:57 +05:30
Prashanth Pai
a37f810d3b Use string matching before doing lookup
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-07-25 17:51:11 +05:30
Kaushal M
9ee6cf9e51 Merge remote-tracking branch 'origin/master' into transaction-framework 2016-03-29 19:10:04 +05:30
Kaushal M
8e7b53e967 Add Contexts in transaction
Every transaction will now have an associated Context, that is passed to
all the steps. Anything that needs to be passed to/between steps can be
set in the transaction context.

Any logging done by the transaction framework during a transaction will
use the logger in the transaction Context.
2016-03-29 18:34:15 +05:30
Gaurav Kumar Garg
cd5bfecbab etcd bootstrapping in glusterd 2.0
Adding member upon peer probe in the etcd cluster.

With this change it will add remote host url during
peer probe of remote host in the cluster.

Issue #72

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
2016-02-25 15:39:17 +05:30
Atin Mukherjee
136b4f6b71 add tests for new etcd-mgmt functions
Closes #66

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2016-02-08 14:18:11 +05:30
Atin Mukherjee
b71736427c add tests in utils
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2016-02-06 19:25:20 +05:30
Gaurav Kumar Garg
97c7ae23cd Do not kill etcd daemon upon issuing ^c (SIGINT) in glusterd daemon
Currently when etcd daemon start upon starting of glusterd2 then upon
performing ^C (SIGINT) its killing etcd daemon.

With this patch it will set child process id to different from main
process id group and, etcd daemon will not be kill upon performing
SIGINT (^C) of main process.

Addressing previous commit comment

Issue #66

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
Signed-off-by : Atin Mukherjee <amukherj@redhat.com>
2016-02-01 11:57:09 +05:30
Gaurav Kumar Garg
13e7ce4861 Do not kill etcd daemon upon issuing ^c (SIGINT) in glusterd daemon
Currently when etcd daemon start upon starting of glusterd2 then upon
performing ^C (SIGINT) its killing etcd daemon.

With this patch it will set child process id to different from main
process id group and, etcd daemon will not be kill upon performing
SIGINT (^C) of main process.

Fixing some minor issue in unit text case and etcd restart case

Issue #66

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
Signed-off-by : Atin Mukherjee <amukherj@redhat.com>
2016-01-29 23:11:41 +05:30
Gaurav Kumar Garg
0b48d08247 Do not kill etcd daemon upon issuing ^c (SIGINT) in glusterd daemon
Currently when etcd daemon start upon starting of glusterd2 then upon
performing ^C (SIGINT) its killing etcd daemon.

With this patch it will set child process id to different from main
process id group and, etcd daemon will not be kill upon performing
SIGINT (^C) of main process.

Fixing previous commit comments.

Issue #66

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
Signed-off-by : Atin Mukherjee <amukherj@redhat.com>
2016-01-29 16:32:03 +05:30
Gaurav Kumar Garg
78c55e4a0d Supporting hierarchical directory stracture for bricks
While creating volume using glusterd2 it should support creation of
hirearchical directory stracture, if brick present in hierarchical
directory.

Solving previous commit comment (adding unit test case)

Issue #68

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
2016-01-14 12:44:22 +05:30
Gaurav Kumar Garg
b8d0912496 Supporting hierarchical directory stracture for bricks
While creating volume using glusterd2 it should support creation of
hirearchical directory stracture, if brick present in hierarchical
directory.

Issue #68

Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
2016-01-14 12:30:27 +05:30
Atin Mukherjee
d01d1ee344 add more negative tests
This patch also removes tests/patch.go as it can be imported from heketi/tests

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-12-23 18:35:53 +05:30
Atin Mukherjee
909d3fb47d Enable volume unit test
This patch reenables the volume package's unit test by mocking out few
dependencies like etcd, xattr calls.

Closes #57

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-12-21 17:45:27 +05:30
Atin Mukherjee
995f99467b Group volume create validations & commit into separate phases
This patch introduces the validation, commit & rollback phases (functions only)
of the volume create command life cycle. Later on all these functions can be
invoked by the transaction framework.

Closes #42

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-27 09:50:14 +05:30
Kaushal M
74c5f2e6a2 Merge pull request #40 from atinmu/response-structure-change
Response structure change
2015-11-24 17:08:56 +05:30
Atin Mukherjee
cbddef9f3d Resolve comments
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-24 16:19:33 +05:30
Atin Mukherjee
2d53018146 Use uuid.NewRandom() to maintain uniformity in uuid generation
This also makes the type of ID field of volume object from string to uuid.

Closes #32

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-24 13:21:47 +05:30
Atin Mukherjee
4036aad815 Refactor JSON response
Closes #39

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-24 11:48:32 +05:30
Atin Mukherjee
31443751da address comments
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-17 14:30:20 +05:30
Atin Mukherjee
9a02a33e90 fix unit tests
1. Disable unit tests for volume package
2. Fix review comments

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-09 16:39:50 +05:30
Atin Mukherjee
6d94d7a61e volume-create: add extended attribute support check
Please note currently the unit tests are going fail because of non-root
privileges. We'd need to move this infrastructure to something where we can have
root privileges

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-06 15:51:43 +05:30
Atin Mukherjee
5d3ff14de7 volume-create: unit tests for utils package
1. Added unit tests for utils package
2. Corrected IsLocalAddress utility

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-11-05 17:19:27 +05:30
Atin Mukherjee
2ca963be2b fix compilation error
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-10-28 20:33:04 +05:30
Atin Mukherjee
7166aa63eb return true from isLocalAddress utility
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-10-28 20:16:09 +05:30
Atin Mukherjee
6441b58cb7 fix isLocalAddress utility
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-10-28 19:59:25 +05:30
Atin Mukherjee
33113c3496 volume-create : comments incorporation
Along with the comments resolution this patch also stablizes the existing unit
tests

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-10-26 18:10:54 +05:30
Atin Mukherjee
e195a201d2 handle volume create command
Closes #14

Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2015-10-15 09:29:40 +05:30
Kaushal M
021db4ac97 Fix golint issues
Reported in https://app.wercker.com/#buildstep/55cdc9467331453f08005062

Or just run `golint ./...` in the root of this repo

Change-Id: I6870b220e101e264967fbb9495cd0bc65da70d78
Reviewed-on: https://review.gerrithub.io/243208
Reviewed-by: Kaushal M <kshlmster@gmail.com>
Tested-by: Kaushal M <kshlmster@gmail.com>
2015-08-14 14:23:50 +02:00
Atin Mukherjee
3fcd96657f volume-info : add volume-info API
Along with vol-info API, vol-create request unmarshalling has been also taken
care in this patch

Change-Id: Id2a7ad4d700cd0431eafb8319f50b601b92bc583
Signed-off-by: Atin Mukherjee <atin.mukherjee83@gmail.com>
Reviewed-on: https://review.gerrithub.io/242351
Reviewed-by: Kaushal M <kshlmster@gmail.com>
Tested-by: Kaushal M <kshlmster@gmail.com>
2015-08-06 08:01:23 +02:00