Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-21746

puppet-agent rpm package does not classify important configuration files properly

XMLWordPrintable

    • None
    • None
    • None
    • Manual
    • No

      Description of problem:

      Our puppet-agent package marks the following files a config:

      ~~~

      1. rpm -qc puppet-agent-7.26.0-3.el8sat.x86_64
        /etc/logrotate.d/pxp-agent
        /etc/puppetlabs/code/environments/production/environment.conf
        /etc/puppetlabs/puppet/hiera.yaml
        /etc/puppetlabs/puppet/puppet.conf
        /etc/sysconfig/puppet
        /etc/sysconfig/pxp-agent
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim
        /usr/lib64/tmpfiles.d/puppet-agent.conf
        ~~~

      However, we do not define /etc/puppetlabs/code/environments/production/hiera.yaml as %config

      As consequence, /etc/puppetlabs/code/environments/production/hiera.yaml is overwritten during package upgrades and results in any customization being lost when puppet-agent is updated.

      If the puppet-agent package is being used on a client server, that should not be a problem.However, when the package is installed on a puppetserver (a satellite or capsule) this can become a problem.

      If we look at the package distributed by puppetlabs, this file is properly marked as config and is not overwritten by updates:

      ~~~

      1. rpm -qpc puppet-agent-7.13.1-1.el8.x86_64.rpm
        warning: puppet-agent-7.13.1-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 9e61ef26: NOKEY
        /etc/logrotate.d/pxp-agent
        /etc/puppetlabs/code/environments/production/environment.conf
        /etc/puppetlabs/code/environments/production/hiera.yaml
        /etc/puppetlabs/puppet/hiera.yaml
        /etc/puppetlabs/puppet/puppet.conf
        /etc/sysconfig/puppet
        /etc/sysconfig/pxp-agent
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim
        /opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim
        /usr/lib/tmpfiles.d/puppet-agent.conf
        ~~~

      How reproducible: always

      Steps to Reproduce:
      1. make any changes on /etc/puppetlabs/code/environments/production/hiera.yaml
      2. update puppet-agent package
      3. check the file /etc/puppetlabs/code/environments/production/hiera.yaml again and observe that the changes made on step 1 are gone

      Actual results:
      /etc/puppetlabs/code/environments/production/hiera.yaml is always reset to defaults after puppet-agent is updated

      Expected results:
      changes made on /etc/puppetlabs/code/environments/production/hiera.yaml would remain in place after upgrades of puppet-agent

      Additional info:

              Unassigned Unassigned
              rhn-support-jpasqual Joniel Pasqualetto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: