SUSE Manager Upgrade fails from version 5.0 to 5.1
This document (000022030) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Manager 5.0 on SLE Micro 5.5
SUSE Multi Linux Manager 5.1 on SLE Micro 6.1
Situation
An attempt to upgrade a SUMA server from version 5.0 (running on SLE Micro 5.5) to version 5.1 (running on SLE Micro 6.1) results in database problems that prevent the services from starting correctly, and the SUMA WebUI becomes inaccessible.
The issue occurs after the migration completes.
The following logs can be seen in the journalctl:
spacewalk-startup-helper[430]: Upgrade failed, please see log [/var/log/spacewalk/schema-upgrade/schema-from-20250829-090706-to-susemanager-schema-5.1.10.log].
spacewalk-startup-helper[430]: You can fix the failed migration in [/var/log/spacewalk/schema-upgrade/schema-from-20250829-090706]
spacewalk-startup-helper[430]: and run spacewalk-schema-upgrade again
spacewalk-startup-helper[338]: Database schema upgrade failed. Please check the logs.
And following log can be seen in the schema-upgrade log:
?column?
----------------------------------------------------------------------------------------------------
susemanager-schema-5.1.7-to-susemanager-schema-5.1.8/200-proxy-server-group-members.sql.postgresql
(1 row)
psql:<stdin>:10: ERROR: more than one row returned by a subquery used as an expression
Resolution
Edit the following file on the affected server:
/usr/share/susemanager/db/schema-upgrade/susemanager-schema-5.1.-5.1.8/200-.sql.postgresql
Replace its content with the following SQL commands:
INSERT INTO rhnservergroupmembers (server_id, server_group_id)
SELECT rpi.server_id, sg.id
FROM rhnproxyinfo rpi
JOIN rhnServer s ON rpi.server_id = s.id
JOIN rhnservergroup sg ON sg.name = 'Proxy'
WHERE
s.org_id = sg.org_id
AND NOT EXISTS (
SELECT 1
FROM rhnservergroupmembers sgm
WHERE sgm.server_id = rpi.server_id
AND sgm.server_group_id = sg.id
);
UPDATE rhnservergroup sg
SET current_members = (
SELECT COUNT(*)
FROM rhnservergroupmembers sgm
WHERE sgm.server_group_id = sg.id
)
WHERE sg.name = 'Proxy';
Restart the services to re-trigger the migration:
spacewalk-service start
Cause
The SUMA upgrade process from version 5.0 to 5.1 fails due to a database migration issue. An SQL query within the schema upgrade process does not execute correctly, leading to inconsistencies in the database schema. This prevents the SUMA services from starting and makes the WebUI inaccessible.
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:000022030
- Creation Date: 04-Sep-2025
- Modified Date:04-Sep-2025
-
- SUSE Manager Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com