voxpupuli / puppet-dhcp

Puppet module for deploying dhcp
https://forge.puppet.com/puppet/dhcp
Apache License 2.0
41 stars 136 forks source link

Indefinite lease time broken by #219 #245

Closed h0tw1r3 closed 4 years ago

h0tw1r3 commented 4 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

class { 'dhcp':
  default_lease_time => -1,
  max_lease_time     => -1,
}

What are you seeing

error

What behavior did you expect instead

isc dhcp supports indefinite timeout as -1

Output log

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Dhcp]: parameter 'default_lease_time' expects an Integer[1] value, got Integer[-1, -1] parameter 'max_lease_time' expects an Integer[1] value, got Integer[-1, -1] (file: test.pp, line: 16, column: 3) on node test.local

Any additional information you'd like to impart

isc dhcp supports indefinite leases by setting timeout to -1

alexjfisher commented 4 years ago

@h0tw1r3 Thanks for reporting this. Since the fix is trivial, I've opened a PR.