MEMSQL-UPGRADE

On this page

Available since MemSQL Ops version 4.1.8.

Stop, upgrade, and restart all SingleStore nodes in the cluster.

Usage

usage: memsql-ops memsql-upgrade [--settings-file SETTINGS_FILE] [--async]
[--file-path FILE_PATH | --version VERSION | --version-hash VERSION_HASH]
[--no-prompt] [--restart-on-rollback]
[--skip-snapshot] [--skip-version-check]
[--backup-data-directories | --no-backup-data-directories]
[--stop-timeout STOP_TIMEOUT]
Stop, upgrade, and restart all SingleStore nodes in the cluster.
optional arguments:
--settings-file SETTINGS_FILE
A path to a MemSQL Ops settings.conf file. If not set,
we will use the file in the same directory as the
MemSQL Ops binary.
--async If this option is true, we will exit without waiting
for the cluster to be fully upgraded.
--file-path FILE_PATH
A .tar.gz file that contains a SingleStore binary to use
during the upgrade.
--version VERSION The SingleStore version to which all nodes will be upgraded
(e.g. 7.1). If this is not set, we will attempt to
upgrade all nodes to the latest available SingleStore
version.
--version-hash VERSION_HASH
A SingleStore version hash to use.
--no-prompt If this option is specified, we will upgrade the
cluster without prompting. We will also assume
--backup-data-directories is set to true unless
otherwise specified.
--restart-on-rollback
In the event of an upgrade failure and rollback,
restart the cluster. The default behavior without this
flag is to leave the rolled-back cluster in a stopped
state.
--skip-snapshot Do not run SNAPSHOT on all the databases in the
cluster before upgrading. This may cause the upgrade
to take longer.
--skip-start Do not start the cluster after upgrade.
--skip-version-check Do not check that the SingleStore version specified is
higher than the installed SingleStore version. This flag
only applies to maintenance release upgrades.
--backup-data-directories
Backup data directories during the upgrade. If both
this and --no-backup-data-directories are not
specified, we will prompt before the upgrade.
--no-backup-data-directories
Do not backup data directories during the upgrade.
Specifying this option will result in faster upgrades
and will use less disk space during the upgrade at the
risk of data loss. If both this and --backup-data-
directories are not specified, we will prompt before
the upgrade.
--stop-timeout STOP_TIMEOUT
Number of seconds to wait for the SingleStore nodes to
stop. The default is 120 seconds.

Remarks

It is important to understand that an upgrade with memsql-ops memsql-upgrade installs a new version of SingleStore to a different path instead of overwriting the existing installation. Specifically, MemSQL Ops appends the last 10 digits of the randomly-generated memsql_install_id – a string that is created each time SingleStore is updated or installed – to the end of the installation directory name. For example: master-3306-FMGUB04J8R instead of master-3306. The older installation directory is deleted after a successful upgrade, leaving just the new path (i.e. master-3306-FMGUB04J8R).

By using a different directory to upgrade, the installation process can be safely rolled back, since the upgrade process does not modify any of the files in the older version’s directory.

The —skip-start flag is useful for preventing rollback of upgrades if a cluster takes a long time (eg. Lots of data) and may hit the timeout. When this flag is used, the upgrade is considered finished when the cluster is upgraded instead of when the cluster has recovered. Use of this flag requires that the cluster be started manually after the upgrade.

Any custom scripts using a hardcoded path to the SingleStore installation directory should be updated to reflect the change of the installation directory caused by the upgrade, or, ideally, should use the memsql-path command instead of a hardcoded path. For more information, see MEMSQL-PATH.

Last modified: April 25, 2023

Was this article helpful?