Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-3734

Ensure that resource indirection uses existing resource type

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PDB 5.2.0
    • PuppetDB
    • None
    • Data Platform
    • Customer Feedback
    • Bug Fix
    • Hide
      Before this commit, the resource type would be passed to `Resource#new`
      in string form. This is problematic since it may result in the load of
      a Ruby resource type which then is in conflict with genereated Pcore
      resource type.

      This commit ensures that the indirection uses the same logic as Puppet
      when creating new resources.
      Show
      Before this commit, the resource type would be passed to `Resource#new` in string form. This is problematic since it may result in the load of a Ruby resource type which then is in conflict with genereated Pcore resource type. This commit ensures that the indirection uses the same logic as Puppet when creating new resources.
    • Needs Assessment

    Description

      The Puppet::Resource::Puppetdb#search method creates a new Resource by passing the resource type in string format. This is problematic since that string might be resolved by loading a Ruby resource type. This is a potential source of conflicts when puppet generate types is used and the root cause of the error reported in PUP-8002.

      In other places of puppet the code is changed to instead load the resource type using the Puppet::Pops::Evaluator::Runtime3ResourceSupport#find_resource_type method, thus
      preventing the Ruby type from being loaded.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thomas.hallgren Thomas Hallgren
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support