Exploring Puppet filebuckets: Error: Could not run: File not found

Exploring Puppet filebuckets: Error: Could not run: File not found

我正在使用包含以下摘录的清单探索 Puppet 文件桶:

file { '/tmp/test' :
  backup,
  # ...
}

当我应用此清单时,Puppet 报告说它已将 /tmp/test 的旧版本备份到(本地)文件桶 puppet:

Info: /Stage[main]/<module>/File[/tmp/test]:
Filebucketed /tmp/test to puppet with sum <hash>

这与 documentation 中的以下描述相匹配:

Default value: puppet, which backs up to a filebucket of the same name. (Puppet automatically creates a local filebucket named puppet if one doesn’t already exist.)

当我现在尝试使用 puppet filebucket --local list(或 puppet filebucket --local --bucket puppet list)检查文件桶的内容时,我收到此错误消息:

Error: Could not run: File not found

什么可以解释这种行为以及我如何才能成功检查(本地)文件桶的内容?这是 Puppet 版本 4.10.5。

这似乎与 Puppet 4 中的 bug 有关。此解决方法适用:

puppet filebucket --local \
  --bucket /opt/puppetlabs/puppet/cache/clientbucket \
  list

UPDATE 将此命令的输出通过管道传输到 sort -k 2 将按日期对条目进行排序(最新的优先)。