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 Proxy 3
Situation
[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
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
Additional Information
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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com