Comments (8)
Hi @nigemar, we've a test for the interfaces
parameter which works:
https://github.com/voxpupuli/puppet-dhcp/blob/master/spec/classes/dhcp_spec.rb#L68
Maybe the hiera lookup isn't working properly? Can you implement a notice
to verify the content of $interfaces
in your profile?
from puppet-dhcp.
Hi @bastelfreak, I will try this again.
cheers
-Nigel
from puppet-dhcp.
Hi,
Unfortunately the issue still persists:
Puppet run with a notify:
root@grace# puppet agent -t
Info: Using configured environment 'master'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for grace.network.local
Info: Applying configuration version 'puppet-master-889eb9d1868'
Notice: Inside the base class
Notice: /Stage[main]/Profile::Base/Notify[Inside the base class]/message: defined 'message' as 'Inside the base class'
Notice: Inside the dhcp class interface: eno1
Notice: /Stage[main]/Profile::Dhcp/Notify[Inside the dhcp class interface: eno1]/message: defined 'message' as 'Inside the dhcp class interface: eno1'
Notice: Applied catalog in 0.40 seconds
I had to disable the class, so now here is the run with the class enabled
root@grace# puppet agent -t
Info: Using configured environment 'master'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, You need to set $interfaces in dhcp (file: /etc/puppetlabs/code/environments/master/modules/dhcp/manifests/init.pp, line: 104, column: 5) on node grace.network.local
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run`
Cheers
-Nigel
from puppet-dhcp.
Can you please provide a PR that uses your code as an acceptance test?
from puppet-dhcp.
Just checking you want a pull request which includes:
- role
- profile
- manifest
- node yaml
Is that correct?
from puppet-dhcp.
Pull request created.
All data under tests directory.
from puppet-dhcp.
I have tested this on Centos 7 and I get the same response:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, You need to set $interfaces in dhcp (file: /etc/puppetlabs/code/environments/master/modules/dhcp/manifests/init.pp, line: 104, column: 5) on node grace.network.local
Class is still the same.
from puppet-dhcp.
I think I have this sorted, perhaps its my lack of understanding of how to implement this class, but I have this work around, but explicitly setting the interface and interfaces value being passed to class.
# Class: profile::dhcp()
class profile::dhcp(
String $dns_server,
String $gateway,
String $pxe_server,
Array[String] $interfaces,
Optional[String] $interface = 'NOTSET',
){
class { 'dhcp':
service_ensure => running,
dnsdomain => [
'network.local',
'0.168.192.in-addr.arpa',
],
nameservers => [$dns_server],
ntpservers => ['192.168.0.1'],
interfaces => $interfaces,
pxeserver => $pxe_server,
pxefilename => 'pxelinux.0',
}
dhcp::pool {'sn_192.168.0.0' :
network => '192.168.0.0',
mask => '255.255.255.0',
range => '192.168.0.120 192.168.0.140',
nameservers => [$dns_server],
gateway => $gateway,
}
}
from puppet-dhcp.
Related Issues (20)
- Insert possibility to enable host declaration without IP. HOT 1
- Documentation example uses Bind module with no reference (or suggestions)
- All Numeric MAC causes Detail: undefined method `upcase' HOT 10
- Centos 7 Failover fails HOT 1
- Boot filename per client architecture
- Add support of shared-network option HOT 3
- Could not find dependent Service[dhcpd] for File[/etc/systemd/system/dhcpd.service] when manage_service is false HOT 1
- DHCPDARGS from /etc/sysconfig/dhcpd not used on RHEL7. HOT 1
- INTERFACES default option deprecated on Debian 9
- Used pool and class
- Support subclass ?
- Switch from Dhcp::Syslogfacility to Stdlib::Syslogfacility
- Support hostnames for fixed-address parameter in dhcp::host
- bootp is disabled upon failover configuration, while this should not be HOT 1
- pxeserver parameter no longer supports hostnames, only IP address
- Indefinite lease time broken by #219 HOT 1
- Add event handlers to main and pool config - Enhancement
- in pool manifest, for options, an array is allowed but fails HOT 1
- Question on support for Puppet 8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-dhcp.