When upgrading Salt, the master(s) should always be upgraded first. Running minions with versions of Salt newer than their masters is not guaranteed to function as expected since the minion may include changes not yet available in the master. Also, whenever possible, backward compatibility between new masters and old minions will be preserved. Generally, the only exception to this policy is in case of a security vulnerability.
Salt can be upgraded either through your distribution's package manager or via PyPI if you have installed Salt via pip, the package installer for Python.
Note for SaltStack Enterprise users: If you initially installed Salt using Salt Crystal, you must also upgrade to later versions using Salt Crystal. For more information, see How to Upgrade Salt Crystal.
You can verify your installed version of Salt in a few ways:
rpm -qi salt
dpkg-query -l salt\*
yum list installed salt\*
salt --versions-report
salt-call --local test.versions_report
To check whether your version is supported or not please visit https://saltproject.io/salt-platform-support/ .
Before upgrading your Salt minion or master, it’s a good idea to create a backup of your /etc/salt directory. Creating a copy of the directory will create backups of the configurations as well as the minion and master keys. If you have altered your configuration to use alternative directories, you may consider backing those up as well. Once you are satisfied that you have valid backup the next step will update your package manager's repository configuration.
We generally recommend configuring your package manager to point to the latest release so that you are always up to date. Instructions for adding and configuring the SaltStack repository for your distribution can be found at https://repo.saltproject.io . Once on the page, you will find instructions for your supported operating system under the appropriate header. Each section has instructions for configuring your package manager for the latest version, the latest version of a specific major release, or to a specific minor version.
NOTE: Before attempting to upgrade your packages you may need to stop the Salt master daemon or minion daemon.
To reconfigure your repository from a pinned release to the latest release, you can either update the appropriate .repo file or uninstall the existing repo RPM and install the latest repo RPM listed on https://repo.saltproject.io/#rhel.
For more information on configuring YUM repositories, you should refer to your distribution's documentation.
To reconfigure your repository from a previously pinned release to the latest release you will just need to update to sources configuration from the existing source to the latest source listed on https://repo.saltproject.io/#ubuntu, or https://repo.saltproject.io/#debian.
With Salt now updated, you will want to verify your configuration is intact restore if necessary. Then, if you stopped the daemon(s) prior to upgrading, you will need to restart the daemons.