Add Python FD Plugin for OpenVZ container#908
Conversation
|
Hi Beni! Best Regards, |
sduehr
left a comment
There was a problem hiding this comment.
Thanks, I can't test this plugin, but the code looks good so far. Some suggested changes would be nice.
| * OpenVZ/virtuozzo 7 is used (CentOS 7 based) | ||
| * Bareos 20 is used with Python3 supported (Python2 might still work) | ||
| * container uses ploop image on default path | ||
| * container has only _one_ ploop image in use |
There was a problem hiding this comment.
Here it should be mentioned that the lockfile module must be installed using pip or package if the distribution provides it.
| import subprocess | ||
| import bareosfd | ||
| import BareosFdPluginBaseclass | ||
| from lockfile import LockFile |
There was a problem hiding this comment.
As of README the locking is optional, but the plugin would thrown an exception here if the lockfile module is not installed. This exception could be handled, eg. the missing lockfile module could be ignored if the plugin option is not used, or otherwise notify the user by a human readable jobmessage that the lockfile modules must be installed. Have a look at https://github.com/bareos/bareos/blob/master/core/src/plugins/filed/python/ovirt/BareosFdPluginOvirt.py
for some example code.
sduehr
left a comment
There was a problem hiding this comment.
We decided to merge this PR with a little suggested change.
However, as this is only in contrib, we will not yet test or package this plugin.
sduehr
left a comment
There was a problem hiding this comment.
I didn't notice that this is not in contrib, as we currently can't properly test and fully support this plugin, could you please move it to contrib/fd-plugins/openvz7?
|
sorry for the late response. super busy with my new job. |
Where possible we try to avoid from ... import * in Python code.
6706826 to
32e6d18
Compare
sduehr
left a comment
There was a problem hiding this comment.
Thanks a lot for your contribution, looks good now.
This PR adds the Python FD Plugin for backing up and restoring full OpenVZ/Virtuozzo container and files within them via Bareos.
The Plugin is developed and maintained internally by SysEleven GmbH but a copy is pushed here for public access.
See README.md for details.
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
Source code quality
bareos-check-sources --since-mergedoes not report any problemsgit statusshould not report modifications in the source tree after building and testing