Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

droplet compatible storage backend #1790

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

arogge
Copy link
Member

@arogge arogge commented Apr 24, 2024

Add a new storage backend "dplcompat" that can work as a drop-in replacement for the "droplet" backend.
This will replace the current S3 backend that uses the outdated Droplet library.

TODO:

  • improve error reporting
  • get debug-levels right
  • RPM packaging
  • FreeBSD packaging
  • provide sample configuration
  • write end-user documentation
  • add unit-tests for crud_storage
  • add system-test for dplcompat
  • add tool to test scripts
  • implement env_vars for OpenBpipe() on windows
  • make it build on all platforms

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@arogge arogge added this to the 24.0.0 milestone Apr 24, 2024
@arogge arogge force-pushed the scripted-storage-backend branch 2 times, most recently from a2d86d8 to 4656423 Compare April 25, 2024 12:50
@sebsura sebsura added the draft label Apr 26, 2024
arogge and others added 24 commits May 2, 2024 10:08
Add a new test that restores the backup written by the droplet backend
using another storage device.
This checks that you can read droplet backups with another device.
previously OpenBpipe() would only take a non-const char* as the program
parameter.
add Microsoft GSL (Guidelines Support Library) as a third-party library
using CMake Package Manager.
Add a new backend "dplcompat" that is compatible to the droplet backend.
This early prototype supports only restore operation.
This adds a new virtual function setup() to device that will be called
when the device is created. Here the backend developer can run any
device-specific initialization, like parsing options, checking device
availability, etc.
Returning false from that function will fail the device initialization.
These are mostly used for parsing device options
when a droplet device was released without ever being used, it could potentially crash.
While the droplet code we want to replace had integrated retries, the chunked_device is already able to do retries on its own.
This version is now able to support all Bareos backend operations.
arogge added 9 commits May 2, 2024 10:09
with this change the program that will be used to access the storage can
declare what options it supports (via the "options" subcommand).
If one of those options is in Device Options, it will be added to the
program's environment.
If there are options in Device Options that neither dplcompat nor the
program accept, this is treated as a configuration error.
s3cmd will report "DIROBJ" as size for the directory object. As this is
not meaningful, we skip every record with a size that is not a number.
@arogge arogge force-pushed the scripted-storage-backend branch from bf7d1c3 to 9529753 Compare May 2, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants