I think it is a known issue, but if we can add to the fixes of V9..
Currently, Dirac PilotAgentDB (as well as DiracX) has a PilotID primary key, an Integer. Most of the time, we use PilotJobReferences instead of PilotID, and we even translate the PilotJobReference into PilotID:
def deletePilot(self, pilotRef, conn=False):
"""Delete Pilot with the given reference from the PilotAgentsDB"""
if isinstance(pilotRef, str):
pilotID = self.__getPilotID(pilotRef)
else:
pilotID = pilotRef
return self.deletePilots([pilotID], conn=conn)
With the example above, we will delete a pilot with a pilotReference. If for whatever reason there is a duplicate (two pilots with the same reference), we would delete one of them without being sure of which one.
This is an issue later on with DiracX with secrets, because:
- if there is a duplicate by error, one of the pilots won't have a secret
- we could have a race condition where the original pilot doesn't have a secret, and the "malicious" one could obtain a secret
- currently a pilot only knows its reference, not its ID (it's own identity is based on a non-unique string, it is not an identity anymore)
Changes:
-- From
`PilotJobReference` VARCHAR(255) NOT NULL DEFAULT 'Unknown',
-- To
`PilotJobReference` VARCHAR(255) UNIQUE NOT NULL DEFAULT 'Unknown',
I think it is a known issue, but if we can add to the fixes of V9..
Currently, Dirac
PilotAgentDB(as well as DiracX) has aPilotIDprimary key, anInteger. Most of the time, we usePilotJobReferencesinstead ofPilotID, and we even translate thePilotJobReferenceintoPilotID:With the example above, we will delete a pilot with a
pilotReference. If for whatever reason there is a duplicate (two pilots with the same reference), we would delete one of them without being sure of which one.This is an issue later on with DiracX with secrets, because:
Changes: