Commit df0fc044 authored by Eric Cano's avatar Eric Cano
Browse files

Catching up with master branch

parents 3b0a1259 1a8d0371
......@@ -9,44 +9,56 @@
- This release is the first certified to work with the Oracle T10000D class
of tape drives. Previous CASTOR releases have caused DATA LOSSES and
MUST NOT BE USED with those drives. See bug #103642 for more details.
- From this release, the following configuration parameters have changed:
- The following configuration parameters have changed from:
TransferManager PendingTimeouts all:120 default:120
TransferManager DiskCopyPendingTimeout 7200
TransferManager PendingTimeouts all:120 default:120
TransferManager DiskCopyPendingTimeout 7200
The new ones having DiskManager as class (see bug #103521). Please adapt your
configuration tools to reflect this change.
To:
DiskManager PendingTimeouts all:120 default:120
DiskManager DiskCopyPendingTimeout 7200
The new ones having DiskManager as class (see bug #103521). Please adapt your
configuration tools to reflect this change.
Client
------
#103659: RFE: stager_get should warn/error on unknown command line arguments
#103659 RFE: stager_get should warn/error on unknown command line arguments
Stager
------
#103190: Constraint violation errors thrown by the GC
#103512: Incorrect handling of errors on disk-to-disk copy jobs affecting draining operations
#103521: RFE: rename the TransferManager/*PendingTimeout options to DiskManager/*PendingTimeout to improve usability
#103530: tight loop in rebalancing when no file to rebalance
#103715: Requests for disk-to-disk copies wait forever in status WAITTAPERECALL
#103792: RFE: provide the ability to selectively enable/disable protocols
#103190 Constraint violation errors thrown by the GC
#103512 Incorrect handling of errors on disk-to-disk copy jobs affecting draining operations
#103521 RFE: rename the TransferManager/*PendingTimeout options to
DiskManager/*PendingTimeout to improve usability
#103530 tight loop in rebalancing when no file to rebalance
#103715 Requests for disk-to-disk copies wait forever in status WAITTAPERECALL
#103792 RFE: provide the ability to selectively enable/disable protocols
XROOT Protocol
--------------
#103804 Memory leak in the xrootd plugin in case proc files cannot be opened
#103813 XRootD role map enhancement
Tape and Repack
---------------
#103524: endTapeSession should react properly when session has disappeared
#103625: Incorrect logic to clean up repack requests may lead submitted requests to disappear
#103642: Remove the deltpfil() function
#103697: Repack of files in the cache may not take place
#103698: RFE: make deletediskcopy repack-aware
#103708: RFE: "light" nslisstape (skip file path)
#103710: RFE: VMGR should always choose the tape with the least free space for writing
#103729: VMGR should not set the TAPE_FULL based on estimated free space
#103731: Remove the getting of tape compression statistics
#103735: RFE: Remove the MTIOCSENSE code
#103738: Tape code should use a generic scsi timeout equal to that of the st driver
#103776: Recall mount creation is not selective enough, leading to empty mounts
#103524 endTapeSession should react properly when session has disappeared
#103625 Incorrect logic to clean up repack requests may lead submitted requests to disappear
#103642 Remove the deltpfil() function
#103697 Repack of files in the cache may not take place
#103698 RFE: make deletediskcopy repack-aware
#103708 RFE: "light" nslisstape (skip file path)
#103710 RFE: VMGR should always choose the tape with the least free space for writing
#103729 VMGR should not set the TAPE_FULL based on estimated free space
#103731 Remove the getting of tape compression statistics
#103735 RFE: Remove the MTIOCSENSE code
#103738 Tape code should use a generic scsi timeout equal to that of the st driver
#103776 Recall mount creation is not selective enough, leading to empty mounts
Upgrade Instructions from 2.1.14-5
----------------------------------
......@@ -65,6 +77,8 @@
1. Upgrade the STAGER database using the stager_2.1.14-5_to_2.1.14-11.sql
upgrade script available from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-11/dbupgrades
Note that as some cleanup is performed by the script, its execution may take
several minutes. However the service should not be affected by this cleanup operation.
2. Upgrade the software on the headnodes.
Note: All daemons involved in the upgrade will be restarted automatically.
......@@ -81,14 +95,16 @@
Central services (CUPV, VMGR, VDQM, Nameserver)
-----------------------------------------------
The upgrade of the central databases to 2.1.14-12 can be performed online while
the system is running.
The upgrade of the central services to 2.1.14-11 can be performed online while
the system is running. The order of upgrades is not important, however it is
recommended to upgrade VMGR at the earliest opportunity to limit the impact
of bug #103729.
Instructions
------------
1. Apply the appropriate database upgrade script from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-11/dbupgrades
1. Apply the appropriate database upgrade scripts from:
- http://cern.ch/castor/DIST/CERN/savannah/CASTOR.pkg/2.1.14-*/2.1.14-11/dbupgrades
2. Update the software to use the 2.1.14-11 RPMs. Note: All
daemons involved in the upgrade will be restarted automatically.
......
......@@ -317,6 +317,7 @@ if (${COMPILE_SERVER} STREQUAL "1")
install(FILES
exception/Backtrace.hpp
exception/CommandLineNotParsed.hpp
exception/Communication.hpp
exception/Exception.hpp
exception/Internal.hpp
......
This diff is collapsed.
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/
/******************************************************************************
* castor/db/cnv/DbSegmentCnv.hpp
*
* 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.
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef CASTOR_DB_CNV_SEGMENT_HPP
#define CASTOR_DB_CNV_SEGMENT_HPP
// Include Files
#include "castor/Constants.hpp"
#include "castor/IAddress.hpp"
#include "castor/db/cnv/DbBaseCnv.hpp"
#include "castor/exception/Exception.hpp"
#include <vector>
namespace castor {
// Forward declarations
class IObject;
class ICnvSvc;
// Forward declarations
namespace stager {
// Forward declarations
class Segment;
} /* end of namespace stager */
namespace db {
namespace cnv {
/**
* class DbSegmentCnv
* A converter for storing/retrieving Segment into/from a generic database
*/
class DbSegmentCnv : public DbBaseCnv {
public:
/**
* Constructor
*/
DbSegmentCnv(castor::ICnvSvc* cnvSvc);
/**
* Destructor
*/
virtual ~DbSegmentCnv() throw();
/**
* Gets the object type.
* That is the type of object this converter can convert
*/
static unsigned int ObjType();
/**
* Gets the object type.
* That is the type of object this converter can convert
*/
virtual unsigned int objType() const;
/**
* Creates foreign representation from a C++ Object.
* @param address where to store the representation of
* the object
* @param object the object to deal with
* @param endTransaction whether the changes to the database
* should be commited or not
* @param type if not OBJ_INVALID, the ids representing
* the links to objects of this type will not set to 0
* as is the default.
* @exception Exception throws an Exception in case of error
*/
virtual void createRep(castor::IAddress* address,
castor::IObject* object,
bool endTransaction,
unsigned int type = castor::OBJ_INVALID)
throw (castor::exception::Exception);
/**
* Creates foreign representation from a set of C++ Objects.
* @param address where to store the representation of
* the objects
* @param objects the list of objects to deal with
* @param endTransaction whether the changes to the database
* should be commited or not
* @param type if not OBJ_INVALID, the ids representing
* the links to objects of this type will not set to 0
* as is the default.
* @exception Exception throws an Exception in case of error
*/
virtual void bulkCreateRep(castor::IAddress* address,
std::vector<castor::IObject*> &objects,
bool endTransaction,
unsigned int type = castor::OBJ_INVALID)
throw (castor::exception::Exception);
/**
* Updates foreign representation from a C++ Object.
* @param address where the representation of
* the object is stored
* @param object the object to deal with
* @param endTransaction whether the changes to the database
* should be commited or not
* @exception Exception throws an Exception in case of error
*/
virtual void updateRep(castor::IAddress* address,
castor::IObject* object,
bool endTransaction)
throw (castor::exception::Exception);
/**
* Deletes foreign representation of a C++ Object.
* @param address where the representation of
* the object is stored
* @param object the object to deal with
* @param endTransaction whether the changes to the database
* should be commited or not
* @exception Exception throws an Exception in case of error
*/
virtual void deleteRep(castor::IAddress* address,
castor::IObject* object,
bool endTransaction)
throw (castor::exception::Exception);
/**
* Creates C++ object from foreign representation
* @param address the place where to find the foreign
* representation
* @return the C++ object created from its reprensentation
* or 0 if unsuccessful. Note that the caller is responsible
* for the deallocation of the newly created object
* @exception Exception throws an Exception in case of error
*/
virtual castor::IObject* createObj(castor::IAddress* address)
throw (castor::exception::Exception);
/**
* create C++ objects from foreign representations
* @param address the place where to find the foreign
* representations
* @return the C++ objects created from the representations
* or empty vector if unsuccessful. Note that the caller is
* responsible for the deallocation of the newly created objects
* @exception Exception throws an Exception in case of error
*/
virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address)
throw (castor::exception::Exception);
/**
* Updates C++ object from its foreign representation.
* @param obj the object to deal with
* @exception Exception throws an Exception in case of error
*/
virtual void updateObj(castor::IObject* obj)
throw (castor::exception::Exception);
/**
* Fill the foreign representation with some of the objects.refered by a given C++
* object.
* @param address the place where to find the foreign representation
* @param object the original C++ object
* @param type the type of the refered objects to store
* @param endTransaction whether the changes to the database
* should be commited or not
* @exception Exception throws an Exception in case of error
*/
virtual void fillRep(castor::IAddress* address,
castor::IObject* object,
unsigned int type,
bool endTransaction)
throw (castor::exception::Exception);
/**
* Fill the database with objects of type RecallJob refered by a given object.
* @param obj the original object
* @exception Exception throws an Exception in case of error
*/
virtual void fillRepRecallJob(castor::stager::Segment* obj)
throw (castor::exception::Exception);
/**
* Fill the database with objects of type Tape refered by a given object.
* @param obj the original object
* @exception Exception throws an Exception in case of error
*/
virtual void fillRepTape(castor::stager::Segment* obj)
throw (castor::exception::Exception);
/**
* Retrieve from the database some of the objects refered by a given object.
* @param object the original object
* @param type the type of the refered objects to retrieve
* @exception Exception throws an Exception in case of error
*/
virtual void fillObj(castor::IAddress* address,
castor::IObject* object,
unsigned int type,
bool endTransaction)
throw (castor::exception::Exception);
/**
* Retrieve from the database objects of type RecallJob refered by a given object.
* @param obj the original object
* @exception Exception throws an Exception in case of error
*/
virtual void fillObjRecallJob(castor::stager::Segment* obj)
throw (castor::exception::Exception);
/**
* Retrieve from the database objects of type Tape refered by a given object.
* @param obj the original object
* @exception Exception throws an Exception in case of error
*/
virtual void fillObjTape(castor::stager::Segment* obj)
throw (castor::exception::Exception);
private:
/// SQL statement for request insertion
static const std::string s_insertStatementString;
/// SQL statement object for request insertion
castor::db::IDbStatement *m_insertStatement;
/// SQL statement for request bulk insertion
static const std::string s_bulkInsertStatementString;
/// SQL statement object for request bulk insertion
castor::db::IDbStatement *m_bulkInsertStatement;
/// SQL statement for request deletion
static const std::string s_deleteStatementString;
/// SQL statement object for request deletion
castor::db::IDbStatement *m_deleteStatement;
/// SQL statement for request selection
static const std::string s_selectStatementString;
/// SQL statement object for request selection
castor::db::IDbStatement *m_selectStatement;
/// SQL statement for request bulk selection
static const std::string s_bulkSelectStatementString;
/// SQL statement object for request bulk selection
castor::db::IDbStatement *m_bulkSelectStatement;
/// SQL statement for request update
static const std::string s_updateStatementString;
/// SQL statement object for request update
castor::db::IDbStatement *m_updateStatement;
/// SQL checkExist statement for member copy
static const std::string s_checkRecallJobExistStatementString;
/// SQL checkExist statement object for member copy
castor::db::IDbStatement *m_checkRecallJobExistStatement;
/// SQL update statement for member copy
static const std::string s_updateRecallJobStatementString;
/// SQL update statement object for member copy
castor::db::IDbStatement *m_updateRecallJobStatement;
/// SQL checkExist statement for member tape
static const std::string s_checkTapeExistStatementString;
/// SQL checkExist statement object for member tape
castor::db::IDbStatement *m_checkTapeExistStatement;
/// SQL update statement for member tape
static const std::string s_updateTapeStatementString;
/// SQL update statement object for member tape
castor::db::IDbStatement *m_updateTapeStatement;
}; // end of class DbSegmentCnv
} /* end of namespace cnv */
} /* end of namespace db */
} /* end of namespace castor */
#endif // CASTOR_DB_CNV_SEGMENT_HPP
......@@ -138,7 +138,7 @@ INSERT INTO CastorConfig
INSERT INTO CastorConfig
VALUES ('Rebalancing', 'Sensitivity', '5', 'The rebalancing sensitivity (in percent) : if a fileSystem is at least this percentage fuller than the average of the diskpool where it lives, rebalancing will fire.');
INSERT INTO CastorConfig
VALUES ('Stager', 'Protocols', 'rfio rfio3 root gsiftp xroot', 'The list of protocols accepted by the system.')
VALUES ('Stager', 'Protocols', 'rfio rfio3 root gsiftp xroot', 'The list of protocols accepted by the system.');
/* Create the AdminUsers table */
CREATE TABLE AdminUsers (euid NUMBER, egid NUMBER);
ALTER TABLE AdminUsers ADD CONSTRAINT UN_AdminUsers_euid_egid UNIQUE (euid, egid);
......@@ -765,7 +765,7 @@ CREATE TABLE FileMigrationResultsHelper
CREATE INDEX I_FileMigResultsHelper_ReqId ON FileMigrationResultsHelper(ReqId);
/* SQL statements for type DiskServer */
CREATE TABLE DiskServer (name VARCHAR2(2048), lastHeartbeatTime NUMBER, id INTEGER CONSTRAINT PK_DiskServer_Id PRIMARY KEY, status INTEGER, hwOnline INTEGER DEFAULT 0) INITRANS 50 PCTFREE 50 ENABLE ROW MOVEMENT;
CREATE TABLE DiskServer (name VARCHAR2(2048), lastHeartbeatTime NUMBER DEFAULT 0, id INTEGER CONSTRAINT PK_DiskServer_Id PRIMARY KEY, status INTEGER, hwOnline INTEGER DEFAULT 0) INITRANS 50 PCTFREE 50 ENABLE ROW MOVEMENT;
CREATE UNIQUE INDEX I_DiskServer_name ON DiskServer (name);
ALTER TABLE DiskServer MODIFY
(status CONSTRAINT NN_DiskServer_Status NOT NULL,
......@@ -1176,7 +1176,6 @@ CREATE TABLE DrainingJob
egid INTEGER CONSTRAINT NN_DrainingJob_Egid NOT NULL,
pid INTEGER CONSTRAINT NN_DrainingJob_Pid NOT NULL,
machine VARCHAR2(2048) CONSTRAINT NN_DrainingJob_Machine NOT NULL,
reqId VARCHAR2(2048) CONSTRAINT NN_DrainingJob_ReqId NOT NULL,
creationTime INTEGER CONSTRAINT NN_DrainingJob_CT NOT NULL,
lastModificationTime INTEGER CONSTRAINT NN_DrainingJob_LMT NOT NULL,
status INTEGER CONSTRAINT NN_DrainingJob_Status NOT NULL,
......
This diff is collapsed.
/******************************************************************************
* CommandLineNotParsed.cpp
*
* 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.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/exception/CommandLineNotParsed.hpp"
#include "h/serrno.h"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
castor::exception::CommandLineNotParsed::CommandLineNotParsed():
castor::exception::Exception(SECMDLNNOTPRSD) {
}
/******************************************************************************
* CommandLineNotParsed.hpp
*
* 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.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef CASTOR_EXCEPTION_COMMANDLINENOTPARSED_HPP
#define CASTOR_EXCEPTION_COMMANDLINENOTPARSED_HPP 1
#include "castor/exception/Exception.hpp"
namespace castor { namespace exception {
/**
* CommandLineNotParsed.
*/
class CommandLineNotParsed : public castor::exception::Exception {
public:
/**
* Constructor
*/
CommandLineNotParsed();
}; // class CommandLineNotParsed
} } // namespace castor exception
#endif // CASTOR_EXCEPTION_COMMANDLINENOTPARSED_HPP
......@@ -33,12 +33,13 @@
#include "castor/log/LoggerImplementation.hpp"
#include "castor/server/SignalThreadPool.hpp"
#include "castor/server/BaseThreadPool.hpp"
#include "Cgetopt.h"
#include "getconfent.h"
#include "h/Cgetopt.h"
#include "h/getconfent.h"
#include <iostream>
#include <sys/time.h>
#include <string.h>
//-----------------------------------------------------------------------------
// main
//-----------------------------------------------------------------------------
......@@ -46,7 +47,7 @@ int main(int argc, char *argv[]) {
try {
castor::log::LoggerImplementation logger("gcd");
castor::gc::GcDaemon daemon(logger);
castor::gc::GcDaemon daemon(std::cout, std::cerr, logger);
// Randomize the start-up of the daemon between 1 and 15 minutes.
char *value;
......@@ -110,8 +111,9 @@ int main(int argc, char *argv[]) {
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
castor::gc::GcDaemon::GcDaemon(log::Logger &logger):
castor::server::MultiThreadedDaemon(logger) {
castor::gc::GcDaemon::GcDaemon(std::ostream &stdOut, std::ostream &stdErr,
log::Logger &logger):
castor::server::MultiThreadedDaemon(stdOut, stdErr, logger) {
// Now with predefined messages
castor::dlf::Message messages[] = {
......
......@@ -47,9 +47,11 @@ namespace castor {
/**
* Constructor
*
* @param stdOut Stream representing standard out.
* @param stdErr Stream representing standard error.
* @param logger Object representing the API of the CASTOR logging system.
*/
GcDaemon(log::Logger &logger);
GcDaemon(std::ostream &stdOut, std::ostream &stdErr, log::Logger &logger);
/**
* Default destructor
......
......@@ -63,7 +63,7 @@ const char *castor::rh::PORT_SEC_CONF = "SEC_PORT";
int main(int argc, char *argv[]) {
try {
castor::log::LoggerImplementation logger("rhd");
castor::rh::Server server(logger);
castor::rh::Server server(std::cout, std::cerr, logger);
// parse the command line
server.parseCommandLine(argc, argv);
......@@ -93,8 +93,9 @@ int main(int argc, char *argv[]) {
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
castor::rh::Server::Server(castor::log::Logger &logger) :
castor::server::MultiThreadedDaemon(logger),
castor::rh::Server::Server(std::ostream &stdOut, std::ostream &stdErr,
castor::log::Logger &logger) :
castor::server::MultiThreadedDaemon(stdOut, stdErr, logger),
m_port(-1),
m_secure(false),
m_waitIfBusy(true),
......@@ -173,6 +174,7 @@ void castor::rh::Server::help(std::string programName)
//------------------------------------------------------------------------------
void castor::rh::Server::parseCommandLine(int argc, char *argv[]) throw (castor::exception::Exception)
{
bool foreground = false; // Should the daemon run in the foreground?
Coptions_t longopts[] =
{
{"foreground", NO_ARGUMENT, NULL, 'f'},
......@@ -196,7 +198,7 @@ void castor::rh::Server::parseCommandLine(int argc, char *argv[]) throw (castor:
while ((c = Cgetopt_long(argc, argv, "fsR:p:c:nmh", longopts, NULL)) != -1)<