Skip to content

status storage: fix wrong data displayed about waiting jobs#1476

Merged
BareosBot merged 7 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5337-status-storage-wrong-display
Aug 1, 2023
Merged

status storage: fix wrong data displayed about waiting jobs#1476
BareosBot merged 7 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5337-status-storage-wrong-display

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented May 26, 2023

Description

When using the status storage=xxx command, bareos reports that certain running jobs are writing to the wrong volume or using the wrong device. This is only a reporting issue as those jobs aren't running or writing, but are actually waiting, and so the data displayed does not yet correctly reflect where the job will write, until the waiting condition is over.

This PR:

  • Updates the status storage output text to reflect the actual status of the jobs and show an empty volume for those who did not find a volume yet. Device name can still be wrong though. Even though that information is still not accurate, by seeing the status (waiting) of the job on top of the empty volume, one can infer that the device might be wrong.
  • removes the status resources option as it is just a placeholder and not implemented.
  • reverts a previous commit 6c265ec from PR Prepare Bareos for an upgrade to the C++20 standard #1271 that could potentially create an issue with ansi-labels

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
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

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch 2 times, most recently from dc16097 to a1615b8 Compare June 6, 2023 10:23
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review June 6, 2023 10:25
@sebsura sebsura self-requested a review June 12, 2023 04:39
@alaaeddineelamri alaaeddineelamri marked this pull request as draft June 15, 2023 08:17
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch 2 times, most recently from e1f4e06 to 588e813 Compare June 15, 2023 08:45
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review June 15, 2023 14:26
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.

The device will still be displayed "incorrectly" if none are found right ?

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch from 588e813 to 2025fa0 Compare July 6, 2023 14:30
@alaaeddineelamri
Copy link
Contributor Author

The device will still be displayed "incorrectly" if none are found right ?

yes, unfortunately. Resetting the volume name was quite straight forward, but the device name would require some changes that could lead to unknown consequences.

@alaaeddineelamri alaaeddineelamri requested a review from sebsura July 6, 2023 14:32
@sebsura
Copy link
Contributor

sebsura commented Jul 7, 2023

07-Jul 07:46 bareos-sd JobId 1: Please mount append Volume "Full-0005" or label a new one for:
    Job:          backup-bareos-fd.2023-07-07_07.46.15_04
    Storage:      "FileStorage" (storage)
    Pool:         Full
    Media type:   File
*status storage
Automatically selected Storage: File
Connecting to Storage daemon File at localhost:30473
 Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3

bareos-sd Version: 23.0.0~pre732.eb6e817f9 (07 July 2023) Fedora 37 
Daemon started 07-Jul-23 07:46. Jobs: run=0, running=0, self-compiled binary
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 bwlimit=0kB/s

There are WARNINGS for this storagedaemon's configuration!
See output of 'bareos-sd -t' for details.

Job inventory:

JobId=1 Level=Full Type=Backup Name=backup-bareos-fd Status=Waiting for mount
Writing: Volume="Full-0005"
    pool="Full" device="FileStorage" (storage)
    spooling=0 despooling=0 despool_wait=0
    Files=0 Bytes=0 AveBytes/sec=0 LastBytes/sec=0
    FDReadSeqNo=6 in_msg=6 out_msg=4 fd=7

====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name 
===================================================================
     1  Full          0         0   Cancel   07-Jul-23 07:46 backup-bareos-fd
====

Device status:

Device "FileStorage" (storage) is not open.
    Device is BLOCKED waiting for mount of volume "Full-0005",
       Pool:        Full
       Media type:  File
==
====

Used Volume status:
====

====

I used a File Device without Auto Label enabled and got this output. Is this the expected output after your changes ?

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch from 2025fa0 to a6cb0ef Compare July 7, 2023 09:42
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch from a6cb0ef to d29d81f Compare July 24, 2023 09:22
@BareosBot BareosBot force-pushed the dev/alaaeddineelamri/master/s5337-status-storage-wrong-display branch from 8b26cca to 16d0d45 Compare August 1, 2023 09:14
@BareosBot BareosBot merged commit 35c99ec into bareos:master Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants