Skip to content

Refactor libcloud plugin to work with current Python versions#2428

Merged
BareosBot merged 7 commits intobareos:masterfrom
sduehr:dev/sduehr/master/refactor-libcloud-plugin
Nov 24, 2025
Merged

Refactor libcloud plugin to work with current Python versions#2428
BareosBot merged 7 commits intobareos:masterfrom
sduehr:dev/sduehr/master/refactor-libcloud-plugin

Conversation

@sduehr
Copy link
Member

@sduehr sduehr commented Nov 11, 2025

Adaption and refactoring of the libcloud plugin to work with current Python versions.
Unfortunately libcloud is not fully thread safe, this can cause unresponsive worker
threads on bad network connections. The plugin code tries to handle that in a reasonable
way.

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
  • Correct milestone is set
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

@sduehr sduehr added this to the 25.0.0 milestone Nov 11, 2025
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! That's full of improvements.
I've let a few suggestions, but also questions and comments.

To test the whole code, I would like to see at least three buckets with one excluded, so we know we are able to parse a list of buckets, can exclude some
For the data, that would be nice also to check excluded data
(not present in restore)

testrunner: might be interesting to split them up by tasks

During testing second backup was failing here: so I suggest to test at least one incremental and accurate mode.

@sduehr
Copy link
Member Author

sduehr commented Nov 20, 2025

Addressed all requested changes, but I don't think the effort is reasonable to add buckets_include and buckets_exclude to the systemtest, as this is quite simple code which is not prone to errors.

@pstorz pstorz force-pushed the dev/sduehr/master/refactor-libcloud-plugin branch from 40762b0 to cbb9bd1 Compare November 24, 2025 08:54
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've a small changes we can add to emphasis the need of grpc for this plugin. But nothing that should block the merge.
Excellent work.

sduehr and others added 7 commits November 24, 2025 11:02
Major change is to use threading instead of multiprocessing as that does
not work with Bareos plugins and current Pyhton versions.
Unfortunately libcloud is not fully thread safe, when libcloud calls
run into timeouts throwing exceptions, which can happen on bad network
connections, next calls get stuck within the worker threads. So the
default for the fail_on_download_error is now yes and the plugin code
tries to detect unresponsive worker threads and terminates the job.
Adapt packaging as BareosFdPluginLibcloud.py was removed.
Add plugin option libcloud_timout, this is passed to the libcloud driver
initialization to make this configurable.
Adapt Apache Libcloud Plugin documentation to the latest changes.
@BareosBot BareosBot force-pushed the dev/sduehr/master/refactor-libcloud-plugin branch from ea5d329 to 58750b0 Compare November 24, 2025 11:03
@BareosBot BareosBot merged commit 1a8d450 into bareos:master Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires no backport This will not be backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants