Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue where domain creates DHCP when DHCP is disabled #1113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eifrach
Copy link

@eifrach eifrach commented Oct 14, 2024

When you disable the DHCP service, The Domain creates static host records which enables the DHCP only for those static hosts.

The issue is found in the check HasDHCP which only checks for the mode and not if there is a DHCP configured. This issue cannot be patched via XSLT because it's running in the domain level (post network)

In this fix

  1. we will ignore bridge networks
  2. check if there is a dhcp field is set each family network

note:

you can configure DHCP on bridge network and in some cases you will. but, this is a rare use case and can have impact on the phyiscal network.

This is an example of a network created with no DHCP and the domain adds those hosts as a static DHCP.

</network>
...
  <ip family='ipv4' address='192.168.127.1' prefix='24'>
    <dhcp>
      <host mac='02:00:00:46:8E:78' name='test-cluster-ccb82750-master-1' ip='192.168.127.11'/>
      <host mac='02:00:00:D1:26:11' name='test-cluster-ccb82750-master-0' ip='192.168.127.10'/>
      <host mac='02:00:00:A6:33:B3' name='test-cluster-ccb82750-master-2' ip='192.168.127.12'/>
    </dhcp>
  </ip>
</network>

The desired state

</network>
...
  <ip family='ipv4' address='192.168.127.1' prefix='24'>
  </ip>
</network>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant