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

btape: dumplabel only when label is valid #1266

Conversation

bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Sep 22, 2022

This PR will fix the following IOT trap when btape readlable is used with blank tape, by allowing dumplabel only for valid label case.

*readlabel
btape: stored/btape.cc:530-0 Volume has no label.

Volume Label:
Id                : **error**VerNo             : 0
VolName           :
PrevVolName       :
VolFile           : 0
LabelType         : Unknown 0
LabelSize         : 0
PoolName          :
MediaType         :
PoolType          :
HostName          :
14-sep 15:08 btape: ERROR in stored/label.cc:860 Failed ASSERT: dev->VolHdr.VerNum >= 11
btape: stored/label.cc:860-0 Failed ASSERT: dev->VolHdr.VerNum >= 11
BAREOS interrupted by signal 6: IOT trap
btape, btape got signal 6 - IOT trap. Attempting traceback.
exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/btape 13788 /tmp
bsmtp: tools/bsmtp.cc:467-0 Failed to connect to mailhost localhost
The btraceback call returned 1
Dumping: /tmp/btape.13788.bactrace

 cat /tmp/btape.13788.bactrace
Attempt to dump current JCRs. njcrs=1
threadid=0xc000007f246b0277 JobId=0 JobStatus=T jcr=0x16e08a0 name=btape
threadid=0xc000007f246b0277 killable=0 JobId=0 JobStatus=T jcr=0x16e08a0 name=btape
        UseCount=1
        JobType=U JobLevel=F
        sched_time=14-sep-2022 15:07 start_time=01-jan-1970 01:00
        end_time=01-jan-1970 01:00 wait_time=01-jan-1970 01:00
        db=(nil) db_batch=(nil) batch_started=0

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)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
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
  • bareos-check-sources --since-merge does not report any problems

@pstorz pstorz changed the title stored: btape try to dumplabel only on valid label btape: dumplabel only when label is valid Sep 26, 2022
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Looks good to me

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-bug5247-btape-readlabel-empty-iot6 branch from 1222d73 to 0a64703 Compare September 27, 2022 07:43
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Good work!

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@pstorz pstorz force-pushed the dev/bruno/master/fix-bug5247-btape-readlabel-empty-iot6 branch from 0a64703 to 6657109 Compare September 28, 2022 08:18
@pstorz pstorz merged commit 9b292d4 into bareos:master Sep 28, 2022
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-bug5247-btape-readlabel-empty-iot6 branch September 29, 2022 09:55
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.

None yet

2 participants