Commit d82fc784 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti Committed by Sebastien Ponce
Browse files

Preparation for release 2.1.14-5

parent 88477545
------------
- 2.1.14-5 -
------------
Summary
-------
This release supersedes 2.1.14-4 to fix the GC daemon startup issue plus the following bug:
#103299: Missing tapeStatus value after recalls skews GC
Upgrade Instructions from 2.1.14-4
----------------------------------
Stager
------
The upgrade of the stager database to 2.1.14-5 can be performed online while the system is running.
The RPM upgrade can also be performed on a running system, with 2 restrictions:
- the restart of the RH servers may be noticable by few clients (< 1s downtime);
- the restart of the transfermanagers and diskmanagers should not be done concurrently.
Instructions
------------
1. Upgrade the STAGER database using the stager_2.1.14-4_to_2.1.14-5.sql
upgrade script available from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-5/dbupgrades
2. Upgrade the software on the headnodes.
Note: All daemons involved in the upgrade will be restarted automatically.
3. Upgrade the software on the diskservers.
Note: All daemons involved in the upgrade will be restarted automatically.
4. Test the instance by running the test suite available from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-5/testsuite
5. Congratulations you have successfully upgraded to the 2.1.14-5 release
of CASTOR.
Central services (CUPV, VMGR, VDQM, Nameserver)
-----------------------------------------------
The upgrade of the central databases to 2.1.14-5 can be performed online while
the system is running.
Instructions
------------
1. Apply the appropriate database upgrade script from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-5/dbupgrades
2. Update the software to use the 2.1.14-5 RPMs. Note: All
daemons involved in the upgrade will be restarted automatically.
3. Upgrade complete.
------------
- 2.1.14-4 -
------------
......@@ -5,6 +64,7 @@
Summary
-------
NOTE: the GC daemon is broken in this release. Please install the next one (2.1.14-5) instead.
This is a minor release bringing a number of bug fixes on top of the previous
one.
......
......@@ -328,7 +328,7 @@ ALTER TABLE UpgradeLog
CHECK (type IN ('TRANSPARENT', 'NON TRANSPARENT'));
 
/* SQL statement to populate the intial release value */
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_4');
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_5');
 
/* SQL statement to create the CastorVersion view */
CREATE OR REPLACE VIEW CastorVersion
......@@ -9603,6 +9603,7 @@ CREATE OR REPLACE FUNCTION checkRecallInNS(inCfId IN INTEGER,
varNSSize INTEGER;
varNSCsumtype VARCHAR2(2048);
varNSCsumvalue VARCHAR2(2048);
varOpenMode CHAR(1);
BEGIN
-- retrieve data from the namespace: note that if stagerTime is (still) NULL,
-- we're still in compatibility mode and we resolve to using mtime.
......@@ -9611,6 +9612,12 @@ BEGIN
INTO varNSOpenTime, varNSCsumtype, varNSCsumvalue, varNSSize
FROM Cns_File_Metadata@RemoteNS
WHERE fileid = inFileId;
-- check open mode: in compatibility mode we still have only seconds precision,
-- hence the NS open time has to be truncated prior to comparing it with our time.
varOpenMode := getConfigOption@RemoteNS('stager', 'openmode', NULL);
IF varOpenMode = 'C' THEN
varNSOpenTime := TRUNC(varNSOpenTime);
END IF;
-- was the file overwritten in the meantime ?
IF varNSOpenTime > inLastOpenTime THEN
-- yes ! reset it and thus restart the recall from scratch
......@@ -9792,10 +9799,14 @@ BEGIN
WHERE status = tconst.MIGRATIONJOB_WAITINGONRECALL
AND castorFile = varCfId;
varNbMigrationsStarted := SQL%ROWCOUNT;
-- in case there are migrations, update CastorFile's tapeStatus to NOTONTAPE
IF varNbMigrationsStarted > 0 THEN
UPDATE CastorFile SET tapeStatus = dconst.CASTORFILE_NOTONTAPE WHERE id = varCfId;
END IF;
-- in case there are migrations, update CastorFile's tapeStatus to NOTONTAPE, otherwise it is ONTAPE
UPDATE CastorFile
SET tapeStatus = CASE varNbMigrationsStarted
WHEN 0
THEN dconst.CASTORFILE_ONTAPE
ELSE dconst.CASTORFILE_NOTONTAPE
END
WHERE id = varCfId;
 
-- Finally deal with user requests
UPDATE SubRequest
......@@ -11892,7 +11903,7 @@ BEGIN
FROM DrainingJob WHERE status = dconst.DRAININGJOB_RUNNING) LOOP
DECLARE
CONSTRAINT_VIOLATED EXCEPTION;
PRAGMA EXCEPTION_INIT(CONSTRAINT_VIOLATED, -1);
PRAGMA EXCEPTION_INIT(CONSTRAINT_VIOLATED, -1);
BEGIN
-- lock the draining Job first
SELECT id INTO varUnused FROM DrainingJob WHERE id = dj.id FOR UPDATE;
......@@ -11918,7 +11929,7 @@ BEGIN
ORDER BY DiskCopy.importance DESC)
WHERE ROWNUM <= varMaxNbOfSchedD2dPerDrain-varNbRunningJobs) LOOP
createDisk2DiskCopyJob(F.cfId, F.nsOpenTime, dj.svcClass, dj.euid, dj.egid,
dconst.REPLICATIONTYPE_DRAINING, F.dcId, dj.id);
dconst.REPLICATIONTYPE_DRAINING, F.dcId, dj.id, FALSE);
varNbFiles := varNbFiles + 1;
varNbBytes := varNbBytes + F.fileSize;
END LOOP;
......@@ -12008,7 +12019,7 @@ BEGIN
-- create disk2DiskCopyJob for this diskCopy
createDisk2DiskCopyJob(varCfId, varNsOpenTime, inDestSvcClassId,
0, 0, dconst.REPLICATIONTYPE_REBALANCE,
varDcId, NULL);
varDcId, NULL, FALSE);
END LOOP;
CLOSE DCcur;
-- "rebalancing : stopping" message
......
......@@ -56,7 +56,7 @@ ALTER TABLE UpgradeLog
CHECK (type IN ('TRANSPARENT', 'NON TRANSPARENT'));
/* SQL statement to populate the intial release value */
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_4');
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_5');
/* SQL statement to create the CastorVersion view */
CREATE OR REPLACE VIEW CastorVersion
......
castor (2.1.14-5) unstable; urgency=low
* Fourth 2.1.14 production release
-- Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> Tue, 26 Nov 2013 16:00:00 +0100
castor (2.1.14-4) unstable; urgency=low
* Third 2.1.14 production release
-- Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> Tue, 29 Oct 2013 12:00:00 +0100
-- Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> Fri, 22 Nov 2013 12:00:00 +0100
castor (2.1.14-3) unstable; urgency=low
......
......@@ -172,7 +172,7 @@ ALTER TABLE UpgradeLog
CHECK (type IN ('TRANSPARENT', 'NON TRANSPARENT'));
/* SQL statement to populate the intial release value */
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_4');
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_5');
/* SQL statement to create the CastorVersion view */
CREATE OR REPLACE VIEW CastorVersion
......
/******************************************************************************
* cns_2.1.14-4_to_2.1.14-5.sql
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This script upgrades a CASTOR v2.1.14-4 CNS database to v2.1.14-5
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/* Stop on errors */
WHENEVER SQLERROR EXIT FAILURE
BEGIN
-- If we have encountered an error rollback any previously non committed
-- operations. This prevents the UPDATE of the UpgradeLog from committing
-- inconsistent data to the database.
ROLLBACK;
UPDATE UpgradeLog
SET failureCount = failureCount + 1
WHERE schemaVersion = '2_1_14_2'
AND release = '2_1_14_5'
AND state != 'COMPLETE';
COMMIT;
END;
/
/* Verify that the script is running against the correct schema and version */
DECLARE
unused VARCHAR(100);
BEGIN
SELECT release INTO unused FROM CastorVersion
WHERE schemaName = 'CNS'
AND release LIKE '2_1_14_4%';
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Error, we cannot apply this script
raise_application_error(-20000, 'PL/SQL release mismatch. Please run previous upgrade scripts for the CNS before this one.');
END;
/
INSERT INTO UpgradeLog (schemaVersion, release, type)
VALUES ('2_1_14_2', '2_1_14_5', 'TRANSPARENT');
COMMIT;
/* Recompile all invalid procedures, triggers and functions */
/************************************************************/
BEGIN
FOR a IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN ('PROCEDURE', 'TRIGGER', 'FUNCTION', 'VIEW', 'PACKAGE BODY')
AND status = 'INVALID')
LOOP
IF a.object_type = 'PACKAGE BODY' THEN a.object_type := 'PACKAGE'; END IF;
BEGIN
EXECUTE IMMEDIATE 'ALTER ' ||a.object_type||' '||a.object_name||' COMPILE';
EXCEPTION WHEN OTHERS THEN
-- ignore, so that we continue compiling the other invalid items
NULL;
END;
END LOOP;
END;
/
/* Flag the schema upgrade as COMPLETE */
/***************************************/
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_14_5';
COMMIT;
/******************************************************************************
* cupv_2.1.14-4_to_2.1.14-5.sql
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This script upgrades a CASTOR v2.1.14-4 CUPV database to v2.1.14-5
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/* Stop on errors */
WHENEVER SQLERROR EXIT FAILURE
BEGIN
-- If we have encountered an error rollback any previously non committed
-- operations. This prevents the UPDATE of the UpgradeLog from committing
-- inconsistent data to the database.
ROLLBACK;
UPDATE UpgradeLog
SET failureCount = failureCount + 1
WHERE schemaVersion = '2_1_9_3'
AND release = '2_1_14_5'
AND state != 'COMPLETE';
COMMIT;
END;
/
/* Verify that the script is running against the correct schema and version */
DECLARE
unused VARCHAR(100);
BEGIN
SELECT release INTO unused FROM CastorVersion
WHERE schemaName = 'CUPV'
AND release LIKE '2_1_14_4%';
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Error, we cannot apply this script
raise_application_error(-20000, 'PL/SQL release mismatch. Please run previous upgrade scripts for the CUPV before this one.');
END;
/
INSERT INTO UpgradeLog (schemaVersion, release, type)
VALUES ('2_1_9_3', '2_1_14_5', 'TRANSPARENT');
COMMIT;
/* Recompile all invalid procedures, triggers and functions */
/************************************************************/
BEGIN
FOR a IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN ('PROCEDURE', 'TRIGGER', 'FUNCTION', 'VIEW', 'PACKAGE BODY')
AND status = 'INVALID')
LOOP
IF a.object_type = 'PACKAGE BODY' THEN a.object_type := 'PACKAGE'; END IF;
BEGIN
EXECUTE IMMEDIATE 'ALTER ' ||a.object_type||' '||a.object_name||' COMPILE';
EXCEPTION WHEN OTHERS THEN
-- ignore, so that we continue compiling the other invalid items
NULL;
END;
END LOOP;
END;
/
/* Flag the schema upgrade as COMPLETE */
/***************************************/
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_14_5';
COMMIT;
This diff is collapsed.
/******************************************************************************
* vdqm_2.1.14-4_to_2.1.14-5.sql
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This script upgrades a CASTOR v2.1.14-4 VDQM database to v2.1.14-5
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/* Stop on errors */
WHENEVER SQLERROR EXIT FAILURE
BEGIN
-- If we have encountered an error rollback any previously non committed
-- operations. This prevents the UPDATE of the UpgradeLog from committing
-- inconsistent data to the database.
ROLLBACK;
UPDATE UpgradeLog
SET failureCount = failureCount + 1
WHERE schemaVersion = '2_1_12_0'
AND release = '2_1_14_5'
AND state != 'COMPLETE';
COMMIT;
END;
/
/* Verify that the script is running against the correct schema and version */
DECLARE
unused VARCHAR(100);
BEGIN
SELECT release INTO unused FROM CastorVersion
WHERE schemaName = 'VDQM'
AND release LIKE '2_1_14_4%';
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Error, we cannot apply this script
raise_application_error(-20000, 'PL/SQL release mismatch. Please run previous upgrade scripts for the VDQM before this one.');
END;
/
INSERT INTO UpgradeLog (schemaVersion, release, type)
VALUES ('2_1_12_0', '2_1_14_5', 'TRANSPARENT');
COMMIT;
/* Recompile all invalid procedures, triggers and functions */
/************************************************************/
BEGIN
FOR a IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN ('PROCEDURE', 'TRIGGER', 'FUNCTION', 'VIEW', 'PACKAGE BODY')
AND status = 'INVALID')
LOOP
IF a.object_type = 'PACKAGE BODY' THEN a.object_type := 'PACKAGE'; END IF;
BEGIN
EXECUTE IMMEDIATE 'ALTER ' ||a.object_type||' '||a.object_name||' COMPILE';
EXCEPTION WHEN OTHERS THEN
-- ignore, so that we continue compiling the other invalid items
NULL;
END;
END LOOP;
END;
/
/* Flag the schema upgrade as COMPLETE */
/***************************************/
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_14_5';
COMMIT;
/******************************************************************************
* vmgr_2.1.14-4_to_2.1.14-5.sql
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This script upgrades a CASTOR v2.1.14-4 VMGR database to v2.1.14-5
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/* Stop on errors */
WHENEVER SQLERROR EXIT FAILURE
BEGIN
-- If we have encountered an error rollback any previously non committed
-- operations. This prevents the UPDATE of the UpgradeLog from committing
-- inconsistent data to the database.
ROLLBACK;
UPDATE UpgradeLog
SET failureCount = failureCount + 1
WHERE schemaVersion = '2_1_14_2'
AND release = '2_1_14_5'
AND state != 'COMPLETE';
COMMIT;
END;
/
/* Verify that the script is running against the correct schema and version */
DECLARE
unused VARCHAR(100);
BEGIN
SELECT release INTO unused FROM CastorVersion
WHERE schemaName = 'VMGR'
AND release LIKE '2_1_14_4%';
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Error, we cannot apply this script
raise_application_error(-20000, 'PL/SQL release mismatch. Please run previous upgrade scripts for the VMGR before this one.');
END;
/
INSERT INTO UpgradeLog (schemaVersion, release, type)
VALUES ('2_1_14_2', '2_1_14_5', 'TRANSPARENT');
COMMIT;
/* Recompile all invalid procedures, triggers and functions */
/************************************************************/
BEGIN
FOR a IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN ('PROCEDURE', 'TRIGGER', 'FUNCTION', 'VIEW', 'PACKAGE BODY')
AND status = 'INVALID')
LOOP
IF a.object_type = 'PACKAGE BODY' THEN a.object_type := 'PACKAGE'; END IF;
BEGIN
EXECUTE IMMEDIATE 'ALTER ' ||a.object_type||' '||a.object_name||' COMPILE';
EXCEPTION WHEN OTHERS THEN
-- ignore, so that we continue compiling the other invalid items
NULL;
END;
END LOOP;
END;
/
/* Flag the schema upgrade as COMPLETE */
/***************************************/
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_14_5';
COMMIT;
......@@ -49,7 +49,7 @@ ALTER TABLE UpgradeLog
CHECK (type IN ('TRANSPARENT', 'NON TRANSPARENT'));
/* SQL statement to populate the intial release value */
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_4');
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_5');
/* SQL statement to create the CastorVersion view */
CREATE OR REPLACE VIEW CastorVersion
......
......@@ -120,7 +120,7 @@ ALTER TABLE UpgradeLog
CHECK (type IN ('TRANSPARENT', 'NON TRANSPARENT'));
/* SQL statement to populate the intial release value */
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_4');
INSERT INTO UpgradeLog (schemaVersion, release) VALUES ('-', '2_1_14_5');
/* SQL statement to create the CastorVersion view */
CREATE OR REPLACE VIEW CastorVersion
......
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