Project

General

Profile

Actions

User story #8230

closed

Package management issues in Rudder/ncf

Added by Alexis Mousset almost 8 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Category:
Techniques
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

Status of package management

This table only considers latest versions of techniques and generic methods.

name OS body package list update frequency (yum update, etc.) package list update frequency configurable? handles installing "latest" version available updates list frequency configurable? handles "update or add if not installed" handles "install a specific, not latest version" execution frequency configurable (class persistence)
rpm package installation 7.0 technique RHEL/CentOS/SLES generic_nobulk (in the technique) 30 minutes no yes yes (default is 60 minutes) no no yes (default to 60 minutes)
apt package installation 4.0 technique Ubuntu/Debian apt_nobulk (in the technique) 30 minutes no no no no no no
package_install_* generic methods Debian/Ubuntu apt_get (in cfengine stdlib) 240 minutes no no no yes no no
package_install_* generic methods RHEL/CentOS yum_rpm (in cfengine stdlib) 240 minutes no no no yes no no
package_install_* generic methods SLES ncf_generic (in ncf stdlib) 240 minutes no no no yes yes no
package_{present,absent} generic methods RHEL,Debian/Ubuntu,FreeBSD 240 minutes no yes no yes yes no
Constraints:
  • The addupdate action does not work
  • We need to handle "update to latest version" manually using a list of available updates to call CFEngine with a precise version
  • ncf does not (currently) handles reporting for multiple calls with the same generic method on the same package
  • We have to stay compatible with all current package management methods
Goals:
  • Ability to ensure the package is in "latest" version
  • Ability to update or install if needed in a single action
  • Flexibility on caching/execution frequency to allow:
    • Fast actions (provisioning, security updates, ...)
    • Low overhead on small/embedded devices
  • Fix targeting current versions, at least 3.1

Option 1

Make one configurable package management method working properly and use it everywhere.

  • Use ncf_generic body everywhere in ncf
  • Add available updates list support to package_install_*
    • Move rpm support to the generic method
    • Add apt support
  • Make list update frequency configurable
    • ncf configuration parameter ?
    • Generic method parameter ?
  • Make a new version of RPM and APT package techniques using package_install_
Issues:
  • Some people implemented addupdate using directives with add+update on the same package, which cannot be handled properly with ncf reporting

Option 2

Make one configurable package management method working properly in ncf, and fix packages techniques by handling add + update actions

  • Use ncf_generic body everywhere in ncf
  • Add available updates list support to package_install_*
  • Add support for available updates in apt technique
  • Make list update frequency configurable in ncf (and maybe in the techniques too)
    • ncf configuration parameter ?
    • Generic method parameter ?
Issues:
  • Duplicates a lot of logic in ncf/techniques

Other notes

We should have a plan to migrate to the new CFEngine package promises, which are now the default in 3.9. This should widely simplify our code on new CFEngine version (Rudder 3.2+). We can use if_version macro feature for this, which will be easier if all package operations are done in a single place.


Related issues 7 (0 open7 closed)

Related to Rudder - User story #6994: Technique aptPackageInstallation doesn't update packages if no version is definedRejectedActions
Related to Rudder - User story #8207: Make package_list_update_ifelapsed configurable in rpmPackageInstallationRejectedAlexis MoussetActions
Related to Rudder - Bug #7119: Wrong reporting in rpmPackageInstallation when trying to update a non-existent packageRejectedActions
Related to Rudder - User story #4298: Install / upgrade packagesRejected2013-12-30Actions
Related to Rudder - Bug #8167: package_install_version_cmp_update should handle all needed package operationsRejectedAlexis MoussetActions
Related to Rudder - User story #2221: Check which packages are installed frequencyRejectedActions
Related to Rudder - User story #8952: Add generic methods using new package promisesReleasedJonathan CLARKEActions
Actions #1

Updated by Alexis Mousset almost 8 years ago

  • Related to User story #6994: Technique aptPackageInstallation doesn't update packages if no version is defined added
Actions #2

Updated by Alexis Mousset almost 8 years ago

  • Related to User story #8207: Make package_list_update_ifelapsed configurable in rpmPackageInstallation added
Actions #3

Updated by Alexis Mousset almost 8 years ago

  • Related to Bug #7119: Wrong reporting in rpmPackageInstallation when trying to update a non-existent package added
Actions #4

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #5

Updated by Alexis Mousset almost 8 years ago

  • Related to Bug #1884: The addupdate target on the package installation Technique is broken. We should enable it again when possible added
Actions #6

Updated by Alexis Mousset almost 8 years ago

Actions #7

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #8

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #9

Updated by Alexis Mousset almost 8 years ago

  • Related to Bug #8167: package_install_version_cmp_update should handle all needed package operations added
Actions #10

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #11

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #12

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #13

Updated by Alexis Mousset almost 8 years ago

  • Description updated (diff)
Actions #14

Updated by Alexis Mousset almost 8 years ago

  • Related to User story #2221: Check which packages are installed frequency added
Actions #15

Updated by Jonathan CLARKE almost 8 years ago

  • Related to deleted (Bug #1884: The addupdate target on the package installation Technique is broken. We should enable it again when possible)
Actions #16

Updated by Alexandre Anriot over 7 years ago

Alexis,

For Debian / APT, a priority such as 9:999999999 seems to be effective.

See [[http://sandrotosi.blogspot.fr/2015/06/cfengine-upgrade-debian-packages.html]].

Could it be acceptable to set this priority in the promises when the user has chosen Use package manager default version ?

Actions #17

Updated by Alexis Mousset over 7 years ago

  • Description updated (diff)
Actions #18

Updated by Alexis Mousset over 7 years ago

  • Related to User story #8952: Add generic methods using new package promises added
Actions #19

Updated by Alexis Mousset about 7 years ago

  • Tracker changed from Bug to User story
Actions #20

Updated by Alexis Mousset about 7 years ago

  • Description updated (diff)
Actions #21

Updated by Benoît PECCATTE over 6 years ago

  • Translation missing: en.field_tag_list changed from Key for adoption, Sponsored to Key for adoption, Sponsored, Adoption blocker
Actions #22

Updated by Benoît PECCATTE over 6 years ago

  • Translation missing: en.field_tag_list changed from Key for adoption, Sponsored, Adoption blocker to Key for adoption, Sponsored
Actions #23

Updated by Benoît PECCATTE about 6 years ago

  • Target version set to Ideas (not version specific)
Actions #24

Updated by Alexis Mousset almost 6 years ago

  • Status changed from New to Rejected

What has been done:

  • Improve old package methods (particularly upgrade methods)
  • Add the new package promises to ncf and techniques
  • Deprecate old package and methods

What is still to do:

  • #9110 to have configurable refresh frequency for package caches
  • #12710 to automate migration from the deprecated techniques to the new one
  • #12436 to automate migration from the deprecated generic methods to the new ones
  • #11615 to add an "update-only" option

But the core issues that were partially broken package upgrade, particularly for "latest" version, and big performance problems are now fixed.

Actions

Also available in: Atom PDF