uyuni
uyuni copied to clipboard
WIP: Migrate cobbler settings and collections to newer cobbler version (bsc#1203478)
What does this PR change?
This PR makes spacewalk-setup-cobbler
to trigger the migration of existing Cobbler settings and collections if necessary, particularly in the context of upgrading from previous Cobbler 3.1.2 version to latest 3.3.3.
Before this PR, after the upgrade to Cobbler 3.3.3, the "cobblerd" daemon was not able to start due deprecated values found on stored Cobbler collections, and also the current settings were not migrated to new settings.yaml
.
This migration will now happen when /etc/cobbler/settings
is detected, meaning we are coming from old Cobbler 3.1.2 and we need to migrate collections and settings to 3.3.3.
The steps are the following:
- Make a backup of older
settings
file before executing migration. - Execute settings migration using
cobbler-settings migrate
command. - Disable settings automigration for Cobbler.
- Create a backup of stored cobbler collections before migration.
- Execute
spacewalk-setup-cobbler --migrate-collections
to migrate stored collections and readjust setting for Uyuni.
GUI diff
No difference.
- [x] DONE
Documentation
-
No documentation needed: only internal and user invisible changes
-
[x] DONE
Test coverage
-
No tests: tested manually
-
[x] DONE
Links
Tracks https://github.com/SUSE/spacewalk/issues/19021
- [x] DONE
Changelogs
Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository
If you don't need a changelog check, please mark this checkbox:
- [ ] No changelog needed
If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test
(see below)
Re-run a test
If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:
- [ ] Re-run test "changelog_test"
- [ ] Re-run test "backend_unittests_pgsql"
- [ ] Re-run test "java_pgsql_tests"
- [ ] Re-run test "schema_migration_test_pgsql"
- [ ] Re-run test "susemanager_unittests"
- [ ] Re-run test "javascript_lint"
- [ ] Re-run test "spacecmd_unittests"
/cc @SchoolGuy
@meaksh Why is that exclusively here and not in the migrations? We recently integrated the seperate V2 to V3 tool into the migrations, so is there any reason to not have it upstream?
@SchoolGuy I agree it makes sense to push this eventually to the cobbler migrations as it was done for the v2-to-v3
script, I did it here initially as I was having some issues with the migrations.
I have also some changes for cobbler migrations which are required to not clash with SUMA custom cobbler settings like tftpsync_timeout
or proxies
, and also being able to validate the old settings when newer settings are placed in settings.d
files (i.a. windows settings file after updating to 3.3.3).
The current WIP changes for cobbler: https://build.opensuse.org/package/rdiff/home:PSuarezHernandez:branches:systemsmanagement:Uyuni:Master/cobbler?opackage=cobbler&oproject=systemsmanagement%3AUyuni%3AMaster&rev=3
I'm currently working on moving migrating the collections to Cobbler migrations, will update WIP changes for cobbler and will produce an upstream PR for it.
I've moved the migration of the collections to our cobbler for package: https://build.opensuse.org/package/show/home:PSuarezHernandez:branches:systemsmanagement:Uyuni:Master/cobbler
Upstream Cobbler PR: https://github.com/cobbler/cobbler/pull/3258 (some tests still need to be adapted)