SUSE Support

Here When You Need Us

SUSE Manager Proxy reports "ImportError: cannot import name isSUSE" in error_log when patching clients

This document (7021215) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 3
SUSE Manager Proxy 3


Situation

Systems connected via SUSE Manager Proxy are not able to retrieve patches. The SUSE Manager Proxy was lately migrated from SLES 12 SP1 to SLES 12 SP2 and has the channels sle-manager-tools12-pool-x86_64-sp2 as well as sle-manager-tools12-updates-x86_64-sp2 assigned. When updating clients, the following error can be seen in /var/log/apache2/error_log on the Proxy:

[Mon Aug 21 09:06:18.963106 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441] mod_wsgi (pid=6585): Exception occurred processing WSGI script '/usr/share/rhn/wsgi/xmlrpc.py'.
[Mon Aug 21 09:06:18.963162 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441] Traceback (most recent call last):
[Mon Aug 21 09:06:18.963190 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/share/rhn/wsgi/xmlrpc.py", line 23, in application
[Mon Aug 21 09:06:18.963227 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     "proxy.apacheServer")
[Mon Aug 21 09:06:18.963239 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/share/rhn/wsgi/wsgiHandler.py", line 35, in handle
[Mon Aug 21 09:06:18.963255 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     parseServ = get_handle(servertype, "HeaderParserHandler")
[Mon Aug 21 09:06:18.963264 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/share/rhn/wsgi/wsgiHandler.py", line 63, in get_handle
[Mon Aug 21 09:06:18.963277 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     handler_module = __import__(servertype, globals(), locals(), [servertype.split('.')[-1]])
[Mon Aug 21 09:06:18.963286 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/share/rhn/proxy/apacheServer.py", line 20, in <module>
[Mon Aug 21 09:06:18.963300 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     from spacewalk.common.rhnLog import initLOG, log_setreq, log_debug
[Mon Aug 21 09:06:18.963309 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/lib/python2.7/site-packages/spacewalk/common/rhnLog.py", line 38, in <module>
[Mon Aug 21 09:06:18.963323 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     from spacewalk.common.fileutils import getUidGid
[Mon Aug 21 09:06:18.963338 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]   File "/usr/lib/python2.7/site-packages/spacewalk/common/fileutils.py", line 28, in <module>
[Mon Aug 21 09:06:18.963353 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441]     from spacewalk.common.rhnLib import isSUSE
[Mon Aug 21 09:06:18.963377 2017] [wsgi:error] [pid 6585] [client xxx.xxx.xxx.xxx:44441] ImportError: cannot import name isSUSE


The client just displays:

# /usr/bin/zypper --non-interactive --no-gpg-checks list-patches
Refreshing service 'spacewalk'.
Problem retrieving the repository index file for service 'spacewalk':
[|]

Skipping service 'spacewalk' because of the above error.
Loading repository data...
Reading installed packages...
No updates found.


Resolution

Remove the channels sle-manager-tools12-pool-x86_64-sp2 as well as sle-manager-tools12-updates-x86_64-sp2 from SUSE Manager Proxy using the Alter Channel Subscription feature of SUSE Manager.
Then downgrade spacewalk-backend-libs on the SUSE Manager Proxy to the version provided in the suse-manager-proxy-3.0-updates-x86_64-sp2 repository (zypper in --oldpackage spacewalk-backend-libs=2.5.24.12-30.1) and confirm the downgrade. When done, restart the SUSE Manager Proxy service (rhn-proxy restart).

Cause

When applying updates the package spacewalk-backend-libs was installed in version 2.7.73.3-54.2 due to the availability of the sle-manager-tools12-updates-x86_64-sp2 repository. This leads to a library mismatch.

Additional Information

When migrating SUSE Manager Proxy based on SLES 12 SP1 to SP2 a dependency conflict may also be experienced:

sumaproxy3:~ # zypper patch
Refreshing service 'spacewalk'.
Problem retrieving the repository index file for service 'spacewalk':
[spacewalk|file:/usr/lib/zypp/plugins/services/spacewalk]

Warning: Skipping service 'spacewalk' because of the above error.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: spacewalk-backend-2.5.24.10-25.1.noarch requires spacewalk-backend-libs = 2.5.24.10-25.1, but this requirement cannot be provided
  Solution 1: downgrade of spacewalk-backend-2.5.24.10-25.1.noarch to spacewalk-backend-2.5.24.9-22.1.noarch
  Solution 2: do not install
patch:SUSE-SLE-Manager-Tools-12-2017-953-1.noarch
  Solution 3: break spacewalk-backend-2.5.24.10-25.1.noarch by ignoring some of its dependencies


To address this, please also remove the sle-manager-tools12-pool-x86_64-sp1 as well as sle-manager-tools12-updates-x86_64-sp1 from SUSE Manager Proxy and make sure these channels do not get reassigned as SP2 repositories. The only channels assigned to a SUSE Manager Proxy should be:

  • SLES12-SPx-Updates
  • SLES12-SPx-Pool
  • suse-manager-proxy-3.0-pool-x86_64-spx
  • suse-manager-proxy-3.0-updates-x86_64-spx

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:7021215
  • Creation Date: 22-Aug-2017
  • Modified Date:03-Mar-2020
    • SUSE Manager

< Back to Support Search

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

SUSE Support Forums

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

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.

Open an Incident

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