Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-2278

PA-437 fix causes pip provider failures when SCL version is installed

    XMLWordPrintable

Details

    • Platform OS
    • Platform OS Kanban
    • Customer Feedback
    • Minor
    • 2 - 5-25% of Customers
    • 3 - Serious
    • 2 - $$$
    • Hide
      This issue occurs because the pip provider we ship does not expect the use of SCL. The impact of this could be a failed upgrade/postgres migration.

      At minimum we should document the assumptions this provider has and then at some point update the provider to handle these cases(if that is possible)
      Show
      This issue occurs because the pip provider we ship does not expect the use of SCL. The impact of this could be a failed upgrade/postgres migration. At minimum we should document the assumptions this provider has and then at some point update the provider to handle these cases(if that is possible)

    Description

      Starting in Puppet 5, we now unset LD_LIBRARY_PATH via a wrapper script around puppet and facter. Unfortunately, this causes problems when customers have the SCL version of pip installed on the system, as the custom LD_LIBRARY_PATH is required.

      Repro:

      1. Install a base 2017.3.2 system
      2. Set up the SCL repo from CentOS extras: yum install centos-release-scl
      3. Install the SCL version of python27-pip: yum install python27-python-pip
      4. Enable the SCL version of python27: source /opt/rh/python27/enable

      At that point, numerous related problems surface:

      Facter will fail on pe_postgresql_info:

      # /opt/puppetlabs/bin/facter -p pe_postgresql_info |grep server_version
      2018-01-12 09:13:58.272017 ERROR puppetlabs.facter - error while resolving custom fact "pe_postgresql_info": undefined method `[]' for nil:NilClass
      

      The self.instances for the package provider will fail:

      # puppet resource package --trace
      Error: Could not run: undefined method `[]' for nil:NilClass
      

      Adding debug to the pip provider shows the error:

      # /opt/puppetlabs/bin/facter -p pe_postgresql_info --trace
      /opt/rh/python27/root/usr/bin/python2: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
      2018-01-12 09:56:16.158237 ERROR puppetlabs.facter - error while resolving custom fact "pe_postgresql_info": undefined method `[]' for nil:NilClass
      backtrace:
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:74:in `block (2 levels) in pip_version'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:72:in `each'
      

      This can be worked around by commenting out the unset of LD_LIBRARY_PATH in the wrapper:

      # sed -ie 's/unset LD_LIBRARY_PATH/#unset LD_LIBRARY_PATH/' /opt/puppetlabs/puppet/bin/wrapper.sh
      

      Attachments

        Issue Links

          Activity

            People

              sean.mcdonald Sean McDonald
              adam.bottchen Adam Bottchen
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support