Enum StartupStage
- java.lang.Object
-
- java.lang.Enum<StartupStage>
-
- jetbrains.buildServer.maintenance.StartupStage
-
- All Implemented Interfaces:
Serializable
,Comparable<StartupStage>
public enum StartupStage extends Enum<StartupStage>
Stage of TeamCity startup.- Since:
- 7.1
- Author:
- Leonid Bushuev from JetBrains
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_STARTING
Starting Spring.ASK_NODE_TYPE
Ask for TeamCity node type in case of starting node without initalized data directory but with specified node id.BACKUP
Backup of old-version data before upgrade.BACKUP_FILE_CHECKING
Checking the backup structure, version.COPIED_OR_MOVED_INSTALLATION_SCREEN
Server move or copy detected (there is no stored record with current UUID or the stored record contains different data directory)CORRUPTED_INSTALLATION
When we find some files from the previous version TW-17256CREATE_NEW_DATA_DIR
Creating and initializing Data Directory.CREATE_NEW_DB
Creating a new database.DB_CHECKING
Checking the database structure and getting the version.DB_CONNECT
Try to connect to the database.DB_CONNECT_CONTINUE
When the database is not responding, we're assuming that it is not started yet and repeating connecting attempts every several seconds.DB_SETTINGS_SCREEN
Database connection settings.DOWNLOADING_JDBC_DRIVERS
JDBC drivers are being downloaded.END
EXCEPTION
The startup automata falls down to this stage when one of other stages has thrown an exception.FATAL_ERROR
The system failed to start at very beginning.FIRST_START_SCREEN
Showing first start greatings and asking the user for the Data Directory path confirmation.INITIAL_STAGE
The initial state.LOOKING_FOR_DATA_DIR
Looking for the Data Directory.LOOKING_FOR_DB_SETTINGS
Looking for the database configuration file, and attempting to detect an internal database if no.MAIN_SERVER_OF_A_DIFFERENT_VERSION_ERROR
When we are going to start second node, but there is running main server of a different version.MAIN_SERVER_WITH_DIFFERENT_DATA_DIRECTORY
When we are going to start second node, but there is running main server working with the same DB but different Data Directory.OTHER_NODE_WITH_DIFFERENT_DATA_DIRECTORY
When we are going to start main server, but there is running second node working with the same DB but different Data Directory.OTHER_NODE_WITH_SAME_ID_IS_ACTIVE
There is an active node with the same node idOUTDATED_SECONDARY_NODE
Secondary TeamCity node (read-only or messages processing node) is started against the Data Directory of more recent version.PROCESS_DATA_DIR_SELECTED_BY_USER
Processing data directory selected by user during first startREADY
The startup phase is completed.RECREATE_DB_SCREEN
When neither database properties file nor internal database found - asking a user whether they want to create a brand new one.RESTORE
Restore database and settings from backup.RESTORE_DATABASE_SETTINGS_SCREEN
Target database connection settings.RESTORE_DB_CHECKING
Checking the target database is empty.RESTORE_SETTINGS_SCREEN
Restore settings.SECOND_INSTANCE
When another TeamCity is already running with this database.SHUTTING_DOWN
TEAMCITY_NODE_ID_NOT_SPECIFIED
When node without condifugred TeamCity node id parameter is starting as secondary node according to nodes-config fileUPGRADE
Data upgrade.UPGRADE_SCREEN
Asking for the data upgrade confirmation.WAITING_FOR_DATA_DIRECTORY_INITIALIZATION
When we are waiting for main server to perform server initialization for the first timeWAITING_FOR_OTHER_NODE_SHUTDOWN
When we are going to start main node, but there is running another node of the different version.WAITING_FOR_UPGRADE_END
When we are waiting for other node to perform db upgradeWAITING_FOR_UPGRADE_LOCK
When we are going to perform db upgrade, but can't take exclusive db lock (other nodes are using server)XMX_WARNING
xmx warning stage.
-
Field Summary
Fields Modifier and Type Field Description boolean
active
Stage is active - that means the system does some startup/maintenance work during this stage.boolean
adminRequires
Means the system is asking something from a system administrator.String
description
Human-readable description what does the stage do.String
iconCode
Icon code.String
page
Page name.boolean
shuttingDown
Means that the system is in its shut down sequence.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StartupStage
valueOf(String name)
Returns the enum constant of this type with the specified name.static StartupStage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INITIAL_STAGE
public static final StartupStage INITIAL_STAGE
The initial state. It is the only stage that works in the servlet initial thread; all other stages work in a special separate startup threads.Note: some of fields in the
StartupContext
are not initialized yet.Immediately followed by
LOOKING_FOR_DATA_DIR
.
-
FATAL_ERROR
public static final StartupStage FATAL_ERROR
The system failed to start at very beginning. It can occur if the logging is not initialized, or a problem with binaries, or something related.The system is not initialized because of failed to initialize the logging engine. TeamCity could not work without logging, see TW-24753.
Note: some of fields in the
StartupContext
can be uninitialized.
-
LOOKING_FOR_DATA_DIR
public static final StartupStage LOOKING_FOR_DATA_DIR
Looking for the Data Directory.This is the 2nd stage. Immediately followed by either of these steps:
FIRST_START_SCREEN
— if this is the 1st start-up, and "database.properties" doesn't exist.CREATE_NEW_DATA_DIR
— if this is the 1st start-up, and "database.properties" exists.LOOKING_FOR_DB_SETTINGS
— if this is a regular start of the configured TeamCity instance.XMX_WARNING
— if this is a regular start of the configured TeamCity instance but there found low configured xmx value.TEAMCITY_NODE_ID_NOT_SPECIFIED
— if this is a regular start of the configured TeamCity instance but the node is starting as secondary node without specified node ID.
-
XMX_WARNING
public static final StartupStage XMX_WARNING
xmx warning stage.The stage shows the server memory configuration warning in case when xmx has not default value, the OS system is windows and xmx < 1300mb show a warning about switching to x64 JDK.
followed by
LOOKING_FOR_DB_SETTINGS
step
-
WAITING_FOR_DATA_DIRECTORY_INITIALIZATION
public static final StartupStage WAITING_FOR_DATA_DIRECTORY_INITIALIZATION
When we are waiting for main server to perform server initialization for the first time
-
FIRST_START_SCREEN
public static final StartupStage FIRST_START_SCREEN
Showing first start greatings and asking the user for the Data Directory path confirmation.1st start-up, "database.properties" doesn't exist. Immediately followed by
PROCESS_DATA_DIR_SELECTED_BY_USER
.
-
PROCESS_DATA_DIR_SELECTED_BY_USER
public static final StartupStage PROCESS_DATA_DIR_SELECTED_BY_USER
Processing data directory selected by user during first start1st start-up, "database.properties" doesn't exist. Immediately followed by either
DB_SETTINGS_SCREEN
(regular start),ASK_NODE_TYPE
(in case of starting node with id but without data directory) orEXCEPTION
(failure to create the data directory or any of its subdirectories).
-
ASK_NODE_TYPE
public static final StartupStage ASK_NODE_TYPE
Ask for TeamCity node type in case of starting node without initalized data directory but with specified node id.
-
CREATE_NEW_DATA_DIR
public static final StartupStage CREATE_NEW_DATA_DIR
Creating and initializing Data Directory.Immediately followed by
CREATE_NEW_DB
.
-
LOOKING_FOR_DB_SETTINGS
public static final StartupStage LOOKING_FOR_DB_SETTINGS
Looking for the database configuration file, and attempting to detect an internal database if no.Regular start-up of a configured TeamCity instance. Immediately followed by either of these steps:
DB_CONNECT
(normal start-up).RECREATE_DB_SCREEN
(recoverable error) — if "database.properties" doesn't exist or the target database is empty.EXCEPTION
(fatal error) — if "database.properties" doesn't exist and, additionally, data versions are inconsistent across the currently running TeamCity instance and the data directory (unable to either re-create the database or proceed with an upgrade).
-
RECREATE_DB_SCREEN
public static final StartupStage RECREATE_DB_SCREEN
When neither database properties file nor internal database found - asking a user whether they want to create a brand new one.Regular start-up of a configured TeamCity instance, recoverable error. Immediately followed by either of these steps:
DB_SETTINGS_SCREEN
— if "database.properties" doesn't exist.CREATE_NEW_DB
— if the target database is empty.
-
DB_SETTINGS_SCREEN
public static final StartupStage DB_SETTINGS_SCREEN
Database connection settings.Either the 1st start-up or a recoverable error, "database.properties" doesn't exist. Immediately followed by either of these steps:
CREATE_NEW_DB
— if "Proceed" button is clicked, and the necessary JDBC driver is already available.DOWNLOADING_JDBC_DRIVERS
— if "Refresh JDBC drivers" button is clicked, and the necessary JDBC driver is not yet available.
-
CREATE_NEW_DB
public static final StartupStage CREATE_NEW_DB
Creating a new database.Immediately followed by either of these steps:
DB_SETTINGS_SCREEN
— if this is the 1st start-up, and the database is unreachable or unusable for some reason (e. g.: database instance down, wrong password or non-empty database schema). This is a return to the previous screen in case of a recoverable error.DB_CONNECT_CONTINUE
— 1st start-up, "database.properties" exists but the target database is not yet up (see TW-53631).APPLICATION_STARTING
— 1st start-up, database is available.EXCEPTION
— 1st start-up, "database.properties" exists but the corresponding JDBC driver does not, nor can be downloaded.
-
DB_CONNECT
public static final StartupStage DB_CONNECT
Try to connect to the database.Regular start-up of a configured TeamCity instance. Immediately followed by either of these steps:
DB_CHECKING
(normal start-up).DB_CONNECT_CONTINUE
(recoverable error) — if the database is not yet available.EXCEPTION
(fatal error) — if JDBC driver is missing and can't be downloaded.
-
DB_CONNECT_CONTINUE
public static final StartupStage DB_CONNECT_CONTINUE
When the database is not responding, we're assuming that it is not started yet and repeating connecting attempts every several seconds.Immediately followed by either of these steps:
CREATE_NEW_DB
(1st start-up, see TW-53631).DB_CHECKING
(normal start-up).
-
DB_CHECKING
public static final StartupStage DB_CHECKING
Checking the database structure and getting the version.Immediately followed by either of these steps:
APPLICATION_STARTING
(normal start-up).UPGRADE_SCREEN
(normal start-up, data upgrade pending).RECREATE_DB_SCREEN
(recoverable error) — if the target database is empty.EXCEPTION
(fatal error) — if TeamCity fails to upgrade because data versions are different across the data directory and the database.
-
SECOND_INSTANCE
public static final StartupStage SECOND_INSTANCE
When another TeamCity is already running with this database.
-
CORRUPTED_INSTALLATION
public static final StartupStage CORRUPTED_INSTALLATION
When we find some files from the previous version TW-17256
-
OUTDATED_SECONDARY_NODE
public static final StartupStage OUTDATED_SECONDARY_NODE
Secondary TeamCity node (read-only or messages processing node) is started against the Data Directory of more recent version.
-
WAITING_FOR_UPGRADE_LOCK
public static final StartupStage WAITING_FOR_UPGRADE_LOCK
When we are going to perform db upgrade, but can't take exclusive db lock (other nodes are using server)
-
WAITING_FOR_OTHER_NODE_SHUTDOWN
public static final StartupStage WAITING_FOR_OTHER_NODE_SHUTDOWN
When we are going to start main node, but there is running another node of the different version.
-
MAIN_SERVER_OF_A_DIFFERENT_VERSION_ERROR
public static final StartupStage MAIN_SERVER_OF_A_DIFFERENT_VERSION_ERROR
When we are going to start second node, but there is running main server of a different version.
-
OTHER_NODE_WITH_SAME_ID_IS_ACTIVE
public static final StartupStage OTHER_NODE_WITH_SAME_ID_IS_ACTIVE
There is an active node with the same node id
-
OTHER_NODE_WITH_DIFFERENT_DATA_DIRECTORY
public static final StartupStage OTHER_NODE_WITH_DIFFERENT_DATA_DIRECTORY
When we are going to start main server, but there is running second node working with the same DB but different Data Directory. Or vice-versa
-
MAIN_SERVER_WITH_DIFFERENT_DATA_DIRECTORY
public static final StartupStage MAIN_SERVER_WITH_DIFFERENT_DATA_DIRECTORY
When we are going to start second node, but there is running main server working with the same DB but different Data Directory.
-
WAITING_FOR_UPGRADE_END
public static final StartupStage WAITING_FOR_UPGRADE_END
When we are waiting for other node to perform db upgrade
-
TEAMCITY_NODE_ID_NOT_SPECIFIED
public static final StartupStage TEAMCITY_NODE_ID_NOT_SPECIFIED
When node without condifugred TeamCity node id parameter is starting as secondary node according to nodes-config file
-
UPGRADE_SCREEN
public static final StartupStage UPGRADE_SCREEN
-
BACKUP
public static final StartupStage BACKUP
Backup of old-version data before upgrade.Immediately followed by
UPGRADE
.
-
UPGRADE
public static final StartupStage UPGRADE
Data upgrade.Immediately followed
APPLICATION_STARTING
.
-
RESTORE_SETTINGS_SCREEN
public static final StartupStage RESTORE_SETTINGS_SCREEN
Restore settings.1st start-up. Immediately followed by either of these steps:
BACKUP_FILE_CHECKING
(normal start-up).
-
BACKUP_FILE_CHECKING
public static final StartupStage BACKUP_FILE_CHECKING
Checking the backup structure, version. Parse database connection settings for the following stage. Unpack jdbc libs if they are exist in backup.1st start-up. Immediately followed by either of these steps:
RESTORE_DATABASE_SETTINGS_SCREEN
(normal start-up).RESTORE_SETTINGS_SCREEN
if the specified backup file is invalid.EXCEPTION
(fatal error)
-
RESTORE_DATABASE_SETTINGS_SCREEN
public static final StartupStage RESTORE_DATABASE_SETTINGS_SCREEN
Target database connection settings. Define database to be restored to.1st start-up. Immediately followed by either of these steps:
RESTORE
— if "Proceed" button is clicked, and the necessary JDBC driver is already available.DOWNLOADING_JDBC_DRIVERS
— if "Refresh JDBC drivers" button is clicked, and the necessary JDBC driver is not yet available.
-
RESTORE_DB_CHECKING
public static final StartupStage RESTORE_DB_CHECKING
Checking the target database is empty.Immediately followed by either of these steps:
RESTORE
(normal start-up).RESTORE_DATABASE_SETTINGS_SCREEN
if the specified database setings is invalid or database is not empty.
-
RESTORE
public static final StartupStage RESTORE
Restore database and settings from backup.1st start-up. Immediately followed by either of these steps:
LOOKING_FOR_DATA_DIR
(normal start-up) if restore completed successfully.RESTORE_SETTINGS_SCREEN
if restore failed.
-
COPIED_OR_MOVED_INSTALLATION_SCREEN
public static final StartupStage COPIED_OR_MOVED_INSTALLATION_SCREEN
Server move or copy detected (there is no stored record with current UUID or the stored record contains different data directory)
-
APPLICATION_STARTING
public static final StartupStage APPLICATION_STARTING
Starting Spring.Immediately followed
READY
.
-
READY
public static final StartupStage READY
The startup phase is completed.
-
EXCEPTION
public static final StartupStage EXCEPTION
The startup automata falls down to this stage when one of other stages has thrown an exception.
-
SHUTTING_DOWN
public static final StartupStage SHUTTING_DOWN
-
END
public static final StartupStage END
-
DOWNLOADING_JDBC_DRIVERS
public static final StartupStage DOWNLOADING_JDBC_DRIVERS
- Since:
- 2018.1
-
-
Field Detail
-
active
public final boolean active
Stage is active - that means the system does some startup/maintenance work during this stage.
-
adminRequires
public final boolean adminRequires
Means the system is asking something from a system administrator. So the system shows a special maintenance form and waitin for the adminsitrator to type some information and submit it.
-
shuttingDown
public final boolean shuttingDown
Means that the system is in its shut down sequence.
-
page
@NotNull public final String page
Page name.It is the name of FreeMarker template file, without extensions.
-
description
@NotNull public final String description
Human-readable description what does the stage do.
-
iconCode
@NotNull public final String iconCode
Icon code.The code that is used to define a CSS class to show an icon.
-
-
Method Detail
-
values
public static StartupStage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StartupStage c : StartupStage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StartupStage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-