Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
- New tests should reproduce this issue and demonstrate the fix
-
Platform Core
-
3
-
AP 2017-01-11, AP 2017-03-08, Agent 2017-03-22, Platform Core KANBAN
-
Bug Fix
-
-
No Action
-
Provider failure isn't catastrophic; tested in unit, so no additional work required
Description
When a service resource uses the parameter `hasstatus => false`, puppet will search the output of `ps -ef` to determine the status of the service.
If the output of `ps -ef` happens to contain non-ASCII characters, we see the following stack trace:
Error: /Stage[main]/Automic/Service[automic]: Could not evaluate: invalid byte sequence in US-ASCII
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:38:in `match'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:38:in `block (2 levels) in getpid'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:37:in `each_line'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:37:in `block in getpid'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:36:in `popen'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:36:in `getpid'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/base.rb:66:in `status'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb:110:in `retrieve'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1068:in `retrieve'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1096:in `retrieve_resource'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:221:in `from_resource'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:19:in `evaluate'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:212:in `apply'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:228:in `eval_resource'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:151:in `call'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:151:in `block (2 levels) in evaluate'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
|
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:151:in `block in evaluate'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:142:in `evaluate'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:118:in `as_logging_destination'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
|
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:315:in `run_internal'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:in `override'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:98:in `with_client'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:65:in `run_in_fork'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:331:in `run_command'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:128:in `run'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
|
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
|
Could puppet avoid this error by translating the output to ASCII-8BIT encoding in the Puppet provider before doing regex matches?
Attachments
Issue Links
- relates to
-
PUP-6925 Convert Ruby ::File calls for open to Puppet::FileSystem and explicitly specify encoding
-
- Closed
-
-
PUP-7134 Convert Ruby ::File calls for open to Puppet::FileSystem and explicitly specify encoding for SSL files
-
- Closed
-
-
PUP-6432 Puppet::Util::Execution.execute cannot handle Unicode output on Windows
-
- Ready for Engineering
-
- links to