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

25 Commits

Author SHA1 Message Date
Kaushal M
5f889176c9 Update transactions to use Sync 2018-12-11 19:07:22 +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
imjoey
72ccf646db Fix capitalized error message format. 2018-10-26 09:31:33 +05:30
Sridhar Seshasayee
0eceaf2370 tracing: Trace volume list operation
Add instrumentation to trace volume list operation. Add the count of the
number of volumes listed by the command as an attribute in the top level
span of the trace.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2018-09-07 18:38:43 +05:30
Madhu Rajanna
a848a87ecb bitrot plugin code clean up
done code clean up where its required in this plugin.

updated code for missing error handling,

if called function is returning an error,
instead of logging with the logger.WithFileds() log with
logger.Error()

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-08 11:05:18 +05:30
Prashanth Pai
4b7c2cd906 plugins: Prefix plugin name to the rest routes
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-26 11:53:42 +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
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
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
Madhu Rajanna
ac1768ef39 Merge branch 'master' into issue_815 2018-05-30 14:59:04 +05:30
Madhu Rajanna
e0b9968079 corrected bitrot enabled check on
volume info for bitrot scrub status

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-30 14:30:10 +05:30
Madhu Rajanna
21b8f08769 added undo function for to revert back
the changes made to volinfo

in case of bitrot enable transaction failure
we need to revert back the updated volume
information with previous volume information

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-30 12:54:58 +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
Prashanth Pai
aaaaf9980a Move bitrot and quota validations to respective plugins
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-04-26 15:20:09 +05:30
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
Kotresh HR
1faa85b254 bitrot: Add cli support
Usage:
glustercli bitrot <volname> {enable|disable}
glustercli bitrot <volname> scrub-throttle {lazy|normal|aggressive}
glustercli bitrot <volname> scrub-frequency {hourly|daily|weekly|biweekly|monthly}
glustercli bitrot <volname> scrub {pause|resume|status|ondemand}

Issue: #431
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-02-07 01:15:12 -05:00
Kotresh HR
4bf02a2a55 bitrot: Add scrub status support
Updates: #431
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-02-02 03:17:31 -05:00
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
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