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

34 Commits

Author SHA1 Message Date
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
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
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
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
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
Vishal Pandey
9b9ad781a5 Implement Granular-entry-heal enable/disable using volume set
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-09-06 15:43:32 +05:30
Madhu Rajanna
c5ba295533 Start/Stop daemons during volume start and stop
add Xlator action function to start
daemons if volume starts

add Xlator action function to stop
daemons if volume stops and if daemon
is not managing any other volumes.

update volinfo in ETCD and notify
all nodes about newly generated volfiles

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-21 13:37:22 +05:30
Prashanth Pai
4f7c8135bf plugins: Create 'api' package for each plugin
In Go, every directory is a distinct package. There is no such thing as
a subpackage. Having `api` is a separate package as a subdirectory in
each plugin ensures that we will not run into cyclic dependency issues.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-26 11:53:42 +05:30
vpandey-RH
94b631c2f7 Index/Full Heal API and CLI 2018-07-12 21:12:15 +05:30
Madhu Rajanna
febde46f01 code clean up in the glusterd2 plugins
Added logging with the log.WithError().
Allocate capacity to slice to reduce the allocation of memory during append.
Added UNDO function in txn steps.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-07-12 18:44:47 +05:30
vpandey-RH
eb279a36a6 Resolve process already running error with SHD 2018-06-20 16:08:47 +05:30
Madhu Rajanna
8955492f8b log with reqid and transaction id in
daemon framework

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-06-15 14:54:06 +05:30
Prashanth Pai
edcbd97942 Merge branch 'master' into err_cleanup 2018-06-11 15:17:52 +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
root
3bb831e229 Add missing files gfid field in self heal info API as well as cli.
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-06-11 13:51:05 +05:30
Kaushal M
4586b4e25d Update rebalance/snapshot/heal to use new locking mechanisms 2018-05-30 17:51:33 +05:30
rishubhjain
6301fa2b2a Fix typo 2018-05-30 01:01:45 -04:00
root
3af0c8dbda Modify isActionStepRequired and heal info resp
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-05-29 22:42:36 +05:30
root
cca49d2fa6 Implement SHD enable/disable and add selfheal-info
Signed-off-by: root <root@dhcp41-154.lab.eng.blr.redhat.com>
2018-05-29 21:20:40 +05:30
Kaushal M
b709a45a0b transaction: Remove CreateLockSteps 2018-05-28 15:09:36 +05:30
Kaushal M
0d145ced9c transaction: Replace Cleanup with Done 2018-05-28 12:46:18 +05:30
John Mulligan
3c9cf5d9e5 convert daemon interface to use vector args instead of string
This change converts the Daemon interface to use an Args
function that returns a []string rather than a string.
It's generally good policy to keep your argv as a
distinct set of arguments rather than mush everything
together in a string that must be pulled apart again
later.
It's easier to see where each argument begins and ends,
it works better for (and futureproofs against) arguments
that may contain spaces, and can potentially avoid
security issues if some of the input strings contain
unusual sequences of characters, and it even ends up
needing less typing.

I had some questions around the storeddaemon and
events changes. I'd like to hear if anyone has opinions
about that part of the change.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2018-05-22 17:54:21 -04:00
root
6024056834 Distinguish key not found vs error accessing store
Handle key not found and error accessing store and return 404 or 503 respectively
in all user facing utility functions.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-04-24 06:33:17 -04:00
Aravinda VK
e23e718fb3 plugins: Remove SunRPC pluggability
None of the plugins exposed sunrpc programs using plugin interface.

Removing unused part from the Plugin interface.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-04-23 10:27:20 +05:30
Prashanth Pai
3dd7e680fa Default rundir to /var/run/gluster
...except for the tests.

Rundir should be in a place like /var/run which doesn't persist across
reboots. Further some socket files and pid files were in '/var/run' and
few others in '/var/run/gluster'. With this change, everything goes into
the same rundir.

See this bug and fix for some historical context:
https://bugzilla.redhat.com/show_bug.cgi?id=1258561

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-03-29 09:58:56 +05:30
Prashanth Pai
2dd9b85c48 Simplify SendHTTPError()
* Remove having to specify default error code. It is made implicit
  instead. This removes some of the code clutter.
* Support returning multiple errors in a single API response.
  Although this will be rarely used, introducing the provision in API
  right now is better than later.
* Allow callers to pass both string and error types.
* Introduce a error code map which maps error codes (integers) to their
  brief textual description.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-03-21 20:16:53 +05:30
Prashanth Pai
23e5a679c5 Import sunrpc into pkg
This is an as-is import of sunrpc codec without introducing any
functional code changes. There are few opportunities for cleanup and
optimizations and that'll be done in future.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-02-09 11:17:36 +05:30
root
10a9e18163 Merge branch 'master' into self-heal-daemon
Conflicts:
	glusterd2/plugin/plugins.go
2018-02-06 05:30:17 -05:00
root
9b226bd45f Merge branch 'master' into self-heal-daemon
Conflicts:
	glusterd2/plugin/plugins.go
2018-02-04 08:45:25 -05:00
root
f1d2ba0699 Merge branch 'master' into self-heal-daemon
Conflicts:
	glusterd2/plugin/plugins.go
2018-01-25 02:08:41 -05:00
root
21fac3baa3 Merge branch 'master' into self-heal-daemon
Conflicts:
	glusterd2/volume/struct.go
2018-01-19 05:11:18 -05:00
root
ab75a478e5 afr: Implement heal-disable API
Implement self-heal disable API. The API is ineffective
for the time being since self-heal daemon enable is still
waiting for some additions before it becomes operative but
it should work once shd is running successfully.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-01-14 04:50:52 -05:00
root
98e4aa42e4 afr: Implement self-heal daemon in GD2
Implement self-heal daemon using the daemon.go interface.
The self-heal daemon will fail to start as the client volfile
glustershd-server.vol is not being generated in GD2 while
create a replicate volume.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2017-12-08 14:37:47 +05:30