Disk space reservation logic sees disk system as full when disk space is mostly empty.
There is a bug in the current disk space reservation logic. When computing if the disk space reservations are aready full, they take into account the sum of the disk space reservations of all servers:
// Get the existing reservation map from drives.
auto previousDrivesReservations = m_oStoreDB.m_catalogue.getExistingDrivesReservations();
uint64_t previousDrivesReservationTotal = std::accumulate(previousDrivesReservations.begin(), previousDrivesReservations.end(),
0, [](uint64_t t, std::pair<std::string, uint64_t> a){ return t+a.second;});
...
if (diskSystemFreeSpace.at(ds).freeSpace < diskSpaceReservationRequest.at(ds) + diskSystemFreeSpace.at(ds).targetedFreeSpace +
previousDrivesReservationTotal) {
This makes no sense since there are multiple disk systems. It caused compass to detect it's disk system as full when it was actually empty (https://gitlab.cern.ch/cta/operations/-/issues/592).
They should take into account only disk space reserved in the same physical disk system.
Note that different disk systems point to the same physical space, so, for example compass has a disk system called compass_retrieve
that points to eosctapublicdisk
, as do others:
[root@ctaproductionfrontend01 ~]# cta-admin ds ls | grep eosctapublicdisk
aegis_retrieve .*/archive/aegis/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:43 vyurchen ctaproductionfrontend01 2021-12-18 00:43 free space for AEGIS
na61_retrieve .*/archive/na61/.* eos:eosctapublicdisk:retrieve 300 1000000000000 3600 jleduc localhost 2021-10-26 15:16 jleduc localhost 2021-10-26 15:16 free space for NA61
ntof_retrieve .*/archive/ntof/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-11-08 14:28 vyurchen ctaproductionfrontend01 2021-11-08 14:28 free space for nTOF
asacusa_retrieve .*/archive/exp/asacusa/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:44 vyurchen ctaproductionfrontend01 2021-12-18 00:44 free space for ASACUSA
na64_retrieve .*/archive/na64/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:44 vyurchen ctaproductionfrontend01 2021-12-18 00:44 free space for NA64
na57_retrieve .*/archive/na57/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:44 vyurchen ctaproductionfrontend01 2021-12-18 00:44 free space for NA57
ship_retrieve .*/archive/ship/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:45 vyurchen ctaproductionfrontend01 2021-12-18 00:45 free space for SHIP
wa105_retrieve .*/archive/wa105/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:45 vyurchen ctaproductionfrontend01 2021-12-18 00:45 free space for WA105
totem_retrieve .*/archive/totem/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-11-08 14:27 vyurchen ctaproductionfrontend01 2021-11-08 14:27 free space for TOTEM
wa98_retrieve .*/archive/wa98/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:45 vyurchen ctaproductionfrontend01 2021-12-18 00:45 free space for WA98
deleted_retrieve .*/archive/userltdp/deleted/.* eos:eosctapublicdisk:retrieve 10 1000000000000 3600 vyurchen ctaproductionfrontend01 2021-12-18 00:46 vyurchen ctaproductionfrontend01 2021-12-18 00:46 free space for deleted users
So it should count all of the disk systems whose URL is equal to that of compass.