SUSE Support

Here When You Need Us

Cobbler Migration Problem in SUSE Manager 4.3.2

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

Environment

SUSE Manager 4.3.2


Situation

The package cobbler-3.3.3-150400.5.10.8.noarch was released in a maintenance update (patch SUSE-SLE-Module-SUSE-Manager-Server-4.3-2022-3921). After installing this package, if the SUSE Manager system has cobbler data from an old format, the cobblerd service fails on startup. The following error may be seen:
cobbler.cexceptions.CX: 'serializer: error loading collection profile: ...
Engineering is aware of the problem, and a new maintenance update will be released soon to fix the problem. Until that time, read the instructions below for a temporary resolution.

Resolution

Important:
This resolution will delete all configured Cobbler collections from the file system. If Cobbler is only used and configured through SUSE Manager, these files will be re-created automatically. If manual items have been added to Cobbler, please see the section below titled "Fix for users with CUSTOM collection files". 

---

Fix for users only using SUMA managed collections

1 - Create a Manual Backup Directory
(Note: You likely already have some backup collections directories in `/var/lib/cobbler/`. Please be aware of the space of this operation, but for most users, it will be minimal.)
# mkdir /var/lib/cobbler/collections.manual-backup/

2 - Copy the Collection Files to the backup-collections directory
# cp -r /var/lib/cobbler/collections/* /var/lib/cobbler/collections.manual-backup/

3 - Remove the necessary files
# shopt -s globstar
# rm /var/lib/cobbler/collections/**/*

The intended output should show:
"rm: cannot remove '/var/lib/cobbler/collections/distros': Is a directory"
...
The files in those directories should be removed, but the directory structure itself, left intact.


4 - Restart Services

# spacewalk-service restart
Once the services are restarted, any SUMA created profile and distro JSON files should be recreated, and cobblerd should be started, with everything working again.
The "systems" directory will only be populated if a system is assigned to a profile through the Provisioning tab on a system page.



Fix for users with CUSTOM collection files

As shown above, all profiles that include paths to non-existing template files need to be removed. If you don't wish to delete all profiles, check which template files are referenced by the profiles. Also, see above for steps to back up the collection files if wanted.

1 - Identify Profiles with non-existing paths
# grep --perl-regex --only-matching '.autoinstall.:(.*?),' /var/lib/cobbler/collections/profiles/*

Important: With the below step 2, please take a note of all profiles you delete, or move. The profile names are required in the following steps.

2 - Remove Profiles referencing non-existing paths
Check if all template files exist. The profiles generated by SUSE Manager will reference non-existing paths. These profiles must be removed by deleting, or moving, the corresponding JSON file.

3 - Identify and remove Systems that reference any deleted profiles 
All systems that reference any of the deleted profiles also need to be deleted, or moved. The systems are located in /var/lib/cobbler/systems.

# grep --perl-regex --only-matching '.profile.:(.*?),' /var/lib/cobbler/collections/systems/*

Delete all JSON files that reference any of the deleted profiles and finally restart SUSE Manager.

4 - Restart Services

# spacewalk-service restart

Once the services are restarted, the profiles should be re-created, and everything should be working again. The "systems" directory will only be populated when they are assigned to profiles through the Provisioning tab on a system page.

Cause

A cobbler migration script cuts off directories in paths to template files. On startup of the cobblerd service, cobbler checks the presence of the template files, which are not specific correctly anymore, and the service crashes.

Status

Top Issue

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:000020852
  • Creation Date: 20-Dec-2022
  • Modified Date:11-Jan-2023
    • 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.