Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
Major
Description
Classifier Synchronization (when the classifier requests class information from Puppet Server via the 'resource_types' endpoint) causes all manifests within an environment to be parsed. If this parsing intersects with a catalog request, the resulting compilation will be exposed to any latent problems that exist in the environment: bugs in unused manifests, misplaced or temporary testing code, etc.
Reproduction Case
Install a PE 3.7.1 all-in-one master.
Create a test module which contains a half-implemented class:
mkdir -p /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests |
|
cat << EOF > /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests/init.pp |
# A work in progress.
|
class compile_test {
|
fail("This class isn't implemented yet!") |
}
|
|
# Leftover testing code.
|
include compile_test
|
EOF
|
Run the Puppet Agent a few times to verify that the class is not usually included in catalogs:
# service pe-puppet stop
|
|
# while true;do puppet agent -t;done
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for pe-371-master.puppetdebug.vlan
|
Info: Applying configuration version '1421168813'
|
Notice: Finished catalog run in 8.67 seconds
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for pe-371-master.puppetdebug.vlan
|
Info: Applying configuration version '1421168848'
|
Notice: Finished catalog run in 7.57 seconds
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for pe-371-master.puppetdebug.vlan
|
Info: Applying configuration version '1421168882'
|
Notice: Finished catalog run in 7.10 seconds
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for pe-371-master.puppetdebug.vlan
|
Info: Applying configuration version '1421168813'
|
Notice: Finished catalog run in 7.30 seconds
|
|
...
|
Edit /etc/puppetlabs/console-services/conf.d/classifier.conf and set the synchronization-period to 5 seconds in order to aggrivate the bug. Restart pe-console-services.
Outcome
With the sync period turned up, compilation fails on nearly every run due to sync activities loading classes that otherwise would not be loaded into the compiler:
# while true;do puppet agent -t;done
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: This class isn't implemented yet! at /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests/init.pp:3 on node pe-371-master.puppetdebug.vlan
|
Warning: Not using cache on failed catalog
|
Error: Could not retrieve catalog; skipping run
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: This class isn't implemented yet! at /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests/init.pp:3 on node pe-371-master.puppetdebug.vlan
|
Warning: Not using cache on failed catalog
|
Error: Could not retrieve catalog; skipping run
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: This class isn't implemented yet! at /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests/init.pp:3 on node pe-371-master.puppetdebug.vlan
|
Warning: Not using cache on failed catalog
|
Error: Could not retrieve catalog; skipping run
|
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: This class isn't implemented yet! at /etc/puppetlabs/puppet/environments/production/modules/compile_test/manifests/init.pp:3 on node pe-371-master.puppetdebug.vlan
|
Warning: Not using cache on failed catalog
|
Error: Could not retrieve catalog; skipping run
|
|
...
|
Expected Outcome
Classifier synchronization has no effect on which manifests are loaded for catalog compilation.
Attachments
Issue Links
- blocks
-
ENTERPRISE-488 Classifier synchronization can pull unused code into catalog compilation
-
- Resolved
-
-
SERVER-94 Environment Isolation
-
- Closed
-
- relates to
-
SERVER-1209 Acceptance: add test case for 'Server-1200'
-
- Closed
-
- links to