salt-pip error while upgrading master plugin - cannot assign to field 'platlib'
search cancel

salt-pip error while upgrading master plugin - cannot assign to field 'platlib'

book

Article ID: 416153

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

Running into the following error while attempting to upgrade the master plugin on one of our Salt masters.

salt-pip install /path/to/master_plugin/SSEAPE-8.17.0.30-py3-none-any.whl
Processing /path/to/master_plugin/SSEAPE-8.17.0.30-py3-none-any.whl
Requirement already satisfied: cryptography>=3.1.1 in /opt/saltstack/salt/extras-3.10 (from SSEAPE==8.17.0.30) (42.0.8)
Requirement already satisfied: pika<1.4,>=1.2.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from SSEAPE==8.17.0.30) (1.3.2)
Requirement already satisfied: pyjwt>=2.3.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from SSEAPE==8.17.0.30) (2.8.0)
Requirement already satisfied: cffi>=1.12 in /opt/saltstack/salt/extras-3.10 (from cryptography>=3.1.1->SSEAPE==8.17.0.30) (1.17.1)
Requirement already satisfied: pycparser in /opt/saltstack/salt/extras-3.10 (from cffi>=1.12->cryptography>=3.1.1->SSEAPE==8.17.0.30) (2.22)
Installing collected packages: SSEAPE
[notice] A new release of pip is available: 25.0.1 -> 25.2
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip
ERROR: Exception: Traceback (most recent call last):
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/cli/base_command.py", line 106, in _run_wrapper
    status = _inner_run()
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/cli/base_command.py", line 97, in _inner_run
    return self.run(options, args)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 639, in wrapper
    return func(self, options, args)
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/commands/install.py", line 458, in run
    installed = install_given_reqs(
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/req/__init__.py", line 70, in install_given_reqs
    requirement.install(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 768, in wrapper
    return func(
  File "/opt/saltstack/salt/extras-3.10/pip/_internal/req/req_install.py", line 818, in install
    scheme = get_scheme(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 674, in wrapper
    scheme.platlib = TARGET.PATH
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'platlib'

Environment

Salt 3006+

Aria Config 8.17+

Cause

This issue may be caused after upgraded from an older version of Salt to Salt 3006+. Salt 3006.x introduces relenv as the running environment for Salt and moves away from using the system provided Python. 

Resolution

Process to Manage SaltStack Installation

⚠ Important Note: For this process, it's best to download the **RPMs or DEB files** for your system before proceeding any further. See https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/index.html for more information on how to download these packages from https://packages.broadcom.com.


Process to Remove Salt Entirely

  1. Stop the Salt master daemon.
  2. Stop the Salt minion daemon.
  3. Backup the Salt configuration (typically the contents of the /etc/salt/ directory).
  4. Remove all Salt packages from the system using the native package manager (e.g., dnf remove or apt remove).
  5. Run a find command to find and remove any remaining directories called salt (e.g., caches, logs).
  6. Run a find command to find and remove any remaining directories related to SSEAP* (e.g., SSEAP* directories).

Process to Reinstall Salt

  1. Install Salt from your previously downloaded packages.
  2. Stop the Salt master and **minion** daemons if they were automatically started during installation.
  3. Restore the backed-up Salt configuration.
  4. Reinstall the master plugin:
    • This plugin may need to be downloaded from the User interface.
  5. Start the Salt master daemon.
  6. It may sometimes be necessary to re-authenticate Salt to Aria Config after this process.

If this process does not resolve your issue, then please contact support for further guidance.

Additional Information

Depending on your environment and the version of master plugin you are upgrading from, it may also be a good idea to generate a new master plugin configuration and update your configuration. You can generate new configuration in the following steps before you start the master and after you restore the old the configuration:

  1. /opt/saltstack/salt/extras-3.10/bin/sseapi-config --ext-modules > /etc/salt/master.d/eAPIMasterPaths.conf
  2. /opt/saltstack/salt/extras-3.10/bin/sseapi-config --default-config > /etc/salt/master.d/raas_new

Now edit the existing /etc/salt/master.d/raas_new file and update it with the necessary settings to connect to the RaaS daemon and any tuning you may have done in your previous configuration. Once complete, you can overwrite the existing /etc/salt/master.d/raas.conf with this new file. Then start the Salt master daemon.