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

Minion and Sub-Minion Daemons fail to start on MacOS #356

Closed
chalzstrassen opened this issue May 22, 2017 · 18 comments
Closed

Minion and Sub-Minion Daemons fail to start on MacOS #356

chalzstrassen opened this issue May 22, 2017 · 18 comments

Comments

@chalzstrassen
Copy link

Starting salt-minion ... /Users/yuchaochen/Documents/cloned_repo/salt/salt/utils/__init__.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/Users/yuchaochen/Documents/cloned_repo/salt/salt/utils/__init__.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/Users/yuchaochen/Documents/cloned_repo/salt/salt/utils/__init__.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/Users/yuchaochen/Documents/cloned_repo/salt/salt/utils/__init__.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
 * Starting salt-minion ... FAILED!

Same also happens for the sub_minion.

@chalzstrassen
Copy link
Author

Salt Version:
           Salt: 2017.5.0-182-ge74f624
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.6.0
      docker-py: 2.3.0
          gitdb: 2.0.0
      gitpython: 2.1.3
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.0 (default, Mar  4 2017, 12:32:34)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.5.1
            ZMQ: 4.1.6
 
System Versions:
           dist:   
        machine: x86_64
        release: 16.6.0
         system: Darwin
        version: 10.12.5 x86_64

@Ch3LL Ch3LL self-assigned this May 25, 2017
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 1, 2017

Looks like I am able to replicate this. Digging into the salt-runtests.py log here is what it shows:

17:27:46,069 [tests.support.parser:460 ][INFO    ] Runtests logging has been setup
17:27:46,104 [tests.support.processes:130 ][INFO    ] [salt-master] Starting pytest salt-master/master(master)
17:27:46,105 [pytestsalt.utils:412 ][INFO    ] [salt-master/master][SaltMaster(master)] Starting DAEMON in CWD: /testing
17:27:46,112 [tests.support.paths:109 ][INFO    ] Generating /private/tmp/salt-tests-tmpdir/scripts/cli_master.py
17:27:46,113 [tests.support.paths:136 ][INFO    ] Returning script path '/private/tmp/salt-tests-tmpdir/scripts/cli_master.py'
17:27:46,119 [pytestsalt.utils:421 ][INFO    ] [salt-master/master][SaltMaster(master)] Running '/private/tmp/salt-tests-tmpdir/scripts/cli_master.py -c /private/tmp/salt-tests-tmpdir/config -l quiet'...
17:27:46,122 [salt.utils.nb_popen                :96  ][INFO    ] Running command under pid 2538: '(['/private/tmp/salt-tests-tmpdir/scripts/cli_master.py', '-c', '/private/tmp/salt-tests-tmpdir/config', '-l', 'quiet'],)'
17:27:46,128 [pytestsalt.utils                   :503 ][DEBUG   ] [salt-master/master][SaltMaster(master)] Checking the following event tags to assure running status: {'salt/master/master/start'}
17:27:46,128 [pytestsalt.utils                   :505 ][DEBUG   ] Wait until running expire: 1496359696.1279411  Timeout: 30  Current Time: 1496359666.128163
17:27:46,128 [tests.support.paths                :109 ][INFO    ] Generating /private/tmp/salt-tests-tmpdir/scripts/cli_run.py
17:27:46,129 [tests.support.paths                :136 ][INFO    ] Returning script path '/private/tmp/salt-tests-tmpdir/scripts/cli_run.py'
17:27:46,129 [pytestsalt.utils                   :763 ][INFO    ] [salt-master/master][SaltRunEventListener(run)] Running '/private/tmp/salt-tests-tmpdir/scripts/cli_run.py -c /private/tmp/salt-tests-tmpdir/config state.event' in CWD: /testing...
17:27:46,185 [salt.utils.nb_popen                :96  ][INFO    ] Running command under pid 2539: '(['/private/tmp/salt-tests-tmpdir/scripts/cli_run.py', '-c', '/private/tmp/salt-tests-tmpdir/config', 'state.event'],)'
17:27:47,428 [salt.utils.nb_popen.STDERR.PID-2539:205 ][DEBUG   ] /testing/salt/utils/__init__.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
[ERROR   ] Failed to import log_handlers runtests_log_handler, this is due most likely to a syntax error:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1343, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 675, in _load
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 780, in get_code
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 156, in get_data
    return file.read()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 105: ordinal not in range(128)
17:27:51,436 [salt.utils.nb_popen.STDERR.PID-2539:205 ][DEBUG   ] [WARNING ] Unable to find IPv6 record for "jk-sierra-py3" causing a 10 second timeout when rendering grains. Set the dns or /etc/hosts for IPv6 to clear this.
17:28:15,628 [pytestsalt.utils                   :836 ][WARNING ] [salt-master/master][SaltRunEventListener(run)] Failed to find all of the required event tags. Total events processed: 0
17:28:15,632 [pytestsalt.utils                   :208 ][INFO    ] Stopping process psutil.Process(pid=2539, name='Python') and respective children: []
17:28:15,632 [pytestsalt.utils                   :128 ][INFO    ] Terminating process list. 1st step. kill: True, slow stop: False
17:28:15,633 [pytestsalt.utils                   :98  ][INFO    ] Killing process(2539): ['/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python /private/tmp/salt-tests-tmpdir/scripts/cli_run.py -c /private/tmp/salt-tests-tmpdir/config state.event', '', '', '', '']

@Ch3LL Ch3LL assigned gtmanfred and unassigned Ch3LL Jun 5, 2017
@gtmanfred
Copy link
Contributor

gtmanfred commented Jun 5, 2017

I can successfully run the salt master and minion on macOS.

MacBook-Air:~ daniel$ salt -c ~/saltroot/etc/salt/ \* test.ping
macbook-air.lehi.saltstack.net:
    True

Looking at the testing suite now.

@gtmanfred
Copy link
Contributor

@chalzstrassen if you check the locale command, does it say all your locales are C?

If you export LANG=en_US.UTF-8 or another UTF locale, does the test suite run?

It works here.

@chalzstrassen
Copy link
Author

@gtmanfred I still cannot bring up the daemons. I even made sure to set LANG.

$ echo $LANG
en_US.UTF-8

@gtmanfred
Copy link
Contributor

gtmanfred commented Jun 7, 2017 via email

@chalzstrassen
Copy link
Author

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

I pulled from the latest nitrogen branch and I am still unable to start the minion and sub-minion daemons.

@gtmanfred
Copy link
Contributor

gtmanfred commented Jun 8, 2017 via email

@gtmanfred
Copy link
Contributor

It is also worth noting that our mac tests are now running successfully on py3.

@chalzstrassen
Copy link
Author

chalzstrassen commented Jun 12, 2017 via email

@gtmanfred
Copy link
Contributor

What is your current version of salt?

Currently I have

[root@salt ~]# salt-call --version
salt-call 2017.5.0-1223-g740e933

I am unable to replicate what you are seeing, all my salt tests are working on mac 10.12

Thanks,
Daniel

@chalzstrassen
Copy link
Author

My current version is salt-call 2017.5.0-245-g43bee28

@gtmanfred
Copy link
Contributor

gtmanfred commented Jun 18, 2017 via email

@Ch3LL Ch3LL added the MacOSX label Jun 20, 2017
@gtmanfred
Copy link
Contributor

@chalzstrassen did you get a chance to pull down the latest?

Thanks,
Daniel

@chalzstrassen
Copy link
Author

@gtmanfred I finally got a chance.
I am now getting below:

$ python tests/runtests.py
from pytestsalt.fixtures.daemons import SaltProxy as PytestSaltProxy
ImportError: cannot import name 'SaltProxy'
Salt Version:
           Salt: 2017.7.0-248-gc0e7480
 
Dependency Versions:
           cffi: 1.10.0
       cherrypy: Not Installed
       dateutil: 2.6.0
      docker-py: 2.3.0
          gitdb: 2.0.0
      gitpython: 2.1.3
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.0 (default, Mar  4 2017, 12:32:34)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.5.1
            ZMQ: 4.1.6
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 16.6.0
         system: Darwin
        version: 10.12.5 x86_64

@gtmanfred
Copy link
Contributor

gtmanfred commented Jul 5, 2017 via email

@tonybaloney
Copy link

I had the same issue (MacOS), ran pip install --upgrade git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt within my virtualenv and it fixed it.

salt-call 2017.7.0-350-gb09352c (Nitrogen)

@gtmanfred
Copy link
Contributor

I am going to close this issue then.

Thanks @tonybaloney
Daniel

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

No branches or pull requests

5 participants