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

Puppet filebucket --local uses $bucketdir instead of $clientbucketdir

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.2.1, PUP 4.3.0
    • Fix Version/s: PUP 5.4.0
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Acceptance Criteria:
      Hide
      • The --local flag to the filebucket command should always use the $clientbucketdir setting for its operations
      • Docs are updated to reflect this (if they don't say so already)
      • Tests verify that this behavior is consistent
      Show
      The --local flag to the filebucket command should always use the $clientbucketdir setting for its operations Docs are updated to reflect this (if they don't say so already) Tests verify that this behavior is consistent
    • Sub-team:
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Previously, using the --local option in filebucket would default to using the server's filebucket instead of the actual local filebucket, which would cause errors when querying for files on the local filebucket because they could not be found. (As filebucket was looking in the wrong directory) The behavior has been changed for --local option to now use the clientbucketdir instead of bucketdir.
      Show
      Previously, using the --local option in filebucket would default to using the server's filebucket instead of the actual local filebucket, which would cause errors when querying for files on the local filebucket because they could not be found. (As filebucket was looking in the wrong directory) The behavior has been changed for --local option to now use the clientbucketdir instead of bucketdir.
    • QA Risk Assessment:
      No Action

      Description

      As I've noticed we are finally fixing filebucket I'd love to see the following long-standing bug fixed.

      # cat /opt/puppetlabs/puppet/cache/clientbucket/2/c/1/5/a/e/7/2/2c15ae72acdbd8878a6550275bc15fef/paths 
      /etc/puppetlabs/puppet/puppet.conf
       
      # puppet filebucket get --local 2c15ae72acdbd8878a6550275bc15fef
      Error: Could not run: File not found
      

      The thing is, you can find the file just fine if you manually specify the clientbucket.

      [root@client puppet]# puppet filebucket get -b /opt/puppetlabs/puppet/cache/clientbucket 2c15ae72acdbd8878a6550275bc15fef
      Info: FileBucket read 2c15ae72acdbd8878a6550275bc15fef
      # This file can be used to override the default puppet settings.
      # See the following links for more details on what settings are available:
      

      Looking at the code with strace, it is trying to read the $bucketdir instead of the $clientbucketdir, which makes no sense when using the --local option.

      If there is some use for --local that somehow makes sense, change this to a feature request for --client or some such option?

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jorhett Jo Rhett
                • Votes:
                  5 Vote for this issue
                  Watchers:
                  17 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: