Giter Site home page Giter Site logo

sous-chefs / dhcp Goto Github PK

View Code? Open in Web Editor NEW
27.0 28.0 46.0 722 KB

Development repository for the dhcp cookbook

Home Page: https://supermarket.chef.io/cookbooks/dhcp

License: Apache License 2.0

Ruby 87.26% HTML 12.74%
chef-cookbook dhcp chef-resource chef hacktoberfest managed-by-terraform

dhcp's Introduction

DHCP Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

Installs and configures ISC DHCP server in both DHCP and DHCPv6 mode.

  • Supports setting up Master/Slave ISC DHCP failover (IPv4 only).
  • Includes Support for DDNS
  • Includes resources for managing:
    • Package installation
    • Service configuration and management
    • Global configuration
    • Hosts
    • Groups
    • Subnets
    • Shared subnets

Version 7.0.0 constitutes a major change and rewrite, please see UPGRADING.md.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If youโ€™d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Platforms

  • Debian / Ubuntu
  • RHEL/CentOS and derivatives
  • Fedora and derivatives

Requirements

  • Chef 15.3+

Usage

It is recommended to create a project or organization specific wrapper cookbook and add the desired custom resources to the run list of a node.

Example of a basic server listening on and issuing leases for the subnet 192.0.2.0/24.

dhcp_install 'isc-dhcp-server'

dhcp_service 'dhcpd' do
  ip_version :ipv4
  action [:create, :enable, :start]
end

dhcp_config '/etc/dhcp/dhcpd.conf' do
  allow %w(booting bootp unknown-clients)
  parameters(
    'default-lease-time' => 7200,
    'max-lease-time' => 86400,
    'update-static-leases' => true,
    'one-lease-per-client' => true,
    'authoritative' => '',
    'ping-check' => true
  )
  options(
    'domain-name' => '"test.domain.local"',
    'domain-name-servers' => '8.8.8.8, 8.8.4.4'
  )
  action :create
end

dhcp_subnet '192.0.2.0' do
  comment 'Basic Subnet Declaration'
  subnet '192.0.2.0'
  netmask '255.255.255.0'
  options [
    'routers 192.168.1.1',
  ]
  pool(
    'peer' => '192.168.0.2',
    'range' => '192.168.1.100 192.168.1.200'
  )
  parameters(
    'ddns-domainname' => '"test.domain"'
  )
end

External Documentation

Examples

Please check for more varied working examples in the test cookbook.

Resources

Known Issues

There are some known issues on Ubuntu when apparmor is running which may prevent the service from running properly. Please see the test cookbook for a possible work around that you can apply on your nodes.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

dhcp's People

Contributors

axelrtgs avatar bish0polis avatar bmhughes avatar cattywampus avatar ccrebolder avatar cshabi avatar damacus avatar datacoda avatar e100 avatar facastagnini avatar guilhem avatar itjamie avatar jmccann avatar johnroesler avatar joraff avatar josephholsten avatar kitchen-porter avatar masteinhauser avatar powerschill avatar ramereth avatar realloc avatar renovate[bot] avatar shortdudey123 avatar simonjohansson avatar spheromak avatar swalberg avatar tas50 avatar xorima avatar xorimabot avatar

Stargazers

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

Watchers

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

dhcp's Issues

Subnets without pools + failover does not work

v6.0.0

We happen to have many subnets in which only host reservations are supported, and no dynamic ranges are defined. We discovered that, upon trying to enable failover, any subnet with no associated ranges will fail with a template error as it tries to loop through ranges, which in these cases are nil.

We tracked it down to this line, wherein ranges being defined or having failover enabled are considered equal in determining if pool resources should be defined.

if data.key?('range') || node['dhcp']['failover']
pool do
range data['range'] if data.key? 'range'
peer node['domain'] if node['dhcp']['failover']
allow data['allow'] if data.key? 'allow'
end
end

Given that defined ranges are required in the template when defining a pool, and should be because dhcpd requires at least one range for every pool, this conditional should not check 'failover' and only check if there is a range.

Related - it's entirely valid to have a subnet declaration w/o a pool for a variety of reasons, and if it's for a subnet that's reservation-only, failover really isn't necessary since hosts always get the same IP (no need to share leases).

Attribute driven failover configuration?

I'm trying to gather this by reading the code, but I'm not having any success. So far I've set ['dhcp']['failover'] to true, and this:

default['dhcp']['masters'] = [
  { :name => 'master1',
    :ipaddress => '10.100.0.27'
  }
]

I don't see that anything is getting configured in /etc/dhcp/dhcpd.conf

Is there an attribute-driven way to configure failover?

RPM based systems fail (apt-get not guarded)

Cookbook version

5.4.1

Chef-client version

12.9.41

Platform Details

CentOS 7.3.1611

Scenario:

Use this cookbook to install and manage dhcp

Steps to Reproduce:

chef-client -o 'recipe[dhcp::server]'

Expected Result:

dhcp::_package should install dhcp package

Actual Result:

Chef fails because apt-get command does not exist on RPM based systems.
There is no guard to ensure apt_update 'update' is only run on Deb based systems. (_package.rb Line 1)

auto-partner-down invalid statement in peer declaration

Hitting this when trying to set up failover.

centos 6.9, dhcp-4.1.1-53.P1

dhcpd: /etc/dhcp/dhcpd.conf line 35: invalid statement in peer declaration
dhcpd:   auto-partner-down
dhcpd:    ^
dhcpd: Configuration file errors encountered -- exiting

Run latest cookstyle

๐Ÿ—ฃ๏ธ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

๐Ÿ‘ป Brief Description

Chef have released updated cookstyle rules, we should therefore run the auto fix against the cookbook

  1. Ensure you are on the latest stable chef-workstation
  2. Run cookstyle -a

Issue sprouted from sous-chefs/meta/issues/111. If not applicable then issue should be closed.

isc-dhcp-relay

Would you be interested in having isc-dhcp-relay support in this cookbook? I need this functionality and would be willing to submit a PR if it's something you'd like to include here.

Update to support ubuntu 16 and systemd instead of upstart

In dhcp/recipes/_service.rb
Figure remove the ubuntu 9 detection and just support Upstart and Systemd

service node['dhcp']['service_name'] do
  supports restart: true, status: true, reload: true
  action [:enable]
  case node['platform']
  when 'ubuntu'
    if node['platform_version'].to_f >= 16.04
      provider Chef::Provider::Service::Systemd
    else
      provider Chef::Provider::Service::Upstart
    end
  end
end

Update Changelog

๐Ÿ—ฃ๏ธ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

๐Ÿ‘ป Brief Description

Update all CHANGELOGs to follow standard defined at https://keepachangelog.com/

Issue sprouted from sous-chefs/meta/issues/101. If not applicable then issue should be closed.

Problem with include config file in config file?

Hi all,

I have started to use this cookbook and I can generate all my configs but when Chef tries to restart ISC-DHCP-Server on Debian I see this error:

Dec 06 10:03:07 isc-dhcp-server[26717]: /etc/dhcp/dhcpd.conf line 33: /etc/dhcp/shared_networks.d/vlan20_stack4.conf: bad parse.
Dec 06 10:03:07 isc-dhcp-server[26717]: include /etc/dhcp/shared_networks.d/vlan20_stack4.conf"

In dhcp.conf I have:
include "/etc/dhcp/shared_networks.d/vlan20_stack4.conf";

and in this file I have normal config like:

shared-network vlan20_stack4 { subnet 10.11.1.0 netmask 255.255.254.0 { pool { range 10.11.1.100 10.11.2.254; } option subnet-mask 255.255.254.0; option default-lease-time 86400; option deny unknown-clients; option max-lease-time 604800; option ntp-servers 10.10.0.1; option routers 10.11.98.1; } }

I use Jessie and last stable version of DHCP Server. I'm not using data_bags for networks etc. I have everything in my cookbook/recipes/default.rb

Thank you for any suggestions why is like that.

Best,
Rafal

Support for discontinuous subnet ranges

Looks like the lwrp only supports subnet ranges that are continuous, since the range attribute can only be a string.

Mind if I fork and expand to support an array of ranges?

Invalid config shouldn't stop dhcpd service

Hello,

It could be very cool that an invalid config change does not stop the service.
A simple notification-chain performing a config check before restarting the service should be enough I think:

template 'config_file' 
service 'dhcpd'

execute 'check_dhcp_conf' do
  action :nothing
  command "dhcp -t -cf #{config_file} -lf #{leases}"
  subscribes :run, 'template[config_file]', :delayed
  notifies :restart, 'service[dhcpd]'
end  

I don't have time to provide a complete PR right now, that's why I just create an issue.

Regards.

DHCP v6 Support

๐Ÿ—ฃ๏ธ Foreword

This is more of a RFC rather than a feature request as such as I'd plan on implementing the functionality myself but wanted to get a consensus on how to proceed first before starting as it will be a fair amount of work.

:person_frowning: Problem Statement

There is no support for managing an ISC DHCPv6 server.

โ” Possible Solution

Add the functionality to this cookbook

A lot of the current resources and recipes have v6 analogies and the server is ran by the same executable with the -6 flag so it would make some sense in this manner to add the functionality to this cookbook.

โคด๏ธ Describe alternatives you've considered

Create a new cookbook

If it is felt that it would be out-of-scope to add DHCPv6 support to this cookbook I'd look to create a new one instead.

โž• Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

doc & practice a release

I'd like to make sure we can still release this cookbook if we need to add a new maintainer. Could someone work to show me how to do a release?

dhcpd.conf - communities cookbook issue

errror executing action `create` on resource 'template[/etc/dhcp/dhcpd.conf]'

================================================================================




Chef::Mixin::Template::TemplateError

------------------------------------

undefined method `empty?' for nil:NilClass




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

  8: template node[:dhcp][:config_file] do
  9:   owner "root"
 10:   group "root"
 11:   mode 0644
 12:   source "dhcpd.conf.erb"
 13:   variables(
 14:     :allows => node[:dhcp][:allows] || [],
 15:     :parameters =>  node[:dhcp][:parameters] || [],
 16:     :options =>  node[:dhcp][:options] || [],
 17:     :masters => DHCP::DynaDns.masters,
 18:     :keys => DHCP::DynaDns.keys,
 19:     :my_ip => node[:ipaddress],
 20:     :role => DHCP::Failover.role,
 21:     :peer_ip => DHCP::Failover.peer,
 22:     :failover => DHCP::Failover.enabled?
 23:     )
 24:   action :create
 25:   notifies :restart, resources(:service => node[:dhcp][:service_name] ), :delayed
 26: end
 27:



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

template("/etc/dhcp/dhcpd.conf") do
  provider Chef::Provider::Template
  action [:create]
  retries 0
  retry_delay 2
  path "/etc/dhcp/dhcpd.conf"
  backup 5
  source "dhcpd.conf.erb"
  variables {:allows=>["booting", "bootp", "unknown-clients"], :parameters=>{"default-lease-time"=>"6400", "ddns-domainname"=>"\"book\"", "ddns-update-style"=>"interim", "max-lease-time"=>"86400", "update-static-leases"=>"true", "one-lease-per-client"=>"true", "authoritative"=>"", "ping-check"=>"true", "next-server"=>"172.16.0.101", "filename"=>"\"pxelinux.0\""}, :options=>{"domain-name"=>"\"book\"", "domain-name-servers"=>"8.8.8.8", "host-name"=>" = binary-to-ascii (16, 8, \"-\", substring (hardware, 1, 6))"}, :masters=>nil, :keys=>nil, :my_ip=>"192.168.211.165", :role=>nil, :peer_ip=>nil, :failover=>false}
  cookbook_name "dhcp"
  recipe_name "_config"
  owner "root"
  group "root"
  mode 420
end



Template Context:
-----------------
on line #18
 16: <% end -%>
 17:
 18: <% unless @keys.empty? -%>
 19:   <% @keys.each do |key, data| -%>
 20: key "<%= key %>" {

Undefined method blank? in dynadns library

I am trying to use the latest version of the DHCP cookbook and am getting this error:

  NoMethodError
  -------------
  undefined method `blank?' for "127.0.0.1":String

  Relevant File Content:
  ----------------------
  /var/chef/cache/cookbooks/dhcp/libraries/dynadns.rb:

   26:          masters ||= {}
   27:          return unless @zones
   28:          @zones.each do |zone|
   29:            name = zone['zone_name']
   30:            masters[name] ||= {}
   31:
   32:            # set to global master by default
   33>>           if node['dns'].key?(:master) && node['dns']['master'].blank? == false
   34:              masters[name]['master'] = node['dns']['master']
   35:            end
   36:
   37:            if node['dns'].key?(:rndc_key) && node['dns']['rndc_key'].blank? == false
   38:              masters[name]['key'] = node['dns']['rndc_key']
   39:            end
   40:
   41:            # use zone bag override if it exists
   42:            if zone.key?('master_address') && zone['master_address'].blank? == false

The relevant attributes in my wrapper cookbook are:

default[:dns][:master] = "127.0.0.1"
default[:dns][:rndc_key] = "rndc-key"

I am not really sure what the error is here as I have been using an older version of the cookbook (very old in fact 2.1.1) and this was not an issue. The versions of software I am using are as follows:

Ubuntu: 14.04.3
Ruby: 2.2.4
Chef: 12.6.0

I can only think it is do with the versions somehow or I am missing something obvious. Any assistance gratefully received.

Thanks, Russell

Option range must be a kind of Array!

When attempting to converge test-kitchen instance you will receive:

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/dhcp/recipes/server.rb
       ================================================================================

       Chef::Exceptions::ValidationFailed
       ----------------------------------
       Option range must be a kind of Array!  You passed "192.168.9.50 192.168.9.240".

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/dhcp/recipes/_networks.rb:24:in `block (2 levels) in from_file'
         /tmp/kitchen/cache/cookbooks/dhcp/recipes/_networks.rb:19:in `block in from_file'
         /tmp/kitchen/cache/cookbooks/dhcp/recipes/_networks.rb:10:in `each'
         /tmp/kitchen/cache/cookbooks/dhcp/recipes/_networks.rb:10:in `from_file'
         /tmp/kitchen/cache/cookbooks/dhcp/recipes/server.rb:30:in `from_file'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/dhcp/recipes/_networks.rb:

        17:    next unless data
        18:    # run the lwrp with the bag data
        19:    dhcp_subnet data['address'] do
        20:      broadcast data['broadcast']
        21:      netmask data['netmask']
        22:      routers data['routers'] || []
        23:      options data['options'] || []
        24>>     range data['range'] || ''
        25:      ddns data['ddns'] if data.key? 'ddns'
        26:      conf_dir node[:dhcp][:dir]
        27:      peer node[:domain] if node[:dhcp][:failover]
        28:      evals data['evals'] || []
        29:      key data['key'] || {}
        30:      zones data['zones'] || []
        31:    end
        32:  end
        33:  

Option hosts must be a kind of Hash

Hi,

When trying to load from a dhcp_groups data bags, I'm getting,

Option hosts must be a kind of Hash! You passed [].
hosts group_data[:hosts] || []

Under: Chef 11.10.4

Switching to group_data['hosts'] works fine so it's something to do with indifferent access on the hash returned from data bags. Did it work before? (I don't see group data bags as part of the testkitchen) Thanks.

Any way to manage hosts outside of databags or recipes?

I just set up dhcp via this CB and I want to on demand add host entries. I don't want to manage a data bag or add stanza's to the recipe and wait for a chef converge. I want to add a host entry and restart dhcp right then.

Am I missing a way to include a configuration file outside of chef?
Am I missing a way to do this via dataBags ( download DB, add json, upload, blech! I don't want knife creds on this box) or some other way?

Is this a useful feature to include, I could do it if you tell me where to put it.

Test Coverage

Want to get kitchen and some better integration testing involved here.

Chef 13.2.20 support?

Cookbook version

5.4.0

Chef-client version

13.2.20

Platform Details

GCE ubuntu 14.04

       ================================================================================          
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/dhcp/attributes/default.rb           
       ================================================================================          
                                                                                                 
       NoMethodError                                                                             
       -------------                                                                             
       undefined method `domain' for #<Chef::Node::Attribute:0x00000004bdbd80>                   
                                                                                                 
       Cookbook Trace:                                                                           
       ---------------                                                                           
         /tmp/kitchen/cache/cookbooks/dhcp/attributes/default.rb:39:in `from_file'               
                                                                                                 
       Relevant File Content:                                                                    
       ----------------------                                                                    
       /tmp/kitchen/cache/cookbooks/dhcp/attributes/default.rb:                                  
                                                                                                 
        32:  default['dhcp']['group_data'] = {}                                                  
        33:  default['dhcp']['network_data'] = {}                                                
        34:  default['dhcp']['shared_network_data'] = {}                                         
        35:                                                                                      
        36:  defined?(domain) || default['domain'] = 'local'                                     
        37:                                                                                      
        38:  default['dhcp']['parameters']['default-lease-time'] = '6400'                        
        39>> default['dhcp']['parameters']['ddns-domainname'] = "\"#{domain}\""    

Fix encoding issue when using chef-client cookbook

When you use the chef-client cookbook to automatically run the client on each node every n-th minutes the dhcp-cookbook will throw an encoding exception.

The chef-client process runs like this:

/opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 180 -s 30 -L /var/log/chef/client.log

This is the output:

[2014-07-04T13:38:57+02:00] INFO: Running queued delayed notifications before re-raising exception
[2014-07-04T13:38:57+02:00] ERROR: Running exception handlers
[2014-07-04T13:38:57+02:00] ERROR: Exception handlers complete
[2014-07-04T13:38:57+02:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-07-04T13:38:57+02:00] ERROR: service[isc-dhcp-server] (dhcp::_service line 3) had an error: ArgumentError: invalid byte sequence in US-ASCII
[2014-07-04T13:38:57+02:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

And this is the stack trace:

Generated at 2014-07-04 13:38:57 +0200
ArgumentError: service[isc-dhcp-server] (dhcp::_service line 3) had an error: ArgumentError: invalid byte sequence in US-ASCII
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/service/upstart.rb:126:in `==='
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/service/upstart.rb:126:in `block in load_current_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/service/upstart.rb:123:in `open'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/service/upstart.rb:123:in `load_current_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider.rb:103:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource.rb:637:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:345:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:431:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application.rb:217:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:328:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:317:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:317:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `<main>'

The locales on the Ubuntu node are:

# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

The CHEF-3304 ticket seems to be related. A suggestion is to explicitly set the encoding in each recipe:

# encoding: UTF-8

When running chef-client manually from the CLI everything works fine.

Remove .rubocop.yml with Dangerfile

๐Ÿ—ฃ๏ธ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

๐Ÿ‘ป Brief Description

If the only thing in the .rubocop/yml is Dangerfile
Run the latest cookstyle
Remove .rubpopo.yml

Issue sprouted from sous-chefs/meta/issues/108. If not applicable then issue should be closed.

Support of network-wide interface parameter

It looks like you can only set the interface attribute for the whole dhcpd server. It is not possible to assign a subnet to a specific NIC. I would expect to have an additional configuration parameter in the networks data bag, e.g.: interface: "eth1".

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.1.1
  • actions/checkout v4
  • actionshub/chef-install 3.0.0
  • actionshub/test-kitchen 3.0.0
.github/workflows/stale.yml
  • actions/stale v9

  • Check this box to trigger a request for Renovate to run again on this repository

currently cant override most templates as they are inside providers - eg subnet.erb and subnet-pool.erb

:person_frowning: Problem Statement

Currently it does not appear to be feasible to overwrite the subnet.erb and subnet-pool.erb (called from within subnet.erb) that are called from the provider subnet.rb.

I need to be able to write some custom lines into each subnet-pool.erb entry to define monitoring variables that another tool will read from the subnet files.

โ” Possible Solution

additional variable options on the pool config that is added to the file.
though having the ability to overwrite the erb files in the providers would also be excellent

โž• Additional context

monitoring tool example conf http://folk.uio.no/trondham/software/dhcpd-pool.html for an example of one of these tools

dhcp_subnet lacks 'on' functionality

as of version 3.1.0

subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers  192.168.1.2;

    on commit {
        set clip = binary-to-ascii(10, 8, ".", leased-address);
        set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
        execute("/usr/local/sbin/dhcpevent", "commit", clip, clhw, host-decl-name);
    }

There are three kinds of events that can happen regarding a lease, and it is possible to declare statements that occur when any of these events happen. These events are the commit event, when the server has made a commitment of a certain lease to a client, the release event, when the client has released the server from its commitment, and the expiry event, when the commitment expires.
To declare a set of statements to execute when an event happens, you must use the on statement, followed by the name of the event, followed by a series of statements to execute when the event happens, enclosed in braces.

Update builds to be parallel

๐Ÿ—ฃ๏ธ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

๐Ÿ‘ป Brief Description

As part of our build process we should build each possible operating system separately

  1. Ensure you have dokken setup and working:
  2. dokken: aliased to KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen
  3. run dokken list, you should see a list of builds with dokken as the provider
  4. download: https://github.com/sous-chefs/repo-management/blob/master/scripts/circleci_maker.rb and make this executable
  5. run: dokken list -j | ./circleci_maker.rb > .circleci/config.yml

Issue sprouted from sous-chefs/meta/issues/112. If not applicable then issue should be closed.

Update supermarket

Hi,

Latest update on supermarket was released in 2012, can you update with the latest version?

Regards

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.