User story #12710
Add a package techniques migration script
Old package techniques are no longer maintained, we should provide a way to slightly automate the migration process.
Some parameters will be lost in the process: the custom check interval, the condition statement on versions, the "update only" option and the posthook boolean.
To avoid any big changes in configuration, the script creates a new directive from the old one, using the new package technique, adding "_migrated" to its displayName.
The script will abort any upgrade including unsafe changes like:
-upgrading directive sing version condition statement
-upgrading directive including inactive but defined posthook command
If the script succeeds, it will not replace the old directive but only create a new one, without attaching it to a rule.
The proper call to 'directive-replace' introduced by #12614 will be printed to let the user replace the directive after checking it if he wants to.
Updated by Félix DALLIDET 12 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Félix DALLIDET to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-agent/pull/177
Updated by Félix DALLIDET 11 months ago
The parameters mapping is done as described bellow:
'<>' is used for a non present arg
- RPM_PACKAGE_CHECK_INTERVAL => Null
- RPM_PACKAGE_REDLIST => PACKAGE_LIST
- RPM_PACKAGE_REDACTION => PACKAGE_STATE add:present delete:remove update:present <>:any
- RPM_PACKAGE_VERSION_DEFINITION => PACKAGE_VERSION default:default specific:specific
- RPM_PACKAGE_VERSION_CRITERION => ==:<>(no equivalent but continue) !=/>=/<=/>:abort the technique upgrade
- RPM_PACKAGE_VERSION => PACKAGE_VERSION_SPECIFIC (abort if empty and RPM_PACKAGE_VERSION_DEFINITION set to specific)
- RPM_PACKAGE_PACKAGE_POST_HOOK_RUN => <>
- RPM_PACKAGE_PACKAGE_POST_COMMAND => PACKAGE_POST_HOOK_COMMAND (abort if a command is defined but RPM_PACKAGE_PACKAGE_POST_HOOK_RUN was unchecked)
No options, default architecture, untrusted packages set to false
- APT_PACKAGE_APTLIST => PACKAGE_LIST
- APT_PACKAGE_ALLOW_UNTRUSTED => PACKAGE_MANAGER_ALLOW_UNTRUSTED true:true false:false
- APT_PACKAGE_DEBACTION => PACKAGE_STATE add:present delete:remove update:present <>:any
- APT_PACKAGE_VERSION_DEFINITION => PACKAGE_VERSION default:default specific:specific
- APT_PACKAGE_VERSION_CRITERION => ==:<>(no equivalent but continue) !=/>=/<=/>:abort the technique upgrade
- APT_PACKAGE_VERSION => PACKAGE_VERSION_SPECIFIC (abort if empty and APT_PACKAGE_VERSION_DEFINITION set to specific)
No posthook defined, no options defined, default architecture
Moreover, it creates the directive when succeeding but does not replace the old one in the rule nor destroy it to allow human check afterward.
Updated by Félix DALLIDET 9 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|90192844d673a5c5c90aab470f6aa8651f43d0fc.