Skip to content

dplcompat: fix unsupported size-suffixes on chunksize#2240

Merged
BareosBot merged 9 commits intobareos:masterfrom
arogge:dplcompat-more-debuglog
Jun 10, 2025
Merged

dplcompat: fix unsupported size-suffixes on chunksize#2240
BareosBot merged 9 commits intobareos:masterfrom
arogge:dplcompat-more-debuglog

Conversation

@arogge
Copy link
Member

@arogge arogge commented Apr 3, 2025

Add support for size-suffixes to chunksize parameter to be more compatible with the droplet backend.
This will now also detect trailing junk after numbers and changes debugging at crud_storage's trace level (130) will now log the output of the program the stat operation is run. This also slightly improves some other trace information.

Thank you for contributing to the Bareos Project!

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

@arogge arogge self-assigned this Apr 3, 2025
@arogge arogge requested a review from sebsura April 8, 2025 11:16
@arogge arogge marked this pull request as ready for review April 8, 2025 11:16
@arogge arogge force-pushed the dplcompat-more-debuglog branch 2 times, most recently from fcd2a02 to a861cf7 Compare April 14, 2025 16:42
@arogge arogge force-pushed the dplcompat-more-debuglog branch from 039f02f to 5e36362 Compare April 28, 2025 10:31
@arogge arogge force-pushed the dplcompat-more-debuglog branch from 672cd9e to 9460954 Compare May 19, 2025 08:43
@arogge arogge added the bug This addresses a bug label May 26, 2025
@arogge arogge changed the title dplcompat: improve debug logging of stat calls dplcompat: fix unsupported size-suffixes on chunksize May 26, 2025
@sebsura sebsura force-pushed the dplcompat-more-debuglog branch 3 times, most recently from 45103ca to 1a96a67 Compare June 4, 2025 12:56
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

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

Great work!

fmt::format("value '{}' for option '{}' would be truncated: {}\n",
fmt::format(FMT_STRING("invalid argument '{}' for option '{}': {}\n"),
value, key, e.what()));
} catch (std::out_of_range& e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesnt really matter, but feel free to 'fix' it anyways:

Suggested change
} catch (std::out_of_range& e) {
} catch (const std::out_of_range& e) {

(same for the other exceptions).

@sebsura sebsura added this to the 25.0.0 milestone Jun 4, 2025
arogge added 8 commits June 6, 2025 11:17
This changes debugging at crud_storage's trace level (130) will now log
the output of the program the stat operation is run.
This also slightly improves some other trace information.
with this patch trailing characters after a number will be detected
when parsion the device options string
the droplet backend supports bytesize suffixes (i.e. k,kb,m,mb,etc.)
on most options. These suffixes were previously ignored by dplcompat
and are currently reported as trailing junk. This adds support for
honoring these suffixes to the chunksize option.
* enforce fmt compile-time checks
  * requires non-header-only fmt usage
* add Dfmt() to format messages with fmt
For proper builds, CPM packages need the same CMAKE_BUILD_TYPE as the
main build. As coverage forces CMAKE_BUILD_TYPE=Debug, we need to do
this before including BareosCpmPackages.
only format the message if debug_level is high enough that d_msg()
would emit a message.
@BareosBot BareosBot merged commit eec5ac8 into bareos:master Jun 10, 2025
1 check was pending
@sebsura sebsura linked an issue Aug 4, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This addresses a bug requires backport to 24

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with restoring VM from s3 backend using dplcompat.

3 participants