irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

initServer.cpp File Reference
#include "rcMisc.h"
#include "initServer.hpp"
#include "rodsConnect.h"
#include "procLog.h"
#include "resource.hpp"
#include "rsGlobalExtern.hpp"
#include "rcGlobalExtern.h"
#include "genQuery.h"
#include "rsIcatOpr.hpp"
#include "miscServerFunct.hpp"
#include "getRemoteZoneResc.h"
#include "getRescQuota.h"
#include "physPath.hpp"
#include "rsLog.hpp"
#include "sockComm.h"
#include "irods_stacktrace.hpp"
#include "rsGenQuery.hpp"
#include "rsExecCmd.hpp"
#include "irods_get_full_path_for_config_file.hpp"
#include "irods_configuration_parser.hpp"
#include "irods_resource_backport.hpp"
#include "irods_log.hpp"
#include "irods_exception.hpp"
#include "irods_threads.hpp"
#include "irods_server_properties.hpp"
#include "irods_random.hpp"
#include <vector>
#include <set>
#include <string>
#include <fstream>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/optional.hpp>
#include <boost/system/error_code.hpp>
Include dependency graph for initServer.cpp:

Go to the source code of this file.

Functions

int initServerInfo (int processType, rsComm_t *rsComm)
 
int initLocalServerHost ()
 
int initRcatServerHostByFile ()
 
int initZone (rsComm_t *rsComm)
 
int initAgent (int processType, rsComm_t *rsComm)
 
void cleanup ()
 
void cleanupAndExit (int status)
 
void signalExit (int)
 
void rsPipeSignalHandler (int)
 
int initHostConfigByFile ()
 
int initRsComm (rsComm_t *rsComm)
 
void daemonize (int runMode, int logFd)
 
int logFileOpen (int runMode, const char *logDir, const char *logFileName)
 
int initRsCommWithStartupPack (rsComm_t *rsComm, startupPack_t *startupPack)
 
std::set< std::string > construct_controlled_user_set (const std::unordered_map< std::string, boost::any > &controlled_user_connection_list)
 
int chkAllowedUser (const char *userName, const char *rodsZone)
 
int setRsCommFromRodsEnv (rsComm_t *rsComm)
 
int queAgentProc (agentProc_t *agentProc, agentProc_t **agentProcHead, irodsPosition_t position)
 
int purgeLockFileDir (int chkLockFlag)
 

Variables

static time_t LastBrokenPipeTime = 0
 
static int BrokenPipeCnt = 0
 

Function Documentation

◆ chkAllowedUser()

int chkAllowedUser ( const char *  userName,
const char *  rodsZone 
)

Definition at line 1008 of file initServer.cpp.

References construct_controlled_user_set(), terminate_irods_processes::e, irods::get_server_property(), INVALID_ANY_CAST, KEY_NOT_FOUND, irods::log(), LOG_ERROR, NULL, rodsLog(), and SYS_USER_NOT_ALLOWED_TO_CONN.

Referenced by readWorkerTask(), and runIrodsAgentFactory().

Here is the call graph for this function:

◆ cleanup()

void cleanup ( )

Definition at line 550 of file initServer.cpp.

References irods::CFG_SERVICE_ROLE_PROVIDER(), closeAllL1desc(), disconnectAllSvrToSvrConn(), disconnectRcat(), get_catalog_service_role(), INITIAL_DONE, InitialState, irods::log(), irods::error::ok(), PASS, irods::re_plugin_globals, and ThisComm.

Referenced by cleanupAndExit(), and runIrodsAgentFactory().

Here is the call graph for this function:

◆ cleanupAndExit()

void cleanupAndExit ( int  status)

Definition at line 571 of file initServer.cpp.

References cleanup(), LOG_NOTICE, rodsLog(), and irods.pypyodbc::status.

Referenced by rsPipeSignalHandler(), runIrodsAgentFactory(), signalExit(), and xmsgServerMain().

Here is the call graph for this function:

◆ construct_controlled_user_set()

std::set<std::string> construct_controlled_user_set ( const std::unordered_map< std::string, boost::any > &  controlled_user_connection_list)

Definition at line 993 of file initServer.cpp.

References terminate_irods_processes::e, INVALID_ANY_CAST, KEY_NOT_FOUND, and THROW.

Referenced by chkAllowedUser().

◆ daemonize()

void daemonize ( int  runMode,
int  logFd 
)

Definition at line 762 of file initServer.cpp.

References SINGLE_PASS, and STANDALONE_SERVER.

Referenced by main().

◆ initAgent()

◆ initHostConfigByFile()

int initHostConfigByFile ( )
Description:\n parse the irodsHost file, creating address

Definition at line 629 of file initServer.cpp.

References irods::error::code(), terminate_irods_processes::e, ERROR, irods::configuration_parser::get(), irods::get_full_path_for_config_file(), HOST_CONFIG_FILE, HostConfigHead, INVALID_ANY_CAST, KEY_NOT_FOUND, irods::configuration_parser::load(), LOCAL_HOST, irods::log(), LOG_ERROR, LOG_NOTICE, irods::error::ok(), PASS, queHostName(), queRodsServerHost(), REMOTE_HOST, rodsLog(), and ZoneInfoHead.

Referenced by initServerInfo().

Here is the call graph for this function:

◆ initLocalServerHost()

int initLocalServerHost ( )

Definition at line 144 of file initServer.cpp.

References LOCAL_HOST, rodsServerHost::localFlag, LocalServerHost, LOG_NOTICE, matchHostConfig(), MAX_NAME_LEN, myHostName, printServerHost(), ProcessType, queAddr(), queHostName(), rodsLog(), SERVER_PT, ServerHostHead, irods.pypyodbc::status, SYS_GET_HOSTNAME_ERR, rodsServerHost::zoneInfo, and ZoneInfoHead.

Referenced by initServerInfo().

Here is the call graph for this function:

◆ initRcatServerHostByFile()

◆ initRsComm()

◆ initRsCommWithStartupPack()

◆ initServerInfo()

◆ initZone()

◆ logFileOpen()

int logFileOpen ( int  runMode,
const char *  logDir,
const char *  logFileName 
)

Definition at line 796 of file initServer.cpp.

References getLogfileName(), NULL, SINGLE_PASS, and SYS_INTERNAL_NULL_INPUT_ERR.

Referenced by main().

Here is the call graph for this function:

◆ purgeLockFileDir()

int purgeLockFileDir ( int  chkLockFlag)

Definition at line 1109 of file initServer.cpp.

References irods::error::code(), FILE_OPEN_ERR, irods::get_full_path_for_unmoved_configs(), LOCK_FILE_DIR, LOCK_FILE_PURGE_TIME, irods::log(), LOG_ERROR, MAX_NAME_LEN, NULL, irods::error::ok(), PASS, irods::experimental::filesystem::client::remove(), rodsLog(), rodsLogError(), irods.pypyodbc::status, UNIX_FILE_OPENDIR_ERR, and UNIX_FILE_STAT_ERR.

Referenced by initServer(), and purgeLockFileWorkerTask().

Here is the call graph for this function:

◆ queAgentProc()

int queAgentProc ( agentProc_t agentProc,
agentProc_t **  agentProcHead,
irodsPosition_t  position 
)

◆ rsPipeSignalHandler()

void rsPipeSignalHandler ( int  )

Definition at line 599 of file initServer.cpp.

References BROKEN_PIPE_INT, BrokenPipeCnt, cleanupAndExit(), LastBrokenPipeTime, LOG_NOTICE, MAX_BROKEN_PIPE_CNT, NULL, rsComm_t::reconnSock, rodsLog(), SYS_CAUGHT_SIGNAL, and ThisComm.

Referenced by main().

Here is the call graph for this function:

◆ setRsCommFromRodsEnv()

int setRsCommFromRodsEnv ( rsComm_t rsComm)

Definition at line 1060 of file initServer.cpp.

References irods::CFG_ZONE_NAME(), irods::CFG_ZONE_USER(), rsComm_t::clientUser, terminate_irods_processes::e, irods::log(), NAME_LEN, rsComm_t::proxyUser, userInfo_t::rodsZone, rstrcpy(), userInfo_t::userName, and manual_cleanup::zone_name.

Referenced by initServerMain().

Here is the call graph for this function:

◆ signalExit()

void signalExit ( int  )

Definition at line 589 of file initServer.cpp.

References cleanupAndExit(), LOG_NOTICE, rodsLog(), and SYS_CAUGHT_SIGNAL.

Referenced by main().

Here is the call graph for this function:

Variable Documentation

◆ BrokenPipeCnt

int BrokenPipeCnt = 0
static

Definition at line 47 of file initServer.cpp.

Referenced by rsPipeSignalHandler().

◆ LastBrokenPipeTime

time_t LastBrokenPipeTime = 0
static

Definition at line 46 of file initServer.cpp.

Referenced by rsPipeSignalHandler().