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
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
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 restartOnce 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
Status
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: 10-Nov-2022
- Modified Date:11-Jan-2023
-
- SUSE Manager
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com