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

[BUG] In Windows Salt dies when started from the command line when no connection to Active Directory #57227

Open
H20-17 opened this issue May 12, 2020 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
Milestone

Comments

@H20-17
Copy link

H20-17 commented May 12, 2020

Description
For a computer probably already joined to active directory, salt will not start from the command line. Fortunately it still runs as a service. This probably has something to do with salt being ran as the Administrator user rather than the system user.

Setup
No specific setup other than have the minion joined to active directory.

Steps to Reproduce the behavior

  1. Make sure that the minion cannot talk to active directory. In my case the minion could still talk to the salt master, just not active directory. Edit: Also be sure to be an active directory user in the Administrators group.

  2. open a cmd windows as Administrator.

  3. Try running salt-minion-debug.bat

You will see output like:

The salt-minion service is not started.

More help is available by typing NET HELPMSG 3521.

[DEBUG   ] Reading configuration from c:\salt\conf\minion
[DEBUG   ] Including configuration from 'c:\salt\conf\minion.d\_schedule.conf'
[DEBUG   ] Reading configuration from c:\salt\conf\minion.d\_schedule.conf
[DEBUG   ] Multiprocessing queue logging configured for the process running under PID: 14360 at log level 10
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 323, in start
    super(Minion, self).start()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\parsers.py", line 1073, in start
    self.prepare()
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\cli\daemons.py", line 276, in prepare
    pki_dir=self.config['pki_dir'],
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\verify.py", line 238, in verify_env
    skip_extra=skip_extra)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\verify.py", line 595, in win_verify_env
    if salt.utils.win_functions.is_admin(current_user):
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_functions.py", line 62, in is_admin
    groups = get_user_groups(name, True)
  File "C:\salt\bin\lib\site-packages\salt-3000-py3.5.egg\salt\utils\win_functions.py", line 89, in get_user_groups
    groups = win32net.NetUserGetLocalGroups(None, name)
pywintypes.error: (1355, 'NetUserGetLocalGroups', 'The specified domain either does not exist or could not be contacted.')

Expected behavior
Ideally salt will run even if it can't talk to the domain controller.

Versions Report

salt --versions-report
Salt Version:
           Salt: 3000.2
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: Not Installed
       dateutil: 2.8.0
      docker-py: Not Installed
          gitdb: 2.0.3
      gitpython: 3.0.2
         Jinja2: 2.10.1
        libgit2: 0.28.2
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.28.2
         Python: 3.7.7 (default, Mar 13 2020, 10:23:39)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 18.0.2
          smmap: 2.0.3
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2
 
System Versions:
           dist: fedora 31 Thirty One
         locale: UTF-8
        machine: x86_64
        release: 5.6.7-200.fc31.x86_64
         system: Linux
        version: Fedora 31 Thirty One

The minion in this case is version 3000

@H20-17 H20-17 added the Bug broken, incorrect, or confusing behavior label May 12, 2020
@DmitryKuzmenko DmitryKuzmenko added Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 team-windows Windows labels May 13, 2020
@DmitryKuzmenko DmitryKuzmenko added this to the Approved milestone May 13, 2020
@sagetherage sagetherage removed the P4 Priority 4 label Jun 3, 2020
@xeacott xeacott added this to To do in Windows Jan 11, 2021
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 Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
Windows
  
To do
Development

No branches or pull requests

3 participants