Setup new tape state REPACKING
We need a new tape state
REPACKING to handle the queueing logic for tapes which are being repacked.
Currently we are using the
DISABLED state for this. The DISABLED logic is as follows:
- It is not possible to queue on DISABLED tapes.
- The tape state can change to DISABLED after it has requests queued on it.
- Requests which end up queued on DISABLED tapes are re-queued by the maintenance process. However, as the maintenance process only attempts to requeue on the same tape, this effectively cancels/fails the request.
- There is a bug (see CTA#1176) that EOS is not notified when the request is cancelled.
The following tasks need to be done:
Fix the bug mentioned above (CTA#1176)
CONSTRAINT TAPE_STATE_CK CHECK(TAPE_STATE IN ('ACTIVE', 'DISABLED', 'BROKEN'))in the DB schema
Add the new
REPACKINGtape state to
Implement the logic of
REPACKINGas identical to the current logic for
Add commands to change the tape state to
Perform any necessary changes in the unit-test and system-tests, to cover for the new use-cases.
Once this is done, it will be possible to change the logic of
DISABLED (CTA#1170), and the logic of
REPACKING can be further refined (new tickets will be created for this as needed).