Commit 3a610401 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Several small fixes

parent 84dc641e
......@@ -1335,7 +1335,7 @@ ALTER TABLE Disk2DiskCopyJob ADD CONSTRAINT FK_Disk2DiskCopyJob_CastorFile
FOREIGN KEY (castorFile) REFERENCES CastorFile(id);
ALTER TABLE Disk2DiskCopyJob ADD CONSTRAINT FK_Disk2DiskCopyJob_SvcClass
FOREIGN KEY (destSvcClass) REFERENCES SvcClass(id);
ALTER TABLE Disk2DiskCopyJob ADD CONSTRAINT FK_Disk2DiskCopyJob_DrainingJob
ALTER TABLE Disk2DiskCopyJob ADD CONSTRAINT FK_Disk2DiskCopyJob_DrainJob
FOREIGN KEY (drainingJob) REFERENCES DrainingJob(id);
ALTER TABLE Disk2DiskCopyJob
ADD CONSTRAINT CK_Disk2DiskCopyJob_Status
......
......@@ -454,11 +454,14 @@ BEGIN
logToDLF(NULL, dlf.LVL_SYSTEM, dlf.D2D_D2DDONE_RETRIED, varFileId, varNsHost, 'stagerd', varComment ||
' RetryNb=' || TO_CHAR(varRetryCounter+1) || ' maxNbRetries=' || TO_CHAR(varMaxNbD2dRetries));
ELSE
-- no more retries, let's delete the disk to disk job copy and remember the error
-- no more retries, let's delete the disk to disk job copy
BEGIN
DELETE FROM Disk2DiskCopyjob WHERE transferId = inTransferId;
INSERT INTO DrainingErrors (drainingJob, errorMsg, fileId, nsHost)
VALUES (varDrainingJob, inErrorMessage, varFileId, varNsHost);
-- and remember the error in case of draining
IF varDrainingJob IS NOT NULL THEN
INSERT INTO DrainingErrors (drainingJob, errorMsg, fileId, nsHost)
VALUES (varDrainingJob, inErrorMessage, varFileId, varNsHost);
END IF;
EXCEPTION WHEN NO_DATA_FOUND THEN
-- the Disk2DiskCopyjob was already dropped (e.g. because of an interrupted draining)
-- in such a case, forget about the error
......@@ -965,6 +968,7 @@ CREATE OR REPLACE FUNCTION selectAllSourceFs(inCfId IN INTEGER)
RETURN VARCHAR2 AS
varResult VARCHAR2(2048) := '';
BEGIN
-- in this case we take any non DISABLED hardware
FOR line IN
(SELECT candidate FROM
(SELECT UNIQUE FIRST_VALUE (DiskServer.name || ':' || FileSystem.mountPoint)
......
......@@ -3426,3 +3426,4 @@ BEGIN
RETURN handleRawPutOrPPut(inCfId, inSrId, inFileId, inNsHost, varFileClassId,
varSvcClassId, varEuid, varEgid, varReqUUID, varSrUUID, False);
END;
/
......@@ -45,9 +45,9 @@ is the name of the disk server to be queried. It needs to be fully qualified.
.fi
Status Physical FileName
.fi
DISKCOPY_CANBEMIGR lxfsrk60a05.cern.ch:/srv/castor/01/05/61263405@lxs5010.450
DISKCOPY_VALID lxfsrk60a05.cern.ch:/srv/castor/01/05/61263405@lxs5010.450
.fi
DISKCOPY_CANBEMIGR lxfsrk60a05.cern.ch:/srv/castor/01/21/61270821@lxs5010.529
DISKCOPY_VALID lxfsrk60a05.cern.ch:/srv/castor/01/21/61270821@lxs5010.529
.fi
DISKCOPY_STAGEOUT lxfsrk60a05.cern.ch:/srv/castor/01/46/61312846@lxs5010.718
.ft
......@@ -56,9 +56,9 @@ DISKCOPY_STAGEOUT lxfsrk60a05.cern.ch:/srv/castor/01/46/61312846@lxs5010.718
.fi
FileId DiskCopyId Status Physical FileName Last known FileName
.fi
61263405 450 DISKCOPY_CANBEMIGR lxfsrk60a05.cern.ch:/srv/castor/01/05/61263405@lxs5010.450 /castor/cern.ch/some/hsm/path
61263405 450 DISKCOPY_VALID lxfsrk60a05.cern.ch:/srv/castor/01/05/61263405@lxs5010.450 /castor/cern.ch/some/hsm/path
.fi
61270821 529 DISKCOPY_CANBEMIGR lxfsrk60a05.cern.ch:/srv/castor/01/21/61270821@lxs5010.529 /castor/cern.ch/some/hsm/path
61270821 529 DISKCOPY_VALID lxfsrk60a05.cern.ch:/srv/castor/01/21/61270821@lxs5010.529 /castor/cern.ch/some/hsm/path
.fi
61312846 718 DISKCOPY_STAGEOUT lxfsrk60a05.cern.ch:/srv/castor/01/46/61312846@lxs5010.718 /castor/cern.ch/some/hsm/path
.ft
......
......@@ -114,6 +114,8 @@ ALTER TABLE FileSystem
ADD CONSTRAINT CK_FileSystem_Status
CHECK (status IN (0, 1, 2, 3));
XXX Drop all existing WAITDISK2DISKCOPY DiskCopies
ALTER TABLE DiskCopy
ADD CONSTRAINT CK_DiskCopy_Status
CHECK (status IN (0, 4, 5, 6, 7, 9, 10, 11));
......@@ -310,6 +312,7 @@ DROP PROCEDURE removeFailedDrainingTransfers;
DROP PROCEDURE drainFileSystem;
DROP PROCEDURE startDraining;
DROP PROCEDURE stopDraining;
DROP PROCEDURE cancelRecall;
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_14_X';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment