Skip to content

stored: fix volume size mismatch#1992

Merged
BareosBot merged 3 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-vol-size-mismatch-24
Nov 6, 2024
Merged

stored: fix volume size mismatch#1992
BareosBot merged 3 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-vol-size-mismatch-24

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Oct 25, 2024

We currently overwrite the current volume info on the device with the outdated volume info from the director (which has size = 0) before "updating" the volume info on the director. This causes the volume size mismatch now that we do not have the pre_label split anymore (previously we would execute RewriteVolumeLabel before writing to the device which would have fixed this issue).

As a quick fix we can just disable this overwriting and just send the real info to the director immediately.

This PR also fixes an issue with the python plugin, where we did not correctly compare versions, which lead to weird behaviour.

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

@sebsura sebsura requested a review from arogge October 25, 2024 05:09
@sebsura sebsura self-assigned this Oct 25, 2024
@sebsura sebsura added requires backport to 23 bug This addresses a bug labels Oct 25, 2024
@sebsura sebsura modified the milestones: 25.0.0, 24.0.0 Oct 25, 2024
@arogge arogge linked an issue Oct 28, 2024 that may be closed by this pull request
sebsura and others added 3 commits November 6, 2024 11:22
We currently overwrite the current volume info on the device with the
outdated volume info from the director (which has size = 0) before
"updating" the volume info on the director.  This causes the volume
size mismatch now that we do not have the pre_label split
anymore (previously we would execute RewriteVolumeLabel before writing
to the device which would have fixed this issue).

As a quick fix we can just disable this overwriting and just send the
real info to the director immediately.
Our python version hex was not correct for numbers >= 10.  We
previously emitted e.g. 0x03100000 for 3.10, when its supposed to be
0x030A0000.

This was causing weird crashes because workarounds for old versions
that were not supposed to be enabled for newer versions were in fact
enabled.
@BareosBot BareosBot force-pushed the dev/ssura/master/fix-vol-size-mismatch-24 branch from 1f99e48 to 9862c25 Compare November 6, 2024 11:23
@BareosBot BareosBot merged commit 5c27c96 into bareos:master Nov 6, 2024
@arogge arogge mentioned this pull request Nov 6, 2024
7 tasks
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 23

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volume size mismatch on newly labeled volumes

3 participants