Skip to content
Snippets Groups Projects
Commit 688ee2c0 authored by Jorge Camarero Vera's avatar Jorge Camarero Vera
Browse files

Resolve "Fix Warning in updateDriveStatus"

parent 9d002401
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,17 @@
### Bug fixes
- cta/CTA#1029 Fix segmentatin fault in frontend when list repacks of a tape that has been deleted in the catalogue
- cta/CTA#1031 Fix Warning in updateDriveStatus
# v4.2-3
# v4.2-2
## Summary
### Features
- cta/CTA#976 Add logical part of Drive Status using Catalogue
- cta/CTA#988 Add diskSpaceReservations map in cta-admin --json dr ls output.
# v4.2-1
......
......@@ -21,6 +21,7 @@
#include "common/dataStructures/DriveInfo.hpp"
#include "common/dataStructures/TapeDrive.hpp"
#include "common/log/Logger.hpp"
#include "scheduler/DiskSpaceReservation.hpp"
#include "TapeDrivesCatalogueState.hpp"
#include "tapeserver/daemon/TpconfigLine.hpp"
......@@ -206,14 +207,16 @@ void TapeDrivesCatalogueState::updateDriveStatus(const common::dataStructures::D
case common::dataStructures::DriveStatus::Unknown:
case common::dataStructures::DriveStatus::Up:
{
log::ScopedParamContainer params(lc);
params.add("diskSystem", driveState.diskSystemName)
.add("bytes", driveState.reservedBytes)
.add("previousStatus", toString(previousStatus))
.add("newStatus", toString(driveState.driveStatus));
lc.log(log::WARNING, "In TapeDrivesCatalogueState::updateDriveStatus(): will clear non-empty disk space reservation on status change.");
driveState.diskSystemName = "NULL";
driveState.reservedBytes = 0;
if (driveState.diskSystemName != "NULL") {
log::ScopedParamContainer params(lc);
params.add("diskSystem", driveState.diskSystemName)
.add("bytes", driveState.reservedBytes)
.add("previousStatus", toString(previousStatus))
.add("newStatus", toString(driveState.driveStatus));
lc.log(log::WARNING, "In TapeDrivesCatalogueState::updateDriveStatus(): will clear non-empty disk space reservation on status change.");
driveState.diskSystemName = "NULL";
driveState.reservedBytes = 0;
}
}
default:
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment