User story #12710
closed
Add a package techniques migration script
Added by Félix DALLIDET over 6 years ago.
Updated about 6 years ago.
Description
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.
- Status changed from New to In progress
- Assignee set to Félix DALLIDET
- 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
- Target version changed from 4.3.2 to 4.3.3
The parameters mapping is done as described bellow:
'<>' is used for a non present arg
RPM old technique:
- 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 old technique:
- 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.
- Target version changed from 4.3.3 to 4.3.4
- Target version changed from 4.3.4 to 4.3.5
- Status changed from Pending technical review to Pending release
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.3.5 and 5.0.1 which were released today.
Changelog
Changelog
- Related to User story #10276: I Can not migrate from old "package technique" to new one automatically added
Also available in: Atom
PDF