wwctl writes wrong ip addresses to dhcp.conf

174 views
Skip to first unread message

Ziad Boutanios

unread,
May 9, 2023, 2:28:34 AM5/9/23
to Warewulf
Hi,

I installed WW 4 in a KVM VM running Rocky 9. Here is my warewulf.conf below, where the IP addresses match the KVM `default` network. Please note that `192.168.122.1` is static, but the KVM `default` network runs a DHCP server based on `dnsmasq`.

```warewulf.conf
ipaddr: 192.168.122.1
netmask: 255.255.255.0
warewulf:
  port: 9873
  secure: false
  update interval: 60
dhcp:
  enabled: true
  range start: 192.168.122.50
  range end: 192.168.122.99
  template: default
  systemd name: dhcpd
tftp:
  enabled: true
  tftproot: /var/lib/tftpboot
  systemd name: tftp
nfs:
  systemd name: nfs-server
  exports:
    - /home
    - /var/warewulf
```

When I try to configure all with `wwctl configure --all`, I get the following error,

```bash
[root@localhost warewulf]# wwctl configure --all
Building overlay for localhost.localdomain: host
Enabling and restarting the DHCP services
Job for dhcpd.service failed because the control process exited with error code.
See "systemctl status dhcpd.service" and "journalctl -xeu dhcpd.service" for details.
ERROR  : failed to start: failed to run start cmd: exit status 1
```

Looking into `/etc/dhcp/dhcp.conf` it turns out WW overwrote my original DHCP IP addresses matching the KVM network, with its own default values. Here the bottom part of the `dhcp.conf` file:
```dhcp.conf
subnet 192.168.200.0 netmask 255.255.255.0 {
    max-lease-time 120;
    range 192.168.200.50 192.168.200.99;
    next-server 192.168.200.1;
}
```

My question is, how can I force WW to use the IP setup from `warewulf.conf`? Or is my setup wrong? Should I maybe switch off the DHCP server in KVM?

Thanks in advance,
Ziad

Jonathon Anderson

unread,
May 9, 2023, 12:20:04 PM5/9/23
to ware...@lbl.gov
I'm a little confused by your question, "how can I force WW to use the IP setup from `warewulf.conf`"? It seems that Warewulf _did_ use the IP setup as specified in warewulf.conf.

Warewulf expects to be the DHCP server on your network by default. It is possible to disable its DHCP support and configure DHCP on your network manually; in that case, set warewulf.conf:dhcp.enabled to false. Otherwise, disable the external dnsmasq server and let Warewulf configure a DHCP server to run on your head node.

~jonathon


--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/f64ed5fe-cea6-4d06-ad8d-fe53741cd61bn%40lbl.gov.

Christi...@web.de

unread,
May 9, 2023, 12:41:30 PM5/9/23
to ware...@lbl.gov
> <mailto:warewulf+u...@lbl.gov>.
> To view this discussion on the web visit
> https://groups.google.com/a/lbl.gov/d/msgid/warewulf/f64ed5fe-cea6-4d06-ad8d-fe53741cd61bn%40lbl.gov <https://groups.google.com/a/lbl.gov/d/msgid/warewulf/f64ed5fe-cea6-4d06-ad8d-fe53741cd61bn%40lbl.gov?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Warewulf" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to warewulf+u...@lbl.gov
> <mailto:warewulf+u...@lbl.gov>.
> To view this discussion on the web visit
> https://groups.google.com/a/lbl.gov/d/msgid/warewulf/CAKMkaVWD%3D08E3P-F1K5MRZ7gfyffUdXxeuC6BacMhKvPrGe%3Dfw%40mail.gmail.com <https://groups.google.com/a/lbl.gov/d/msgid/warewulf/CAKMkaVWD%3D08E3P-F1K5MRZ7gfyffUdXxeuC6BacMhKvPrGe%3Dfw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
Hallo Jonathan,
the prolem was answered by my following eMail this morning, which I accidenlty didn't send to the list, but directly:

[snip]
This should be the normal behavior of warewulf4 to use the values of warewulf.conf
If this is not the case, there could be the possibility that for self compiled warewulf version warewulf.conf isn't found, and so `dynamic default` values are used, which corespondent to the ip addresses of the first interface of the host.
If you run any command with the `-d` switch, the debug output will show you which `warewulf.conf` is used.

kind regards,
Christian

Reply all
Reply to author
Forward
0 new messages