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

static catalogs not working for file resource when versioned_deploys enabled

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Team:
      Froyo
    • Story Points:
      2
    • Sprint:
      Froyo - 7/14/2021, Froyo - 7/28/2021
    • Method Found:
      Customer Feedback
    • Zendesk Ticket IDs:
      43787
    • Zendesk Ticket Count:
      1
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Previously, when :versioned_environment_dirs was true, catalog compilation failed to add metadata for static catalog file resources; this meant that an agent receiving a catalog would not attempt to request that static file content. This has been addressed and now metadata is correctly added to the catalog when :versioned_environment_dirs is true.
      Show
      Previously, when :versioned_environment_dirs was true, catalog compilation failed to add metadata for static catalog file resources; this meant that an agent receiving a catalog would not attempt to request that static file content. This has been addressed and now metadata is correctly added to the catalog when :versioned_environment_dirs is true.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 
      Puppet Server Version: 2019.8.5 and 2019.8.6
      OS Name/Version: Centos 7

      When versioned_deploys is enabled (lockless deploys feature) the file resource stops operating as static catalog 

      Desired Behavior:

      When deploy_versions is enabled (lockless deploys feature) the file resource stops operating as static catalog ** 

      Actual Behavior:

       

      Using the following class as example:

      class file_serving_test {
      # creating a file in the root folder
        file { '/root/jordi9.conf':
          ensure => file,
          source => 'puppet:///modules/file_serving_test/jordi9.conf'
        }
      }
      

      without version_deploys - static catalogs working

       10.64.132.119 - - [02/Jul/2021:14:22:22 +0000] "GET /puppet/v3/static_file_content/site/file_serving_test/files/jordi9.conf?environment=production&code_id=urn%3Apuppet%3Acode-id%3A1%3Acc6a314c8caf1c58434ba024e0a38c234044cbe0%3Bproduction HTTP/1.1" 200 14 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 8 - -
      

      with version_deploys and no other changes - static catalogs not working

       10.64.132.119 - - [02/Jul/2021:14:28:52 +0000] "GET /puppet/v3/file_metadata/modules/file_serving_test/jordi9.conf?links=manage&checksum_type=md5&source_permissions=ignore&environment=production HTTP/1.1" 200 289 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 16 - 12
       10.64.132.119 - - [02/Jul/2021:14:35:10 +0000] "GET /puppet/v3/file_metadata/modules/file_serving_test/jordi9.conf?links=manage&checksum_type=md5&source_permissions=ignore&environment=production HTTP/1.1" 200 367 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 11 - 8
       10.64.132.119 - - [02/Jul/2021:14:58:46 +0000] "GET /puppet/v3/file_metadata/modules/file_serving_test/jordi9.conf?links=manage&checksum_type=md5&source_permissions=ignore&environment=production HTTP/1.1" 200 367 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 10 - 7
      

      with version_deploys, deleting jordi9.conf from the agent and no other changes - static catalogs not working

       10.64.132.119 - - [02/Jul/2021:15:04:41 +0000] "GET /puppet/v3/file_metadata/modules/file_serving_test/jordi9.conf?links=manage&checksum_type=md5&source_permissions=ignore&environment=production HTTP/1.1" 200 367 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 18 - 14
       10.64.132.119 - - [02/Jul/2021:15:04:42 +0000] "GET /puppet/v3/file_content/modules/file_serving_test/jordi9.conf?environment=production HTTP/1.1" 200 14 "-" "Puppet/6.22.1 Ruby/2.5.9-p229 (x86_64-linux)" 10 - 7 1
      

      Logic steps to reproduce:

      1. Add a file resource with source => 'puppet:///modules...' into the control repo in a module
      2. Enable code manager
      3. Observe static catalogs are working and the metadata for the file is inlined in the catalog.
      4. Enable versioned code deploys
      5. Observe that the static catalogs do not include the inlined metadata and the agent makes the file_metadata API call for the files

      OUTCOMES

      • Determine the cause of this bug - if you've put in ~2 points worth of work into this and can't determine the cause, we should stop and re-evaluate next steps.
      • If it's easy, fix it
      • If not, open separate ticket(s) describing the necessary changes

        Attachments

          Activity

            People

            Assignee:
            tony.vu Tony Vu
            Reporter:
            jordi.garcia Jordi Garcia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support