Conversation
arogge
commented
Mar 24, 2020
- add logging options to glusterfs backend
- add a systemtest to test the glusterfs backend
This patch adds a copy of backup-bareos-test that will write to and read from a glusterfs filesystem.
This patch adds two new device options logfile and loglevel to the gfapi backend. These can be used to set a logfile and loglevel for gfapi. By configuring this you can make the glusterfs api write a logfile.
pstorz
left a comment
There was a problem hiding this comment.
Other than the one question this PR looks good.
Well done!
| done = true; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Was this block intentionally removed?
There was a problem hiding this comment.
If you look closely, you'll find it in the switch()'s default-case
franku
left a comment
There was a problem hiding this comment.
gfapi_logfile_ should be set to zero, one not handled error could bei silently overseen.
Otherwise very good.
| gfapi_logfile_ = bp + device_options[i].compare_size; | ||
| break; | ||
| case argument_loglevel: | ||
| gfapi_loglevel_ = |
There was a problem hiding this comment.
In case of error gfapi_loglevel_ will be zero.
There was a problem hiding this comment.
this is expected and not a problem.
| private: | ||
| char* gfapi_configstring_; | ||
| char* gfapi_uri_; | ||
| char* gfapi_logfile_; |
There was a problem hiding this comment.
| char* gfapi_logfile_; | |
| char* gfapi_logfile_{}; |
There was a problem hiding this comment.
Should double check if the constructor is really called. Ohterwise this has no effect.