Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using token_file and some Influx API methods #111

Open
mdetrano opened this issue Jul 22, 2024 · 0 comments
Open

Problem when using token_file and some Influx API methods #111

mdetrano opened this issue Jul 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mdetrano
Copy link

Describe the Bug

Ran into an issue using the influxdb_bucket resource to create a bucket on a remote system (not managed by Puppet at all). For the token I used the "token_file" parameter. The bucket seems to have been created correctly but when running Puppet agent I got a confusing error message about "CR/LF" not being allowed in the http header.

Expected Behavior

Bucket should be created with no error message.

Steps to Reproduce

Steps to reproduce the behavior:
define an influxdb_bucket resource, using 'host' and 'token_file" parameters, to create the bucket on a remote host from the puppet agent

Environment

  • Version [e.g. 1.27.0]: puppetlabs-influxdb (v2.4.0)
  • Platform: official Puppet contianer (with this module added)

Additional Context

I could resolve the problem by changing this line (66) in: lib/puppet_x/puppetlabs/influxdb/influxdb.rb

from: token = File.read(@token_file)

to: token = File.read(@token_file).chomp

(File.read seems to add a newline that is not in the original file)

@mdetrano mdetrano added the bug Something isn't working label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant