Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 3.5.1, PUP 3.8.1, PUP 4.2.0
-
3
-
Language 2015-09-30
-
Reviewed
-
Bug Fix
-
Description
Puppet 3.5.0 introduced a regression to agent tag filtering where a single tag, --tag foo::bar would be split on the namespace separator :: and expanded to a set of ['foo::bar', 'foo', 'bar'].
This causes the agent to sync more resources than the user intended when tag filtering is in effect.
Reproduction Case
Apply the following test manifest with a tag filter of --tag test::step1:
# tag_test.pp
|
|
class test { |
include test::step1
|
include test::step2
|
}
|
|
class test::step1 { |
file { '/tmp/test1.txt': |
ensure => 'file', |
}
|
}
|
|
class test::step2 { |
file { '/tmp/test2.txt': |
ensure => 'file', |
}
|
}
|
|
include test
|
Outcome
Both file resources from from the Step1 and Step2 classes are applied:
# puppet --version
|
3.8.0
|
# puppet apply tag_test.pp --tags test::step1
|
|
Notice: Compiled catalog for poss-head-centos.puppetdebug.vlan in environment production in 0.37 seconds
|
Notice: Finished catalog run in 0.01 seconds
|
[root@poss-head-centos ZEN-11318]# rm -f /tmp/test*
|
[root@poss-head-centos ZEN-11318]# puppet apply tag_test.pp --tags test::step1
|
Notice: Compiled catalog for poss-head-centos.puppetdebug.vlan in environment production in 0.41 seconds
|
Notice: /Stage[main]/Test::Step2/File[/tmp/test2.txt]/ensure: created
|
Notice: /Stage[main]/Test::Step1/File[/tmp/test1.txt]/ensure: created
|
Notice: Finished catalog run in 0.02 seconds
|
Expected Outcome
Only file resources from the Step1 class are applied. This was the behavior prior to Puppet 3.5:
# puppet --version
|
3.4.3
|
# puppet apply tag_test.pp --tags test::step1
|
|
Notice: Compiled catalog for poss-head-centos.puppetdebug.vlan in environment production in 0.38 seconds
|
Notice: /Stage[main]/Test::Step1/File[/tmp/test1.txt]/ensure: created
|
Notice: Finished catalog run in 0.20 seconds
|