[BUG] Drives showing activity when they are in Free status
Summary
As reported by @vlado , when doing cta-admin dr ls
drives in Free
status are showing the activity of what it seems the previous request they were serving:
pcvlado ~ > cta-admin dr ls | head -5
library drive host desired request status since vid tapepool vo files data MB/s session priority activity age reason
IBM1L8 I1L80913 tpsrv432 Up - Free 1957 - - - - - - - 0 processing 2 -
IBM1L8 I1L80914 tpsrv433 Up - Free 1022 - - - - - - - 0 processing 6 -
IBM1L8 I1L80923 tpsrv322 Up - Free 18961 - - - - - - - 0 processing 5 -
What is the current bug behaviour?
Drives showing some value in the activity
field.
What is the expected correct behaviour?
The activity should be null when a drive is in Free
status
Possible causes
Taking a look into the TapeDrivesCatalogueState.cpp we have the following set of functions some of which modify the activity field, some do not, summary:
Modify the activity field:
setDriveDown -> nullopt
setDriveUpOrMaybeDown -> nullopt
setDriVeProbing -> nullopt
setDriveStarting -> inputs.activity
setDriveCleaningUp -> nullopt
setDriveShutdown -> nullopt
Do not modify activity:
setDriveMounting
setDriveTransfering
setDriveUnloading
setDriveUnmounting
setDriveDrainingToDisk