Currently, use_cached_catalog and pluginsync can be set to "conflicting" values, causing the agent to use different versions of plugins than the catalog. For example, the catalog could contain a new resource parameter that the older pluginsync'ed lib/puppet/type/foo.rb doesn't know about. Ideally, pluginsync should only occur when requesting a new catalog, and skipped when applying a cached catalog. However, we cannot ignore pluginsync without a deprecation cycle.
For 4.4, if use_cached_catalog is true, then we will change the default value of pluginsync. However, if pluginsync is explicitly set on the command line or puppet.conf, then that should always win.
For this ticket:
If pluginsync is set explicitly, then do
If use_cached_catalog is false, then pluginsync should default to true.
If use_cached_catalog is true, then pluginsync should default to false, so that we use the same set of plugins that matched the catalog when it was compiled.
If use_cached_catalog is true, but it doesn't have a cached catalog, but due to usecacheonfailure requests a new catalog, then we should probably set pluginsync=true unless the user explicitly set pluginsync=false.
There is a separate ticket to deprecate pluginsync.