SUSE Support

Here When You Need Us

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

A client system is registered to SUSE Manager, but needs to be deregistered.

Deleting Client systems can be initialized from SUSE Manager, but manual cleanup on the client system itself may be necessary (see additional information below). 

Please note 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.html
 

Deleting 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 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 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/

 
Remove Client Packages:
 

     zypper rm -u salt salt-minion python*-salt sle-manager-tools-release

 

Alternatively, "rpm" can be used 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 deregister, one 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/ /etc/sysconfig/rhn/*

 

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):

 

SLES 12: 

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'. 

Loading repository data...

Reading installed packages...
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):
 

The above rpm packages are client specific, and should be removed.
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
 

On SLES 15 client remove below packages if installed:

 

rpm -e spacewalk-client-setup mgr-daemon spacewalk-check zypp-plugin-spacewalk mgr-osad python3-zypp-plugin-spacewalk python3-spacewalk-check python3-spacewalk-client-setup


After this is complete, the following file should be removed: /etc/sysconfig/rhn/systemid.

That file only exists on a client machine and is used to register itself with SUSE Manager.


rm /etc/sysconfig/rhn/systemid
 

Any configured spacewalk channels should be deleted with:

 

rm /etc/zypp/repos.d/spacewalk*
 

When this is done, the repositories should be refreshed on the server ("zypper ref -s"), and then listed ("zypper lr"), in order to make sure everything looks good.

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

Sometimes when moving a client system to a new server, or for troubleshooting purposes, you may want to manually deregister the SUSE Manager client system. 

Additional Information

Clients can be deleted from the SUSE Manager Server. SUSE Manager can delete and attempt to cleanup salt clients attempts to clean up additional configuration. If the client cannot be contacted, or if it is a traditional client, then the client can be deleted without cleanup. In those situations, a manual cleanup is necessary.

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, deregistering 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:05-Nov-2024
    • SUSE Manager

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.