Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/DIRAC/FrameworkSystem/DB/AuthDB.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# Everything is created by the DB object upon instantiation if it does not exists.
use AuthDB;

DROP TABLE IF EXISTS `PilotSecrets`;
CREATE TABLE `PilotSecrets` (
`SecretUUID` VARCHAR(32) NOT NULL,
`HashedSecret` BINARY(32) NOT NULL,
`SecretRemainingUseCount` SMALLINT DEFAULT 1,
`SecretExpirationDate` DATETIME DEFAULT NULL,
`SecretConstraints` JSON DEFAULT NULL,
`PilotSecretUseDate` DATETIME DEFAULT NULL,
PRIMARY KEY (`SecretUUID`),
UNIQUE KEY `uq_hashed_secret` (`HashedSecret`),
INDEX `HashedSecret` (`HashedSecret`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
2 changes: 2 additions & 0 deletions src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
USE PilotAgentsDB;

-- ------------------------------------------------------------------------------

DROP TABLE IF EXISTS `PilotAgents`;
CREATE TABLE `PilotAgents` (
`PilotID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
Expand All @@ -44,6 +45,7 @@ CREATE TABLE `PilotAgents` (
`AccountingSent` ENUM('True','False') NOT NULL DEFAULT 'False',
PRIMARY KEY (`PilotID`),
KEY `PilotJobReference` (`PilotJobReference`),
KEY `PilotStamp` (`PilotStamp`),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should drop DEFAULT ''

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And make it unique

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't be unique in DIRAC:

  1. DIRAC creates a pilot with a reference
  2. CEs generate stamps and returns to DIRAC
  3. DIRAC associates these stamps with pilots

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be refactored in DiracX as stamps are the primary indentifier

KEY `Status` (`Status`),
KEY `Statuskey` (`GridSite`,`DestinationSite`,`Status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Expand Down
Loading