Functions | Variables

fwInstallationDBAgent.ctl File Reference

Functions

int fwInstallationDBAgent_executeProjectPendingReinstallations (int &restartProject)
 Beginning of executable code:
int fwInstallationDBAgent_setSynchronizationLock ()
int fwInstallationDBAgent_releaseSynchronizationLock ()
int fwInstallationDBAgent_getSynchronizationLock ()
int fwInstallationDBAgent_setProjectStatus (dyn_int status, string projectName="", string computerName="")
int fwInstallationDBAgent_synchronize (int &restartProject)
int fwInstallationDBAgent_checkIntegrity (dyn_int &status)
int fwInstallationDBAgent_checkProjectPvssInfo (bool &isOk, dyn_mixed &dbPvssInfo, dyn_mixed &pvssPvssInfo)
int fwInstallationDBAgent_synchronizePvssSetupInfo ()
int fwInstallationDBAgent_checkProjectPvssPatchesInfo (bool &isOk, dyn_string &dbPatches, dyn_string &pvssPatches)
int fwInstallationDBAgent_checkHostInfo (bool &isOk, dyn_mixed &dbHostInfo, dyn_mixed &pvssHostInfo)
int fwInstallationDBAgent_synchronizeHostInfo ()
int fwInstallationDBAgent_checkProjectInfo (bool &isOk, dyn_mixed &dbProjectInfo, dyn_mixed &pvssProjectInfo)
int fwInstallationDBAgent_synchronizeProjectInfo ()
int fwInstallationDBAgent_checkProjectPathsInfo (bool &isOk, dyn_string &dbPaths, dyn_string &pvssPaths)
int fwInstallationDBAgent_synchronizeProjectPaths ()
int fwInstallationDBAgent_checkProjectManagersInfo (bool &isOk, dyn_dyn_mixed &dbManagersInfo, dyn_dyn_string &pvssManagersInfo)
int fwInstallationDBAgent_synchronizeProjectManagers ()
int fwInstallationDBAgent_checkComponents (bool &isOk, dyn_dyn_mixed &dbComponentsInfo, dyn_dyn_mixed &pvssComponentsInfo)
string fwInstallationDBAgent_stringCastRequest (dyn_mixed request)
int fwInstallationDBAgent_synchronizeProjectComponents (int &restartProject)
int fwInstallationDBAgent_isPostInstallRunning (bool &isRunning)
string fwInstallationDBAgent_getComponentFile (string descFile)
int fwInstallationDBAgent_executeComponentPendingActions (int &restartProject, dyn_dyn_mixed pvssInstallComponents, dyn_dyn_mixed pvssDeleteComponents)
int fwInstallationDBAgent_getComponentPendingActions (int &restartProject, dyn_dyn_mixed &pvssInstallComponents, dyn_dyn_mixed &pvssDeleteComponents, int &reinstalls)
int fwInstallationDBAgent_setSyncInterval (int interval)
int fwInstallationDBAgent_getSyncInterval ()
int fwInstallationDBAgent_checkDistPeers (bool &isOk, dyn_string &onlyPvssSystemNames, dyn_string &onlyDbSystemNames, dyn_string &onlyPvssComputerNames, dyn_string &onlyDbComputerNames, dyn_int &onlyPvssSystemNumbers, dyn_int &onlyDbSystemNumbers)
int fwInstallationDBAgent_isDistRestartRequired ()
int fwInstallationDBAgent_synchronizeDistPeers ()
int fwInstallationDBAgent_unregisterProjectPaths (string projectName="", string computerName="")
int fwInstallationDBAgent_registerProjectPaths (dyn_string paths, string projectName="", string computerName="")

Variables

const string gFwInstallationAgentLibVersion = "5.0.0"
fwInstallation.ctl: Definition of variables

The following variables are used by the fwInstallationManager.ctl library

const int FW_INSTALLATION_DB_PROJECT_OK = 1
const int FW_INSTALLATION_DB_PROJECT_MISSMATCH = 0
const int FW_INSTALLATION_DB_PROJECT_NEVER_CHECKED = -1
const int FW_INSTALLATION_DB_STATUS_PVSS_INFO = 1
const int FW_INSTALLATION_DB_STATUS_PVSS_PATCH_INFO = 2
const int FW_INSTALLATION_DB_STATUS_HOST_INFO = 3
const int FW_INSTALLATION_DB_STATUS_PROJECT_INFO = 4
const int FW_INSTALLATION_DB_STATUS_PATH_INFO = 5
const int FW_INSTALLATION_DB_STATUS_MANAGER_INFO = 6
const int FW_INSTALLATION_DB_STATUS_GROUP_INFO = 7
const int FW_INSTALLATION_DB_STATUS_COMPONENT_INFO = 8
const int FW_INSTALLATION_DB_STATUS_DIST_PEERS_INFO = 9
const string csFwInstallationDBAgentLibVersion = "3.4.2"
const int FW_INSTALLATION_DB_PVSS_INSTALL_COMPONENT_IDX = 1
const int FW_INSTALLATION_DB_PVSS_INSTALL_VERSION_IDX = 2
const int FW_INSTALLATION_DB_PVSS_INSTALL_DESCFILE_IDX = 3
const int FW_INSTALLATION_DB_PVSS_INSTALL_SOURCEDIR_IDX = 4
const int FW_INSTALLATION_DB_PVSS_INSTALL_SUBCOMP_IDX = 5
const int FW_INSTALLATION_DB_PVSS_INSTALL_SUBPATH_IDX = 6
const int FW_INSTALLATION_DB_PVSS_INSTALL_FORCE_REQUIRED_IDX = 7
const int FW_INSTALLATION_DB_PVSS_INSTALL_OVERWRITE_FILES_IDX = 8
const int FW_INSTALLATION_DB_PVSS_INSTALL_SILENT_IDX = 9
const int FW_INSTALLATION_DB_PVSS_INSTALL_GROUP_IDX = 10
const int FW_INSTALLATION_DB_PVSS_DELETE_NAME_IDX = 1
const int FW_INSTALLATION_DB_PVSS_DELETE_VERSION_IDX = 2
const int FW_INSTALLATION_DB_DB_DELETE_COMPONENT_NAME_IDX = 1
const int FW_INSTALLATION_DB_DB_DELETE_COMPONENT_VERSION_IDX = 2
const int FW_INSTALLATION_DB_DB_DELETE_COMPONENT_SUBCOMP_IDX = 3
const int FW_INSTALLATION_DB_DB_DELETE_COMPONENT_GROUP_IDX = 4
const int FW_INSTALLATION_DB_DB_INSTALL_COMPONENT_NAME_IDX = 1
const int FW_INSTALLATION_DB_DB_INSTALL_COMPONENT_VERSION_IDX = 2
const int FW_INSTALLATION_DB_DB_INSTALL_COMPONENT_SUBCOMP_IDX = 3
const int FW_INSTALLATION_DB_DB_INSTALL_COMPONENT_GROUP_IDX = 4
const int FW_INSTALLATION_DB_DB_INSTALL_COMPONENT_DESCFILE_IDX = 5
const int FW_INSTALLATION_DB_REINSTALL_COMPONENT_NAME_IDX = 1
const int FW_INSTALLATION_DB_REINSTALL_COMPONENT_VERSION_IDX = 2
const int FW_INSTALLATION_DB_REINSTALL_COMPONENT_SUBCOMP_IDX = 3
const int FW_INSTALLATION_DB_REINSTALL_COMPONENT_DESCFILE_IDX = 4
const int FW_INSTALLATION_DB_REINSTALL_RESTART_PROJECT_IDX = 5
const int FW_INSTALLATION_DB_REINSTALL_OVERWRITE_FILES_IDX = 6

Detailed Description

This library contains builds on top of fwInstallation.ctl and fwInstallationDB.ctl and it contains the functions called by the DB-Agent of the FW Comonent Installation Tool for the synchronization of the contents of the local project and of the System Configuration DB. The functions in this library are not intended to be called from user scripts

Author:
Fernando Varela Rodriguez (IT-CO/BE)
Version:
3.3.10
Date:
April 2007

Function Documentation

int fwInstallationDBAgent_checkComponents ( bool &  isOk,
dyn_dyn_mixed &  dbComponentsInfo,
dyn_dyn_mixed &  pvssComponentsInfo 
)

This function checks the consistency between the list of components currently installed in the local project and those registered in the System Configuration DB

Parameters:
isOk overall result of the consistency check
dbComponentsInfo components information in the DB
pvssComponentsInfo components information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkDistPeers ( bool &  isOk,
dyn_string &  onlyPvssSystemNames,
dyn_string &  onlyDbSystemNames,
dyn_string &  onlyPvssComputerNames,
dyn_string &  onlyDbComputerNames,
dyn_int &  onlyPvssSystemNumbers,
dyn_int &  onlyDbSystemNumbers 
)

This function checks the consistency between the list of dist peers defined in the local project and in the System Configuration DB

Parameters:
isOk overall result of the consistency check
onlyPvssSystemNames PVSS system names correspoding to peers defined only in the config file of the local project, i.e. missing in the DB
onlyDbSystemNames PVSS system names correspoding to peers defined only in the DB, i.e. missing in the config file of the local project
onlyPvssComputerNames Hostnames correspoding to peers defined only in the config file of the local project, i.e. missing in the DB
onlyDbComputerNames Hostnames correspoding to peers defined only in the DB, i.e. missing in the config file of the local project.
onlyPvssSystemNumbers PVSS system numbers correspoding to peers defined only in the config file of the local project, i.e. missing in the DB
onlyDbSystemNumbers PVSS system numbers correspoding to peers defined only in the DB, i.e. missing in the config file of the local project.
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkHostInfo ( bool &  isOk,
dyn_mixed &  dbHostInfo,
dyn_mixed &  pvssHostInfo 
)

This function checks the consistency between the current project and the contents of the System Configuration DB for the host information

Parameters:
isOk TRUE if DB and local project information is in sync for patches
dbHostInfo PVSS information in the system configuration DB as a dyn_mixed array
pvssHostInfo PVSS information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkIntegrity ( dyn_int &  status  ) 

This function retrieves from the System Configuration DB the current status of the syncrhonization process

Parameters:
status array of flags indicating the result of each of the steps performed during the synchronization process
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkProjectInfo ( bool &  isOk,
dyn_mixed &  dbProjectInfo,
dyn_mixed &  pvssProjectInfo 
)

This function checks the consistency between the current project and the contents of the System Configuration DB for the project information

Parameters:
isOk TRUE if DB and local project information is in sync for patches
dbProjectInfo PVSS information in the system configuration DB as a dyn_mixed array
pvssProjectInfo PVSS information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkProjectManagersInfo ( bool &  isOk,
dyn_dyn_mixed &  dbManagersInfo,
dyn_dyn_string &  pvssManagersInfo 
)

This function checks the consistency between the list of project managers in the current project and those registered in the System Configuration DB

Parameters:
isOk overall result of the consistency check
dbManagersInfo managers information from the database
pvssManagersInfo managers information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkProjectPathsInfo ( bool &  isOk,
dyn_string &  dbPaths,
dyn_string &  pvssPaths 
)

This function checks the consistency between the current project and the contents of the System Configuration DB for the project paths

Parameters:
isOk TRUE if DB and local project information is in sync for patches
dbPaths PVSS information in the system configuration DB as a dyn_mixed array
pvssPaths PVSS information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkProjectPvssInfo ( bool &  isOk,
dyn_mixed &  dbPvssInfo,
dyn_mixed &  pvssPvssInfo 
)

This function checks the consistency between the current project and the contents of the System Configuration DB for the PVSS setup information

Parameters:
isOk TRUE if DB and local project information is in sync
dbPvssInfo PVSS information in the system configuration DB as a dyn_mixed array
pvssPvssInfo PVSS information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_checkProjectPvssPatchesInfo ( bool &  isOk,
dyn_string &  dbPatches,
dyn_string &  pvssPatches 
)

This function checks the consistency between the current project and the contents of the System Configuration DB for the PVSS patches information

Parameters:
isOk TRUE if DB and local project information is in sync for patches
dbPatches PVSS information in the system configuration DB as a dyn_mixed array
pvssPatches PVSS information from the local project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_executeComponentPendingActions ( int &  restartProject,
dyn_dyn_mixed  pvssInstallComponents,
dyn_dyn_mixed  pvssDeleteComponents 
)

This function executes all pending installation/uninstallatio of components

Parameters:
restartProject (in/out) flag indicating if project restart is required. Possible values are:

0: project restart is not required

1: project restart required

2: project restart not required but post-installation scripts must be run

Parameters:
pvssInstallComponents (in) list of components to be installed in the project
pvssDeleteComponents (in) list of components to be delete from the project
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_executeProjectPendingReinstallations ( int &  restartProject  ) 

Beginning of executable code:

This function executes all pending reinstallation actions for the project

Parameters:
restartProject flag indicating if project restart is required. Possible values are:

0: project restart is not required

1: project restart required

2: project restart not required but post-installation scripts must be run

Returns:
0 if OK, -1 if errors
string fwInstallationDBAgent_getComponentFile ( string  descFile  ) 

This function returns the path to a description file where any Windows-Linux path mapping is resolved, e.g. from /afs/cern.ch/myComponent.xml -> P:/myComponent.xml

Parameters:
descFile original description file of the component including path
Returns:
new path to the component description file where possible path mappings have been resolved
int fwInstallationDBAgent_getComponentPendingActions ( int &  restartProject,
dyn_dyn_mixed &  pvssInstallComponents,
dyn_dyn_mixed &  pvssDeleteComponents,
int &  reinstalls 
)

This function retrieves the list of pending installation/uninstallatio of components

Parameters:
restartProject (out) flag indicating if project restart is required. Possible values are:

0: project restart is not required

1: project restart required

2: project restart not required but post-installation scripts must be run

Parameters:
pvssInstallComponents (out) list of components to be installed in the project
pvssDeleteComponents (out) list of components to be delete from the project
reinstalls (out) if not 0 means that there are pending reinstallation actions
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_getSynchronizationLock (  ) 

This function returns the current value of the synchronization lock

Returns:
1 if the lock is set, 0 if unset
int fwInstallationDBAgent_getSyncInterval (  ) 

This function reads the synchronization interval

Returns:
time in seconds between two consecutive synchronizations
int fwInstallationDBAgent_isDistRestartRequired (  ) 

This function returns whether the distribution manager has to be restarted during the synchronization process

Returns:
1 if the dist manager has to be restarted, otherwise 0.
int fwInstallationDBAgent_isPostInstallRunning ( bool &  isRunning  ) 

This function checks if the post-installation scripts are still running

Parameters:
isRunning TRUE if post-install scripts are still being executed
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_registerProjectPaths ( dyn_string  paths,
string  projectName = "",
string  computerName = "" 
)

This function registers all project paths in the System Configuration DB for a particular project

Parameters:
paths list of project paths
projectName name of the PVSS project
computerName hostaname where the project runs
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_releaseSynchronizationLock (  ) 

This function releases the synchronization lock.

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_setProjectStatus ( dyn_int  status,
string  projectName = "",
string  computerName = "" 
)

This function writes to the System Configuration DB result of the synchronization process

Parameters:
status array of flags indicating the result of each of the steps performed during the synchronization process
projectName Name of the project
computerName hostname
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_setSynchronizationLock (  ) 

This function sets the synchronization lock, i.e. a kind of semaphore to ensure that not concurrent installation are performed by the agent and the main panel of the installation tool.

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_setSyncInterval ( int  interval  ) 

This function sets the synchronization interval

Parameters:
interval time in seconds between two consecutive synchronizations
Returns:
0 if OK, -1 if errors
string fwInstallationDBAgent_stringCastRequest ( dyn_mixed  request  ) 

This function cast a dyn_mixed to an string where the different elements are separated by "|";

Parameters:
request dyn_mixed to be casted
Returns:
result of the casting operation as string
int fwInstallationDBAgent_synchronize ( int &  restartProject  ) 

This function synchronizes the contents of the System Configuration DB and of the local project

Parameters:
restartProject flag indicating if project restart is required. Possible values are:

0: project restart is not required

1: project restart required

2: project restart not required but post-installation scripts must be run

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeDistPeers (  ) 

This function synchronizes the list of dist peers in the current project and in the System Configuration. The synchronization depends on the management mode of the project:

  • if the project is locally managed, the contents of the system confiuguration db are updated with the list of dist peers currently defined in the project.
  • if the project is centrally managed, the DB-Agent of the installation tool modifies the list of dist-peers defined in the local project to reflect the contents of the system configuration DB.
    Returns:
    0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeHostInfo (  ) 

This function updates the contents of the System Configuration DB for the host information

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeProjectComponents ( int &  restartProject  ) 

This function synchronizes the list of components in the current project and in the System Configuration and exports the current list of components installed in the project to the DB. The synchronization depends on the management mode of the project:

  • if the project is locally managed, no synchronization is done. Only the current list of components in the System Configuration DB is updated with the list of components in the local project.
  • if the project is centrally managed, the DB-Agent of the installation tool uninstalls and/or uninstalls all components such that the list of components installed in the project reflects the contents of the system configuration DB.
Parameters:
restartProject flag indicating if project restart is required. Possible values are:

0: project restart is not required

1: project restart required

2: project restart not required but post-installation scripts must be run

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeProjectInfo (  ) 

This function updates the contents of the System Configuration DB for the project information

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeProjectManagers (  ) 

This function updates the contents of the System Configuration DB for the project managers

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizeProjectPaths (  ) 

This function synchronizes the list of project paths in the current project and in the System Configuration. The synchronization depends on the management mode of the project:

  • if the project is locally managed, the contents of the system confiuguration db are updated with the list of project paths currently defined in the project.
  • if the project is centrally managed, the DB-Agent of the installation tool modifies the list of project paths defined in the local project to reflect the contents of the system configuration DB.
Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_synchronizePvssSetupInfo (  ) 

This function updates the contents of the System Configuration DB for the PVSS setup information

Returns:
0 if OK, -1 if errors
int fwInstallationDBAgent_unregisterProjectPaths ( string  projectName = "",
string  computerName = "" 
)

This function unregisters all project paths from the System Configuration DB for a particular project

Parameters:
projectName name of the PVSS project
computerName hostaname where the project runs
Returns:
0 if OK, -1 if errors

Variable Documentation

const string gFwInstallationAgentLibVersion = "5.0.0"

Version of this library. Used to determine the coherency of all libraries of the installtion tool

 All Files Functions Variables