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

Windows salt minion will not start when wireguard device is present #56465

Closed
H20-17 opened this issue Mar 27, 2020 · 2 comments
Closed

Windows salt minion will not start when wireguard device is present #56465

H20-17 opened this issue Mar 27, 2020 · 2 comments
Labels

Comments

@H20-17
Copy link

H20-17 commented Mar 27, 2020

Description of Issue

Windows Salt minion will not start when wireguard device is present

Setup

Install wireguard and have a tunnel device running such that when you run ipconfig you will see something like

Unknown adapter Test_tunnel:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.248.51
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . :

Steps to Reproduce Issue

Start the salt minion with
C:\salt\salt-minion-debug.bat (or equivalent)

The minion will not start. Instead it dies on a missing key error. The output I get is as follows

Traceback (most recent call last):
  File "C:\salt\bin\Scripts\salt-minion", line 4, in <module>
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
KeyError: 53
Traceback (most recent call last):
  File "C:\salt\bin\Scripts\salt-minion", line 4, in <module>
    __import__('pkg_resources').run_script('salt==3000', 'salt-minion')
  File "C:\salt\bin\lib\site-packages\pkg_resources\__init__.py", line 750, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "C:\salt\bin\lib\site-packages\pkg_resources\__init__.py", line 1527, in run_script
    exec(code, namespace, namespace)
  File "c:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\EGG-INFO\scripts\salt-minion", line 26, in <module>
    salt_minion()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\scripts.py", line 205, in salt_minion
    minion.start()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\daemons.py", line 326, in start
    self._real_start()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\daemons.py", line 338, in _real_start
    self.minion.tune_in()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 1074, in tune_in
    self._spawn_minions()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 1018, in _spawn_minions
    jid_queue=self.jid_queue)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 986, in _create_minion_object
    jid_queue=jid_queue)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 1145, in __init__
    self.opts['grains'] = salt.loader.grains(opts)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\loader.py", line 808, in grains
    ret = funcs[key]()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\grains\core.py", line 2381, in hwaddr_interfaces
    ifaces = _get_interfaces()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\grains\core.py", line 1558, in _get_interfaces
    _INTERFACES = salt.utils.network.interfaces()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\network.py", line 1004, in interfaces
    return win_interfaces()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\network.py", line 996, in win_interfaces
    return salt.utils.win_network.get_interface_info()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_network.py", line 348, in get_interface_info
    return get_interface_info_dot_net_formatted()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_network.py", line 237, in get_interface_info_dot_net_formatted
    interfaces = get_interface_info_dot_net()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_network.py", line 272, in get_interface_info_dot_net
    temp_dict = _get_base_properties(i_face)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_network.py", line 116, in _get_base_properties
    'type': enum_adapter_types[i_face.NetworkInterfaceType],

Versions Report

I am running the 3000 py3 64 bit minion on Windows 10.

@H20-17
Copy link
Author

H20-17 commented Mar 27, 2020

For a workaround, I found that the minion client will run if

enum_adapter_types[i_face.NetworkInterfaceType]

is replaced with

enum_adapter_types.get(i_face.NetworkInterfaceType)

I don't know if this breaks other things down the line.

@H20-17
Copy link
Author

H20-17 commented Mar 27, 2020

@twangboy has already fixed this in #56337. I tested the fix. Thanks @twangboy

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

No branches or pull requests

2 participants