View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001166 | bareos-core | director | public | 2020-01-06 16:37 | 2023-12-13 13:59 |
Reporter | tastydr | Assigned To | pstorz | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | reopened | ||
Platform | Linux | OS | Debian | OS Version | 9 |
Product Version | 18.2.5 | ||||
Summary | 0001166: try entire counter range before giving up on labeling Volume | ||||
Description | Bareos is failing to label a new Volume with log entries like this: 06-Jan 09:30 bareos-dir JobId 33140: Warning: Wanted to create Volume "Merged-2541", but it already exists. Trying again. [...] 06-Jan 09:25 bareos-dir JobId 33140: Warning: Wanted to create Volume "Merged-2639", but it already exists. Trying again. 06-Jan 09:25 bareos-dir JobId 33140: Error: Too many failures. Giving up creating Volume name. But it did not try the entire range of possibly counter range of 0001-9999 (Dir -> Maxumum Volumes is set to 9999). This is a File storage type which has fragmented ranges of volume name. There are names available outside that tried by Bareos. | ||||
Tags | No tags attached. | ||||
Please read the following first before you create a bug report. Thank you! https://www.bareos.org/en/HOWTO/articles/how-to-create-a-bugreport.html |
|
Here is where the problem is: core/src/dird/newvol.cc from master branch in static bool CreateSimpleName(JobControlRecord* jcr, MediaDbRecord* mr, PoolDbRecord* pr) line 149 for (int i = (int)ctx.value + 1; i < (int)ctx.value + 100; i++) A database lookup is performed to get the maximum MediaId of an existing volume, then the for loop tries approximately 100 MediaIds after that. In the case where MediaId are used in non-continuous chucks there may be available MediaIds which are numerically less than the maximum MediaId. For this reason the for loop should start at the first possible MediaId and end at the last possible MediaId. |
|
Please create a Pull Request with your fixes including a documentation how to reproduce the problem. Thank you |
|
No PR proposed | |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-01-06 16:37 | tastydr | New Issue | |
2020-01-07 14:44 | pstorz | Assigned To | => pstorz |
2020-01-07 14:44 | pstorz | Status | new => closed |
2020-01-07 14:44 | pstorz | Resolution | open => not fixable |
2020-01-07 14:44 | pstorz | Note Added: 0003716 | |
2020-01-07 15:53 | tastydr | Status | closed => new |
2020-01-07 15:53 | tastydr | Resolution | not fixable => reopened |
2020-01-07 15:53 | tastydr | Note Added: 0003717 | |
2020-01-07 16:05 | pstorz | Note Added: 0003718 | |
2023-12-13 13:59 | bruno-at-bareos | Status | new => closed |
2023-12-13 13:59 | bruno-at-bareos | Note Added: 0005631 |