Do not set the 'queueTrimRequired' flag as true when 'doCleanup' is required
As demonstrated in https://gitlab.cern.ch/cta/operations/-/issues/1290, the queueTrimRequired
is being set as true
inside the fetchMountInfo(...)
function for empty queues, even when the doCleanup
flag is true
. This is, down the line, causing the tape server to try to delete repeatedly these queues after they had finally been removed.
This is not the desired behaviour. A queue with doCleanup
set is not expected to be deleted until a maintenance process has looked at it and moved the state out of PENDING
.
We just need to avoid setting queueTrimRequired
when doCleanup
is true
.
The queue should eventually be cleaned by the maintenance process, when it tries to pop jobs out of the empty queue:
Edited by Joao Afonso