salt icon indicating copy to clipboard operation
salt copied to clipboard

network.managed (windows) cannot set interface without DNS servers

Open Supermathie opened this issue 12 years ago • 8 comments

I want to use network.managed to set up interfaces without specifying DNS servers:

"Local Area Connection 2":
  network.managed:
    - dns_proto: static
    - dns_servers: []
    #- enabled: True
    #- gateway:
    - ip_proto: static
    - ip_addrs:
      - 10.10.1.4/16

but no variant seems to work - it insists on having DNS servers listed:

          ID: Local Area Connection 2
    Function: network.managed
      Result: False
     Comment: The following SLS configuration errors were detected: The dns_servers param is required to set static DNS servers.
     Changes:   

Supermathie avatar Nov 26 '14 16:11 Supermathie

Thanks for reporting this, @Supermathie.

jfindlay avatar Nov 26 '14 17:11 jfindlay

@Supermathie, when I originally looked at this I didn't realize that you were setting dns_proto: static. This means that you want to provide your own dns servers rather than get them over dhcp. I'm guessing that you want static addresses in which case you set ip_proto: static. If you want static dns servers you will need to provide them or get them over dhcp with dns_proto: dhcp.

jfindlay avatar Dec 05 '14 19:12 jfindlay

@jfindlay In this case I don't want to set any DNS servers but the module is forcing me to provide them.

Supermathie avatar Dec 11 '14 01:12 Supermathie

@Supermathie, with the proposed patch, you may disable DNS by leaving dns_proto None.

"Local Area Connection 2":
  network.managed:
    - dns_proto: None
    - ip_proto: static
    - ip_addrs:
      - 10.10.1.4/16

jfindlay avatar Jan 22 '15 20:01 jfindlay

@Supermathie, I am sorry that the fix I submitted in #19968 was incomplete. I will have to work on this some more before submitting a correct fix, thanks.

jfindlay avatar Jan 23 '15 23:01 jfindlay

Was this fixed? I'm still seeing this issue present.

omgitsedwin avatar Sep 20 '18 18:09 omgitsedwin

@omgitsedwin This is a fairly old issue. Can you open a new one with all of your relevant details so we can get some eyes on it?

rallytime avatar Sep 20 '18 18:09 rallytime

Done, thanks. See #49730.

omgitsedwin avatar Sep 20 '18 19:09 omgitsedwin