Fwd: wwctl write wrong ip addresses to dhcp.conf

117 views
Skip to first unread message

Ziad Boutanios

unread,
May 9, 2023, 2:26:14 AM5/9/23
to ware...@lbl.gov
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

Reply all
Reply to author
Forward
0 new messages