The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #19655

"invalid byte sequence" with service provider upstart

Added by Patrick Hemmer about 3 years ago. Updated over 2 years ago.

Status:Needs DecisionStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:utf8
Target version:-
Affected Puppet version:3.1.0 Branch:
Keywords:service upstart

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1055


Description

I am sometimes getting “invalid byte sequence in US-ASCII” when using the Service type with the upstart provider. (I am not manually setting provider => 'upstart', it is being set based on OS detection). The problem seems to randomly pop up, and then goes away on its own. I did manage to capture the output of agent --trace during one run when the issue occurred.

This is with Ubuntu 12.04.1 and ruby 1.9.3-p0

Error: /Stage[main]/Ipa::Client::Basic/Service[sssd]: Could not evaluate: invalid byte sequence in US-ASCII
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `match'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `match'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `block in enabled_post_0_9_0?'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:203:in `each_line'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:203:in `enabled_post_0_9_0?'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:101:in `enabled?'
/usr/lib/ruby/vendor_ruby/puppet/type/service.rb:56:in `retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1027:in `block in retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1022:in `each'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1022:in `retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1041:in `retrieve_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:32:in `perform_changes'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:133:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:48:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:83:in `eval_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block (2 levels) in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `block in thinmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:382:in `traverse'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:98:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:144:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:122:in `block in apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:179:in `block in benchmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:121:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:179:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (5 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
/usr/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:338:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:312:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `
'

Related issues

Related to Puppet - Bug #20522: Improve Puppet's handling of non-ASCII character encodings Accepted
Related to Puppet - Bug #11303: Puppet should support UTF-8 comments in manifests Closed 12/08/2011

History

#1 Updated by Patrick Hemmer about 3 years ago

gah, forgot about formatting the big ugly blob.

Error: /Stage[main]/Ipa::Client::Basic/Service[sssd]: Could not evaluate: invalid byte sequence in US-ASCII
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `match'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `match'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:204:in `block in enabled_post_0_9_0?'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:203:in `each_line'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:203:in `enabled_post_0_9_0?'
/usr/lib/ruby/vendor_ruby/puppet/provider/service/upstart.rb:101:in `enabled?'
/usr/lib/ruby/vendor_ruby/puppet/type/service.rb:56:in `retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1027:in `block in retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1022:in `each'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1022:in `retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1041:in `retrieve_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:32:in `perform_changes'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:133:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:48:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:83:in `eval_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block (2 levels) in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `block in thinmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:382:in `traverse'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:98:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:144:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:122:in `block in apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:179:in `block in benchmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:121:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:179:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (5 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
/usr/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:338:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:312:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `<main>'

#2 Updated by Patrick Hemmer about 3 years ago

Found the issue is solved by setting the environment variable LC_ALL=en_US.UTF-8.
As a possible fix, the following might be acceptable:

Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

#3 Updated by Charlie Sharpsteen about 3 years ago

  • Description updated (diff)

#4 Updated by Charlie Sharpsteen about 3 years ago

  • Category changed from service to utf8
  • Keywords changed from ubuntu to service upstart

#5 Updated by Rob Nelson over 2 years ago

  • Status changed from Unreviewed to Needs Decision

Referring to product owner for decision

#6 Updated by Patrick Hemmer over 2 years ago

Redmine Issue #19655 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1055

Also available in: Atom PDF