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>
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>
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>
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>
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>
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>
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>
...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>
* 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>
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>
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>