Comments (10)
@ppouliot What does the code you're using look like? Are you passing the mac address within quotes? It looks like its turning the mac address into a number
I'm trying to recreate in tests and I can get it to fail.
It'd be easy enough to fix IMO:
hardware ethernet <%= @mac.to_s.upcase %>;
from puppet-dhcp.
I'm trying to recreate in tests and I can get it to fail.
@petems You can get it to fail? I've not been able to yet.
from puppet-dhcp.
Typo, shoudve been cant :)
from puppet-dhcp.
So we're using hiera to push all data into the module. No quotes used on the mac address in the yaml files.
from puppet-dhcp.
Hiera i'm using is as follows:
dhcp::dnsdomain:
- contoso.ltd
- 0.168.192.in-addr.arpa
dhcp::nameservers:
- 192.168.0.1
- 192.168.0.2
dhcp::ntpservers:
- bonehed.lsc.mit.edu
dhcp::interfaces:
- eth0
dhcpdata:
contoso.ltd:
failover: dhcp-failover
network: 192.168.0.0
mask: 255.255.255.0
gateway: 192.168.0.254
range:
- 192.168.0.100
- 192.168.0.220
options:
- domain-name-servers 192.168.0.1
- domain-name "contoso.ltd"
- ntp-servers bonehed.lcs.mit.edu
parameters:
- ddns-domainname "contoso.ltd, 0.168.192.in-addr.arpa"
static_leases:
myhost:
mac: 00:1a:2b:3c:4d:5e
ip: 192.168.0.3
# Uncomment this entry to test mac addresses that are only numeric
# allnumericmac:
# mac: 00:07:43:14:15
from puppet-dhcp.
Ah, that would explain it. You might want to obfuscate the data btw, just in case.
Can you try putting quotes around the mac addresses in the yaml?
from puppet-dhcp.
so I'm trying that now, here's the output from data, and it's not actually my working data, it's just basics for testing the modules. I've got 15000 lines of hiera we feed into the module with our specifics.
When I add quotes to my code defining the record I get this as output in the dhcpd.hosts file.
host allnumericmac {
hardware ethernet 6535303;
fixed-address 192.168.0.4;
ddns-hostname "allnumericmac";
}
from puppet-dhcp.
So quotes in the hiera appears to work.
Output after adding quotes for the record is as follows.
host allnumericmac {
hardware ethernet 00:07:43:14:15:30;
fixed-address 192.168.0.4;
ddns-hostname "allnumericmac";
}
from puppet-dhcp.
Now #110 is merged, can this be closed?
from puppet-dhcp.
@ekohl I think so. @ppouliot has a solution and we've got extra validation in the module from now on.
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)
- 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 ?
- Ubuntu 18.04 Interfaces not set HOT 8
- 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.