How to deregister a SUSE Manager Client
This document (7013242) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Manager 4.3 Server
SUSE Manager 4.2 Server
SUSE Manager 4.1 Server
Situation
Deleting Client systems can be initialized from the SUSE Manager, but manual cleanup on the client system itself may be necessary (see additional information below).
Please notice most of this article does not apply to Red Hat Expanded Support systems. This process should NOT be followed for clients running Red Hat OS (see additional information below).
Resolution
Deleting Clients (SUSE Manager WebUI):
https://documentation.suse.com/suma/4.3/en/suse-manager/client-configuration/delete-clients.htmlDeleting Clients (SUSE Manager CLI):
spacecmd system_delete FQDN
salt-key -d FQDN
Note: For very specific cases, the registration might still not be possible after having deregistered the minion. As a last result, a couple of salt files should be deleted in the master before trying to register again:
rm /var/cache/salt/master/thin/version
rm /var/cache/salt/master/thin/thin.tgz
Salt Client - Manual Registration Cleanup
NOTE: This process should NOT be followed for clients running Red Hat OS.
Stop the salt-minion service:
SLES 12/15:
systemctl stop salt-minion
SLES 11:
rcsalt stop
Remove the repositories and configuration files:
rm /etc/zypp/repos.d/susemanager\:channels.repo
rm -r /etc/sysconfig/rhn/
rm -r /etc/salt/
zypper rm -u salt salt-minion python*-salt sle-manager-tools-release
(Alternatively, you can use rpm to remove the 4 corresponding packages.)SLES 15 (uses python3-salt):
rpm -e salt salt-minion python3-salt sle-manager-tools-release
SLES 11/12 (uses python2-salt):
rpm -e salt salt-minion python2-salt sle-manager-tools-release
Salt Bundle Client - Manual Registration Cleanup
For information about the salt bundle, see: https://documentation.suse.com/suma/4.3/en/suse-manager/client-configuration/contact-methods-saltbundle.html
To de-register, you could run:
# systemctl stop venv-salt-minion; zypper rm -y venv-salt-minion; rm -rf /etc/zypp/{credentials,services,repos}.d/* /etc/venv-salt-minion/*
Traditional Client - Manual Cleanup
NOTE: This process is only for SUSE Manager clients, do not run it on the SUSE Manager itself.NOTE: This process should NOT be followed for clients running Red Hat OS.
Stop the osad service (If it is in use):
systemctl stop osad
SLES 11:
rcosad stop
In order to deregister a SUSE Manager client, several rpms must be removed. The following method should be tried first (in case there is no osad package, it should be omitted):
zypper rm -u spacewalksd spacewalk-check zypp-plugin-spacewalk spacewalk-client-tools osad python2-zypp-plugin-spacewalk python2-spacewalk-check python2-spacewalk-client-setup
This will show the following:
Refreshing service 'spacewalk'.
Resolving package dependencies...
The following packages are going to be REMOVED:
spacewalk-check spacewalk-client-setup spacewalksd zypp
plugin-python osad
5 packages to remove.
After the operation, 301.0 KiB will be freed.
Continue? [y/n/?] (y):
If this fails, they should be manually removed. The commands "rpm -e" should not be used unless the "zypper rm" command above failed.
rpm -e spacewalk-client-setup spacewalksd spacewalk-check zypp-plugin-spacewalk osad python2-zypp-plugin-spacewalk python2-spacewalk-check python2-spacewalk-client-setup
After this is complete, the following file should be removed: /etc/sysconfig/rhn/systemid.
rm /etc/sysconfig/rhn/systemid
Any configured spacewalk channels should be deleted with:
If any repositories pointing to spacewalk still exist, remove them using the following:
zypper repos -d
zypper removerepo <ID of the repo in the output from previous command>
Cause
Additional Information
In some cases the sle-manager-tools.prod file needs to be moved out of the directory: /etc/products.d/
This can be done as well, by removing the sle-manage-tools-release package.
The following error is an indication that the prod file exists and impedes registration and migration of the client.
Can't get available migrations from server: SUSE::Connect::ApiError: The requested products 'SUSE Manager Client Tools for SLE 15 x86_64' are not activated on the system.
'/usr/lib/zypper/commands/zypper-migration' exited with status 1
Note about clients running Red Hat OS: This process should NOT be followed for clients running Red Hat OS. For such clients, de-registering from SUSE Manager webUI, deleting repositories with yum and deleting /etc/sysconfig/rhn/systemid should be enough.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7013242
- Creation Date: 10-Sep-2013
- Modified Date:15-Nov-2023
-
- SUSE Manager
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com