Closed vlad-stoian closed 6 years ago
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.
The labels on this github issue will be updated when the story is started.
@vlad-stoian can you share any analysis of why this happens? It's in a comment block, so wouldn't have thought it would cause an issue.
I would've never guessed it as well.
We started seeing the problem when we tried using special characters in RabbitMQ passwords. OpsManager will transform some of them using the Unicode encoding. For example &
will be passed into the BOSH manifest as \u0026
. When we used &
in our passwords, we started seeing this BOSH error:
Task 75379 | 15:32:33 | Error: Unable to render instance groups for deployment. Errors are:
- Unable to render jobs for instance group 'rmq'. Errors are:
- Unable to render templates for job 'service-metrics'. Errors are:
- Error filling in template 'service_metrics_ctl.erb' (line 56: incompatible character encodings: ASCII-8BIT and UTF-8)
The service-metrics
job was set up something along these lines:
- name: service-metrics
properties:
service_metrics:
execution_interval_seconds: 30
metrics_command: "/var/vcap/packages/rabbitmq-server-metrics/bin/rabbitmq-server-metrics"
metrics_command_args:
- "-erlangBinPath=/var/vcap/packages/erlang/bin/"
- "-rabbitmqCtlPath=/var/vcap/packages/rabbitmq-server/bin/rabbitmqctl"
- "-logPath=/var/vcap/sys/log/service-metrics/rabbitmq-server-metrics.log"
- "-rabbitmqUsername=admin"
- "-rabbitmqPassword=!@£$%^\u0026*()_+=-:;?"
- "-rabbitmqApiEndpoint=http://127.0.0.1:15672"
origin: cf-rabbitmq-153251787
There are a few interesting observations here:
cf-rabbitmq-release
, does not have the same effect.!@£$%^\u0026*()_+=-:;?
from service_metrics.metrics_command_args
to service_metrics.origin
, or anywhere else, still has the issue, so we pinpointed the problem was with the service_metrics_ctl.erb
file in particular.file -I service_metrics_ctl.erb
gave this output charset=utf-8
as opposed to all of our bosh templates which are charset=us-ascii
iconv -f utf-8 -t ascii//TRANSLIT < service_metrics_ctl.erb > service_metrics_ctl.erb.reencoded
and then did a diff, and the only character that was different was that one quote characterThe last thing was testing this crazy hypothesis that that one quote was affecting everything. We manually created a service metrics with the ascii version of the quote, tested it, and it worked.
The reason we changed it everywhere is to prevent future copy-paste errors, at least in this release repo.
Hope this clarifies a little bit what the error is, although it is not quite straight forward.
@cppforlife FYI this issue sounds like something that may interest you.
Thanks!
[#153251787]
Signed-off-by: Vlad Stoian vstoian@pivotal.io