Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Duplicate
-
SERVER 1.0.8, SERVER 2.0.0
-
None
-
CentOS 6.6
Description
The ignore attribute of the File type doesn't work properly when Puppet Server is in use and more than one ignore pattern is specified. The functionality works fine when an agent talks to a WEBrick master.
Reproduction Case
Install PE 3.8.
- Create a test module with some test files:
mkdir -p /etc/puppetlabs/puppet/modules/ignore_test/files |
touch /etc/puppetlabs/puppet/modules/ignore_test/files/{foo,bar,baz} |
- Set up site.pp to recursively sync files from the module to a temp directory, while ignoring foo and baz:
tee /etc/puppetlabs/puppet/environments/production/manifests/site.pp << "EOF" |
node default {
|
|
file {'/tmp/sync_test': |
ensure => directory,
|
source => 'puppet:///modules/ignore_test', |
recurse => remote,
|
ignore => ['foo', 'baz'], |
}
|
|
}
|
EOF
|
- Run puppet agent -t
Outcome
All three files are synced:
# /opt/puppet/bin/puppet agent -t
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for foo.bar.baz
|
Info: Applying configuration version '1432845576'
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test]/ensure: created
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test/bar]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test/baz]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test/foo]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
|
Notice: Finished catalog run in 0.84 seconds
|
Expected Outcome
Files matching the foo and baz patterns are ignored. This is the behavior when the agent runs against puppet master --no-daemonize instead of Puppet Server:
# rm -rf /tmp/sync_test
|
# service pe-puppetserver stop
|
Stopping pe-puppetserver: [ OK ]
|
# /opt/puppet/bin/puppet master --no-daemonize 2>&1 >/dev/null &
|
[1] 4986
|
|
# /opt/puppet/bin/puppet agent -t
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for foo.bar.baz
|
Info: Applying configuration version '1432845639'
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test]/ensure: created
|
Notice: /Stage[main]/Main/Node[default]/File[/tmp/sync_test/bar]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
|
Notice: Finished catalog run in 0.77 seconds
|
|
# kill 4986
|
Attachments
Issue Links
- duplicates
-
SERVER-442 fact syncs hidden folders (ie. .svn)
-
- Closed
-
- is cloned by
-
ENTERPRISE-687 File metadata endpoints don't handle multiple ignore values correctly
-
- Accepted
-