Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4678

Enable yumrepo priority attribute to support lower priority than 99



    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.6, PUP 4.3.2
    • Fix Version/s: PUP 5.5.1
    • Component/s: None
    • Labels:
    • Template:
    • Team:
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      New Feature
    • Release Notes Summary:
      The yumrepo type no longer limits priority values to 1-99, and now accepts any integer (positive or negative). This now matches yum's behavior on determining valid priority values.


      yumrepo resource type has attribute priority which is limited between 1-99

      This makes it impossible to configure a new repository with priority lower then system default (99) and protect system packages. Alternative (change priority for basic repositories) is not feasible with systems receiving updates from RedHat satellite.

      You'll receive an error when you are trying to set a lower priority.

      # puppet apply test.pp 
      Notice: Compiled catalog for pe-380-master.puppetdebug.vlan in environment production in 0.04 seconds
      Error: Parameter priority failed on Yumrepo[myrepo]: Must be within range 1-99 at /tmp/test.pp:8

      I did the following test just to make sure that CentOS really support the priority lower than 99, because googling shows that 99 is the lowest default.

      I chose zabbix package to do the test randomly.
      I installed epel repo and zabbix repo on the test system via: rpm -ivh <repo>.
      Without specifying the priority, the system automatically picked zabbix repo when I did: yum install zabbix.

      Test 1:

      I specified 98 priority for epel repo and 99 priority for zabbix repo.
      The system automatically picked epel repo, being 'higher' priority than zabbix repo when i did yum install zabbix.

      Test 2:

      I specified 101 priority for epel repo and 102 priority for zabbix repo.
      The system automatically picked epel repo, being 'higher' priority than zabbix repo - yum install zabbix.

      My verdict: Value 'lower' than 99 works in the OS, although 99 is being described as the lowest default. Puppet does not support yumrepo attribute lower than 99 with the error above.


          Issue Links



              melissa Melissa Stone
              ali Ali Tukimin
              2 Vote for this issue
              7 Start watching this issue



                  Zendesk Support