Giter VIP home page Giter VIP logo

kafka's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kafka's Issues

Transfer ownership on Chef Supermarket?

Heya, not really sure if this is the best way to get in contact, but figured I'd give it a try.

I maintain a kafka cookbook (that in fact was based on this one way-back-when :)), and some users have reached out wondering if it would be possible to transfer the ownership of the kafka cookbook that's present on Supermarket (as it's marked as deprecated)?
The thought is then to have version >= 2 be the "new" version while < 2 being the deprecated one. I've seen this done for gems on rubygems.org and haven't personally encountered any problems with that.

Is this something that would be possible? /cc @tas50

Fails to set broker_id

This cookbook fails to setup the broker_id

Setup

      ================================================================================
       Recipe Compile Error in /tmp/kitchen/cookbooks/ND-Kafka/recipes/default.rb
       ================================================================================

       Chef::Exceptions::ImmutableAttributeModification
       ------------------------------------------------
       Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cookbooks/kafka/recipes/default.rb:30:in `from_file'
         /tmp/kitchen/cookbooks/ND-Kafka/recipes/default.rb:12:in `from_file'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cookbooks/kafka/recipes/default.rb:

        23:
        24:  java_home   = node['java']['java_home']
        25:
        26:  user = node[:kafka][:user]
        27:  group = node[:kafka][:group]
        28:
        29:  if node[:kafka][:broker_id].nil? || node[:kafka][:broker_id].empty?
        30>>     node[:kafka][:broker_id] = node[:ipaddress].gsub(".","")
        31:  end
        32:
        33:  if node[:kafka][:broker_host_name].nil? || node[:kafka][:broker_host_name].empty?
        34:      node[:kafka][:broker_host_name] = node[:fqdn]
        35:  end
        36:
        37:  log "Broker id: #{node[:kafka][:broker_id]}"
        38:  log "Broker name: #{node[:kafka][:broker_host_name]}"
        39:


       Running handlers:

       Running handlers complete

       [2015-02-04T22:35:24+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       Chef Client failed. 0 resources updated in 1.070498634 seconds
       [2015-02-04T22:35:24+00:00] ERROR: Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
       [2015-02-04T22:35:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-ubuntu-1204>.
>>>>>> Please see .kitchen/logs/default-ubuntu-1204.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json
']
>>>>>> ----------------------

Notice how line 30 should have set node[:kafka][:broker_id] to the ip address?

Wrapper cookboook

$cat foobar-Kafka/attributes/customize.rb
normal[:java][:jdk_version] = '7'
normal[:kafka][:version] = "0.7.0"
$cat foobar-Kafka/Berksfile

source "https://supermarket.getchef.com"
metadata
cookbook 'java'
cookbook 'kafka'
$tail foobar-Kafka/metadata.rb
...
depends 'apt', '~> 2.3.0'
depends 'yum', '~> 3.0.0'
depends 'java', '~> 1.29.0'
depends 'kafka', '~> 1.0.20'
$cat foobar-Kafka/.kitchen.yml

---
driver:
  name: vagrant

provisioner:
  name: chef_solo

platforms:
  - name: ubuntu-12.04
  # - name: centos-6.4

suites:
  - name: default
    run_list:
      - recipe[apt]
      - recipe[ND-Kafka::default]
    attributes:

Then run kitchen create. It will fail

I'm new to chef, so I'm not sure how to work around this.

Required Parameters are not documented

If you attempt to setup with test kitchen, you will get an error "ERROR: Node attributes are read-only when you do not specify which precedence level to set."

You must specify [:kafka][:broker_id] in attributes/default.rb to work around it.

-----> Chef Omnibus installation detected (install only if missing)
       Transferring files to <default-ubuntu-1204>
       Starting Chef Client, version 12.0.3
       Compiling Cookbooks...

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cookbooks/ND-Kafka/recipes/default.rb
       ================================================================================

       Chef::Exceptions::ImmutableAttributeModification
       ------------------------------------------------
       Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cookbooks/kafka/recipes/default.rb:30:in `from_file'
         /tmp/kitchen/cookbooks/ND-Kafka/recipes/default.rb:12:in `from_file'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cookbooks/kafka/recipes/default.rb:

        23:
        24:  java_home   = node['java']['java_home']
        25:
        26:  user = node[:kafka][:user]
        27:  group = node[:kafka][:group]
        28:
        29:  if node[:kafka][:broker_id].nil? || node[:kafka][:broker_id].empty?
        30>>     node[:kafka][:broker_id] = node[:ipaddress].gsub(".","")
        31:  end
        32:
        33:  if node[:kafka][:broker_host_name].nil? || node[:kafka][:broker_host_name].empty?
        34:      node[:kafka][:broker_host_name] = node[:fqdn]
        35:  end
        36:
        37:  log "Broker id: #{node[:kafka][:broker_id]}"
        38:  log "Broker name: #{node[:kafka][:broker_host_name]}"
        39:


       Running handlers:

       Running handlers complete


       Chef Client failed. 0 resources updated in 1.083742411 seconds
       [2015-02-02T23:03:42+00:00] ERROR: Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
       [2015-02-02T23:03:42+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-ubuntu-1204>.
>>>>>> Please see .kitchen/logs/default-ubuntu-1204.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json
']

Update to 8.x

What are the current plans for upgrading support for kafka 8.x? Is it an easy change?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.