Scripted Rolling Upgrade

MapR 4.0.x and higher supports scripted rolling upgrades of a cluster. Do not try to use this type of upgrade to upgrade specific nodes.

If you are upgrading from a version earlier than 4.0.x, upgrade MapR core manually and offline. The rolling upgrade process is designed to upgrade the core packages on all nodes on the cluster in a single operation. Packages are propagated and installed across the nodes while the cluster remains online and operational.

You can monitor the progress of the whole upgrade process by running the MCS on any node that is not currently in maintenance mode (being upgraded). The manual rolling upgrade procedure reflects what the script does.

The upgrade utility is extracted from a setup file and requires a tar file that contains all of the packages. You do not have to have Internet connectivity to run the upgrade if the setup file and the tar file are already downloaded. You do not need to configure a repository for these files.

SSH Mode

Rolling upgrades run only in SSH mode, using either key-based (passwordless) authorization or password-based access for remote access to all of the nodes. The upgrade utility copies the archive file to the other nodes on the cluster that you are upgrading and runs similar commands on each node, using a root or sudo user account specified in the upgrade command.

See Preparing Each Node for more information about setting up passwordless SSH.

Before You Upgrade

You can run the same rolling upgrade process on secure and non-secure clusters; however, on a secure cluster, the MapR Admin user must have a security ticket created before running the upgrade. Otherwise the upgrade commands will not run.

The cluster continues to run at the highest capacity possible during the upgrade process.

Note: If your cluster uses RM HA and the standby RM is on a CLDB node, the active RM node will be upgraded before the standby RM node.
To reduce the impact on any jobs that are running during the upgrade, set the following parameters to a number that is greater than the number of ResourceManagers in the cluster:

See ResourceManager Configuration Properties for details about these parameters.

You do not need to shut down any services before running a rolling upgrade. As nodes are upgraded, they go into maintenance mode and warden is shut down, which shuts down other services, including any ecosystem components. Rolling upgrades do not upgrade packages for Hadoop ecosystem components. Upgrading the ecosystem is a separate upgrade step. Only MapR core packages are upgraded; however, when an upgraded node comes back online, warden restarts ecosystem components that are compatible with the new release. Incompatible ecosystem components will fail to come up until they are upgraded separately.

See Hadoop ecosystem components for details about upgrading those components. See Packages and Dependencies for MapR Software for a list of the MapR packages and Hadoop ecosystem packages.

Upgrade Command Options

The rolling upgrade procedure uses the upgrade command described in this section. Run upgrade -h to display the usage for the upgrade utility:

# /opt/mapr-installer/bin/upgrade -h
usage: [-h] [-s] [-U SUDO_USER] [-u REMOTE_USER]
[--private-key PRIVATE_KEY_FILE] [-k] [-K]
[--password REMOTE_PASS] [--sudo-password SUDO_PASS]
[--mapr-admin ADMIN_USER] [--archive-file ARCHIVE_FILE]
[--upgrade-to UPGRADE_TO] [--ssh-port SSH_PORT]

The utility supports the following options:

Option Description
-h or --help Display the syntax and usage for the utility.
-s or --sudo Run operations as sudo, without submitting a password. This option means that after initial login, the upgrade process should use sudo to run commands. The -U option identifies the specific sudo user for the upgrade script to run as.
-U SUDO_USER Run the upgrade as a user with sudo privileges. The default account is sudo.
--sudo-password SUDO_PASS
Specify the remote sudo password. All nodes must accept the same username and password.
-u REMOTE_USER Connect with a remote user account that exists on all of the nodes.
--password REMOTE_PASS
Specify the remote SSH password. All nodes must accept the same username and password. Specifying a remote password and specifying a private key file are mutually exclusive options. Do not attempt to run the upgrade command with both sets of credentials.
--private-key PRIVATE_KEY_FILE 
Use key-based SSH on clusters that require or are configured for key-based authentication across nodes, such as cloud-based deployments. Specifying a remote password and specifying a private key file are mutually exclusive options. Do not attempt to run the upgrade command with both sets of credentials.
-k or --ask-pass Prompt for the SSH password. All nodes must accept the same username and password.
-K or --ask-sudo-pass Prompt for the sudo password. All nodes must accept the same username and password.
Delay the upgrade until all running MRv1 jobs are complete.
--mapr-admin ADMIN_USER
Specify the MapR Admin user account on the cluster if it is not mapr (the default).
--archive-file <path-to-file>

Full path to the tar file that you downloaded, which contains the upgrade packages. For example:


You must specify the full path to this file.


Version of MapR software that you are upgrading to.

The --upgrade-to value and the version of the packages in the downloaded archive file must match.

--ssh-port Remote SSH port. If your SSH ports are set to non-22 values for security reasons, specify the SSH port. All nodes in the cluster must be set to the same SSH port number for upgrade to succeed.

Credential Input

The rolling upgrade script offers two choices for SSH user authorization:
  • private-key-based (passwordless) authorization
  • password-based access.

The upgrade process supports various combinations of login and remote user credentials and the ability to provide these credentials either on the command line or interactively (via prompts). The following sections describe a few examples.

Upgrade as the root user

This is a simple example of running the upgrade as root. The root username and password are specified in the command line:

# /opt/mapr-installer/bin/upgrade -u root --password ******** --archive-file ....
Upgrade as a non-root user

This example specifies the remote user account (-u) and the root user (-U) on the command line. This example assumes that a password is required for the sudo user.

$ /opt/mapr-installer/bin/upgrade -u bobr_ubuntu -U root -s --sudo-password ******** --archive file ....

Upgrade using a private key

This example uses a private key instead of a password to access the nodes.

$ /opt/mapr-installer/bin/upgrade -u bobr_amazon -U root -s --sudo-password ******** --private-key .... --archive file ....

Rolling Upgrade Logs

The rolling upgrade process logs its output to the following file:


The log includes the regular output of the upgrade utility as well as other detailed information that is provided for support use.

Next Step

Go to Configuring the New Version.