Project

General

Profile

Actions

User story #12710

closed

Add a package techniques migration script

Added by Félix DALLIDET over 6 years ago. Updated about 6 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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.


Related issues 1 (0 open1 closed)

Related to Rudder - User story #10276: I Can not migrate from old "package technique" to new one automaticallyRejectedActions
Actions #1

Updated by Félix DALLIDET over 6 years ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #2

Updated by Félix DALLIDET over 6 years 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
Actions #3

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.2 to 4.3.3
Actions #4

Updated by Félix DALLIDET over 6 years ago

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.

Actions #5

Updated by Alexis Mousset over 6 years ago

  • Category set to Agent
Actions #6

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.3 to 4.3.4
Actions #7

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.3.4 to 4.3.5
Actions #8

Updated by Félix DALLIDET over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #9

Updated by Vincent MEMBRÉ about 6 years ago

  • 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
Actions #10

Updated by Alexis Mousset about 6 years ago

  • Related to User story #10276: I Can not migrate from old "package technique" to new one automatically added
Actions

Also available in: Atom PDF