View Issue Details

IDProjectCategoryView StatusLast Update
0001334bareos-core[All Projects] Generalpublic2021-09-22 17:22
ReporterdedysobrAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
PlatformLinuxOSDebianOS Version10
Product Version20.0.1 
Fixed in Version 
Summary0001334: bareos-dbcheck should be able to remove orphaned storages
DescriptionAfter deleting storage from the configurtation, it still shows up in the GUI as it persists in the catalog db.
Steps To Reproduce1) add storage config file to bareos-dir
2) reload
3) in the gui, check that a new storage has appeared
4) delete configuration file storage c bareos-dir
5) reload
6) The gui displays an entry about the old storage https://bareos.domain.com/storage//
Additional Informationin bconsole when the "show storage" check is done, the old storage is not there, it is displayed only in the gui
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Activities

bluecmd

bluecmd

2021-04-23 23:14

reporter   ~0004115

+1, seems to be the case for me as well. Clicking the magnifying glass also seems to not work as expected with the first message returned being "Storage resource "File": not found" in my case.
frank

frank

2021-06-29 13:03

manager   ~0004164

Deleting a storage resource from your configuration does not mean it is removed from your catalog database as well, where webui retrieves its information from via api 2 mode in most cases.
Unfortunately, bareos-dbcheck is currently not able to clean this up for you.

If you really know what you are doing you can manually remove the particular storage from your catalog database (storage table) via SQL, but make sure there are no relations left otherwise you end up with a broken catalog.
frank

frank

2021-06-29 16:50

manager   ~0004166

I've changed the category and reworded the summary slightly, basically the issue is related to bareos-dbcheck.

Related Changesets

bareos: master 3eb21935

2021-09-22 17:06:27

arogge


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request 0000912

Fix Issue 0001334: Allow removal of orphaned storages from catalog
Affected Issues
0001334
mod - CHANGELOG.md Diff File
mod - core/src/dird/CMakeLists.txt Diff File
mod - core/src/dird/dbcheck.cc Diff File
add - core/src/dird/dbcheck_utils.cc Diff File
add - core/src/dird/dbcheck_utils.h Diff File
mod - core/src/dird/ua_cmds.cc Diff File
mod - docs/manuals/source/Appendix/BareosPrograms.rst Diff File
mod - docs/manuals/source/TasksAndConcepts/BareosConsole.rst Diff File
add - systemtests/tests/multiplied-device/etc/bareos/bareos-dir.d/storage/fakestorage1.conf.in Diff File
add - systemtests/tests/multiplied-device/etc/bareos/bareos-dir.d/storage/fakestorage2.conf.in Diff File
mod - systemtests/tests/multiplied-device/etc/bareos/bareos-sd.d/device/FileStorage.conf Diff File
add - systemtests/tests/multiplied-device/etc/bareos/bareos-sd.d/device/MultiFileStorage.conf Diff File
mod - systemtests/tests/multiplied-device/testrunner Diff File

Issue History

Date Modified Username Field Change
2021-03-31 18:05 dedysobr New Issue
2021-04-23 23:14 bluecmd Note Added: 0004115
2021-04-29 10:59 frank Assigned To => frank
2021-04-29 10:59 frank Status new => assigned
2021-06-29 13:03 frank Note Added: 0004164
2021-06-29 16:44 frank Category webui => General
2021-06-29 16:44 frank Summary After deleting storage, it shows up in the GUI => bareos-dbcheck should be able to remove orphaned storages
2021-06-29 16:45 frank Description Updated View Revisions
2021-06-29 16:45 frank Additional Information Updated View Revisions
2021-06-29 16:50 frank Note Added: 0004166
2021-06-29 16:50 frank Assigned To frank =>
2021-06-30 17:24 frank Status assigned => acknowledged
2021-09-22 17:22 arogge Changeset attached => bareos master 3eb21935