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

[3000][windows]: win_network.py traceback after OpenVPN install #56275

Closed
dafyddj opened this issue Feb 28, 2020 · 1 comment
Closed

[3000][windows]: win_network.py traceback after OpenVPN install #56275

dafyddj opened this issue Feb 28, 2020 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Milestone

Comments

@dafyddj
Copy link
Contributor

dafyddj commented Feb 28, 2020

Description of Issue

After installation of OpenVPN and TAP Adapter network interface, Salt fails with traceback while generating grains due to missing enum_adapter_types key 53.

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Install OpenVPN 2.4.8 (or possibly any version)

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

PS C:\Users\vagrant> salt-call grains.items
[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-call", line 4, in <module>
    __import__('pkg_resources').run_script('salt==3000', 'salt-call')
  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-call", line 11, in <module>
    salt_call()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\scripts.py", line 445, in salt_call
    client.run()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\call.py", line 47, in run
    caller = salt.cli.caller.Caller.factory(self.config)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 63, in factory
    return ZeroMQCaller(opts, **kwargs)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 312, in __init__
    super(ZeroMQCaller, self).__init__(opts)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 87, in __init__
    self.minion = salt.minion.SMinion(opts)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 842, in __init__
    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_do
t_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_do
t_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],
KeyError: 53
Traceback (most recent call last):
  File "C:\salt\bin\Scripts\salt-call", line 4, in <module>
    __import__('pkg_resources').run_script('salt==3000', 'salt-call')
  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-call", line 11, in <module>
    salt_call()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\scripts.py", line 445, in salt_call
    client.run()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\call.py", line 47, in run
    caller = salt.cli.caller.Caller.factory(self.config)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 63, in factory
    return ZeroMQCaller(opts, **kwargs)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 312, in __init__
    super(ZeroMQCaller, self).__init__(opts)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\caller.py", line 87, in __init__
    self.minion = salt.minion.SMinion(opts)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\minion.py", line 842, in __init__
    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_do
t_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_do
t_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],
KeyError: 53
Get-NetAdapter Output
PS C:\Users\vagrant> Get-NetAdapter | ? InterfaceDescription -Like TAP* | Format-List *


ifAlias                                          : Local Area Connection
InterfaceAlias                                   : Local Area Connection
ifIndex                                          : 13
ifDesc                                           : TAP-Windows Adapter V9
ifName                                           : Other_0
DriverVersion                                    : 9.24.2.601
LinkLayerAddress                                 : 00-FF-11-A1-11-C7
MacAddress                                       : 00-FF-11-A1-11-C7
Status                                           : Disconnected
LinkSpeed                                        : 1 Gbps
MediaType                                        : 802.3
PhysicalMediaType                                : Unspecified
AdminStatus                                      : Up
MediaConnectionState                             : Disconnected
DriverInformation                                : Driver Date 2019-09-27 Version 9.24.2.601 NDIS 6.30
DriverFileName                                   : tap0901.sys
NdisVersion                                      : 6.30
ifOperStatus                                     : Down
Caption                                          :
Description                                      :
ElementName                                      :
InstanceID                                       : {11A111C7-6043-4B8A-8936-5D4496C386E0}
CommunicationStatus                              :
DetailedStatus                                   :
HealthState                                      :
InstallDate                                      :
Name                                             : Local Area Connection
OperatingStatus                                  :
OperationalStatus                                :
PrimaryStatus                                    :
StatusDescriptions                               :
AvailableRequestedStates                         :
EnabledDefault                                   : 2
EnabledState                                     : 5
OtherEnabledState                                :
RequestedState                                   : 12
TimeOfLastStateChange                            :
TransitioningToState                             : 12
AdditionalAvailability                           :
Availability                                     :
CreationClassName                                : MSFT_NetAdapter
DeviceID                                         : {11A111C7-6043-4B8A-8936-5D4496C386E0}
ErrorCleared                                     :
ErrorDescription                                 :
IdentifyingDescriptions                          :
LastErrorCode                                    :
MaxQuiesceTime                                   :
OtherIdentifyingInfo                             :
PowerManagementCapabilities                      :
PowerManagementSupported                         :
PowerOnHours                                     :
StatusInfo                                       :
SystemCreationClassName                          : CIM_NetworkPort
SystemName                                       : WINDOWS-08UMQO0
TotalPowerOnHours                                :
MaxSpeed                                         :
OtherPortType                                    :
PortType                                         :
RequestedSpeed                                   :
Speed                                            : 1000000000
UsageRestriction                                 :
ActiveMaximumTransmissionUnit                    : 1500
AutoSense                                        :
FullDuplex                                       : True
LinkTechnology                                   :
NetworkAddresses                                 : {00FF11A111C7}
OtherLinkTechnology                              :
OtherNetworkPortType                             :
PermanentAddress                                 : 00FF11A111C7
PortNumber                                       : 0
SupportedMaximumTransmissionUnit                 :
AdminLocked                                      : False
ComponentID                                      : tap0901
ConnectorPresent                                 : False
DeviceName                                       : \Device\{11A111C7-6043-4B8A-8936-5D4496C386E0}
DeviceWakeUpEnable                               : False
DriverDate                                       : 2019-09-27
DriverDateData                                   : 132140160000000000
DriverDescription                                : TAP-Windows Adapter V9
DriverMajorNdisVersion                           : 6
DriverMinorNdisVersion                           : 30
DriverName                                       : \SystemRoot\system32\DRIVERS\tap0901.sys
DriverProvider                                   : TAP-Windows Provider V9
DriverVersionString                              : 9.24.2.601
EndPointInterface                                : False
HardwareInterface                                : False
Hidden                                           : False
HigherLayerInterfaceIndices                      : {14}
IMFilter                                         : False
InterfaceAdminStatus                             : 1
InterfaceDescription                             : TAP-Windows Adapter V9
InterfaceGuid                                    : {11A111C7-6043-4B8A-8936-5D4496C386E0}
InterfaceIndex                                   : 13
InterfaceName                                    : Other_0
InterfaceOperationalStatus                       : 2
InterfaceType                                    : 53
iSCSIInterface                                   : False
LowerLayerInterfaceIndices                       :
MajorDriverVersion                               : 9
MediaConnectState                                : 2
MediaDuplexState                                 : 2
MinorDriverVersion                               : 24
MtuSize                                          : 1500
NdisMedium                                       : 0
NdisPhysicalMedium                               : 0
NetLuid                                          : 14918173765664768
NetLuidIndex                                     : 0
NotUserRemovable                                 : False
OperationalStatusDownDefaultPortNotAuthenticated : False
OperationalStatusDownInterfacePaused             : False
OperationalStatusDownLowPowerState               : False
OperationalStatusDownMediaDisconnected           : True
PnPDeviceID                                      : ROOT\NET\0000
PromiscuousMode                                  : False
ReceiveLinkSpeed                                 : 1000000000
State                                            : 2
TransmitLinkSpeed                                : 1000000000
Virtual                                          : True
VlanID                                           :
WdmInterface                                     : True
PSComputerName                                   :
CimClass                                         : ROOT/StandardCimv2:MSFT_NetAdapter
CimInstanceProperties                            : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties                              : Microsoft.Management.Infrastructure.CimSystemProperties

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

PS C:\Users\vagrant> salt-call --versions
Salt Version:
           Salt: 3000

Dependency Versions:
           cffi: 1.12.2
       cherrypy: 17.4.1
       dateutil: 2.8.0
      docker-py: Not Installed
          gitdb: 2.0.6
      gitpython: 2.1.10
         Jinja2: 2.10.1
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: Not Installed
   pycryptodome: 3.8.1
         pygit2: Not Installed
         Python: 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)]
   python-gnupg: 0.4.4
         PyYAML: 5.1.2
          PyZMQ: 18.0.1
          smmap: 2.0.5
        timelib: 0.2.4
        Tornado: 4.5.3
            ZMQ: 4.3.1

System Versions:
           dist:
         locale: cp1252
        machine: AMD64
        release: 8.1
         system: Windows
        version: 8.1 6.3.9600 SP0 Multiprocessor Free
@dafyddj
Copy link
Contributor Author

dafyddj commented Feb 29, 2020

See #56196

@garethgreenaway garethgreenaway added this to the Approved milestone Mar 2, 2020
@garethgreenaway garethgreenaway added Bug broken, incorrect, or confusing behavior team-windows Windows severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 labels Mar 2, 2020
@twangboy twangboy self-assigned this Mar 3, 2020
@sagetherage sagetherage removed the P4 Priority 4 label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
None yet
Development

No branches or pull requests

4 participants