GithubHelp home page GithubHelp logo

Comments (10)

petems avatar petems commented on August 17, 2024

@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.

alexjfisher avatar alexjfisher commented on August 17, 2024

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.

petems avatar petems commented on August 17, 2024

Typo, shoudve been cant :)

from puppet-dhcp.

ppouliot avatar ppouliot commented on August 17, 2024

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.

ppouliot avatar ppouliot commented on August 17, 2024

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.

petems avatar petems commented on August 17, 2024

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.

ppouliot avatar ppouliot commented on August 17, 2024

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.

ppouliot avatar ppouliot commented on August 17, 2024

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.

ekohl avatar ekohl commented on August 17, 2024

Now #110 is merged, can this be closed?

from puppet-dhcp.

alexjfisher avatar alexjfisher commented on August 17, 2024

@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)

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.