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

make network dns enabled by default #1100

Merged
merged 1 commit into from
Sep 19, 2024
Merged

make network dns enabled by default #1100

merged 1 commit into from
Sep 19, 2024

Conversation

dmacvicar
Copy link
Owner

@dmacvicar dmacvicar commented Sep 15, 2024

https://libvirt.org/formatnetwork.html#addressing specifies dns is disabled only if enable="no", but if omitted, it is enabled by default.

However, it claims if disabled, it would ignore the dns entries, but in reality it fails with "error: XML error: Extra data in disabled network".

terraform-provider-libvirt defaults to enabled=false, and it seems it was accidentally introduced with #969

This change makes:

  • if enabled is omitted, we use the libvirt default
  • we only add dns information to the xml if enabled

This also fixes the testacc testsuite, which was failing due to this "error: XML error: Extra data in disabled network" problem.

Fixes #1079

https://libvirt.org/formatnetwork.html#addressing specifies dns is disabled only if
enable="no", but if omitted, it is enabled by default.

However, it claims if disabled, it would ignore the dns entries, but in reality
it fails with "error: XML error: Extra data in disabled network".

This change makes:

- if enabled is omitted, we use the libvirt default
- we only add dns information to the xml if enabled
@dmacvicar dmacvicar added Feedback wanted Important (Wanted) Feature or contribution desired to be had and merged labels Sep 15, 2024
@dmacvicar dmacvicar self-assigned this Sep 15, 2024
@dmacvicar dmacvicar merged commit ec7a38d into main Sep 19, 2024
4 checks passed
dmacvicar added a commit to jimnydev/terraform-provider-libvirt that referenced this pull request Sep 28, 2024
https://libvirt.org/formatnetwork.html#addressing specifies dns is disabled only if
enable="no", but if omitted, it is enabled by default.

However, it claims if disabled, it would ignore the dns entries, but in reality
it fails with "error: XML error: Extra data in disabled network".

This change makes:

- if enabled is omitted, we use the libvirt default
- we only add dns information to the xml if enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback wanted Important (Wanted) Feature or contribution desired to be had and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix testsuite (or code) " Extra data in disabled network"
1 participant