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

TOML module breaking changes #41

Closed
tarak opened this issue Jun 12, 2017 · 2 comments
Closed

TOML module breaking changes #41

tarak opened this issue Jun 12, 2017 · 2 comments

Comments

@tarak
Copy link

tarak commented Jun 12, 2017

PR #39 should fix this:

  * telegraf_config[default] action create
    * chef_gem[toml-rb] action install (up to date)

    ================================================================================
    Error executing action `create` on resource 'telegraf_config[default]'
    ================================================================================

    NoMethodError
    -------------
    undefined method `dump' for TOML:Module

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/telegraf/resources/config.rb:46:in `block (2 levels) in class_from_file'
    /var/chef/cache/cookbooks/telegraf/resources/config.rb:45:in `block in class_from_file'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/telegraf_wrapper/recipes/_config.rb

     47: telegraf_config 'default' do
     48:   config node['telegraf']['config']
     49:   inputs node['telegraf']['inputs']
     50:   outputs node['telegraf']['outputs']
     51: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/telegraf_wrapper/recipes/_config.rb:47:in `from_file'

    telegraf_config("default") do
      action [:create]
      default_guard_interpreter :default
      declared_type :telegraf_config
      cookbook_name "telegraf_wrapper"
      recipe_name "_config"
      config {"tags"=>{}, "agent"=>{"interval"=>"10s", "round_interval"=>true, "flush_interval"=>"10s", "flush_jitter"=>"5s"}}
      inputs {"cpu"=>{"percpu"=>false, "totalcpu"=>true, "collect_cpu_time"=>false}, "disk"=>{"ignore_fs"=>["tmpfs", "devtmpfs"]}, "diskio"=>{}, "kernel"=>{}, "mem"=>{}, "processes"=>{}, "swap"=>{}, "system"=>{}, "filestat"=>{"files"=>["/var/log/**.log"]}, "kernel_vmstat"=>{}, "net"=>{}, "netstat"=>{}}
      outputs {"influxdb"=>{"urls"=>["http://idb-01.admin.....:8086"], "retention_policy"=>"", "write_consistency"=>"any", "timeout"=>"5s", "username"=>"telegraf", "password"=>"*******", "database"=>"metrics", "user_agent"=>"telegraf"}}
    end

    System Info:
    ------------
    chef_version=13.1.31
    platform=ubuntu
    platform_version=16.04
    ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
    program_name=chef-client worker: ppid=16435;start=09:57:50;
    executable=/opt/chef/bin/chef-client
@codylewandowski
Copy link
Contributor

codylewandowski commented Jun 14, 2017

We're seeing the same issue as above for all of our instances running both the the Influx cookbook and this cookbook. It appears that since the toml-rb ruby gem had naming overlap issues with the toml gem, there are issues resolving the correct gem name. The latest version of the toml-rb gem (released today) should fix this. I would open a PR to fix the issue, but #39 would also appear to mitigate this issue.

This was referenced Jun 14, 2017
@fishnix
Copy link
Contributor

fishnix commented Jun 14, 2017

Release 0.5.0 should fix this issue. Thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants