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] Import error for Tornado package in Bootstrap Installation and can't run any salt command. #66505

Closed
1 task done
caner-cetin opened this issue May 11, 2024 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@caner-cetin
Copy link

caner-cetin commented May 11, 2024

Description

./bootstrap-salt.sh: line 6862: /etc/rc.d/salt-master: No such file or directory
 *  INFO: Running daemons_running_onedir()
 * DEBUG: Waiting 3 seconds for processes to settle before checking for them
 * ERROR: salt-master was not found running
 * ERROR: Failed to run daemons_running_onedir()!!!
nohup: ignoring input
Traceback (most recent call last):
  File "/usr/bin/salt-master", line 33, in <module>
    sys.exit(load_entry_point('salt==3007.0', 'console_scripts', 'salt-master')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/salt/scripts.py", line 79, in salt_master
    import salt.cli.daemons
  File "/usr/lib/python3.12/site-packages/salt/cli/daemons.py", line 14, in <module>
    from salt.utils.process import HAS_PSUTIL
  File "/usr/lib/python3.12/site-packages/salt/utils/process.py", line 23, in <module>
    from tornado import gen
ModuleNotFoundError: No module named 'tornado'
[ERROR   ] An un-handled exception was caught by Salt's global exception handler:
ModuleNotFoundError: No module named 'tornado'
Traceback (most recent call last):
  File "/usr/bin/salt-master", line 33, in <module>
    sys.exit(load_entry_point('salt==3007.0', 'console_scripts', 'salt-master')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/salt/scripts.py", line 79, in salt_master
    import salt.cli.daemons
  File "/usr/lib/python3.12/site-packages/salt/cli/daemons.py", line 14, in <module>
    from salt.utils.process import HAS_PSUTIL
  File "/usr/lib/python3.12/site-packages/salt/utils/process.py", line 23, in <module>
    from tornado import gen
ModuleNotFoundError: No module named 'tornado'

Setup

  • used bootstrap to install

image

Steps to Reproduce the behavior

curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sudo bash ./bootstrap-salt.sh -M -N -D

there is no problem if I install with

curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh -M -N git master

Versions Report

salt --versions-report
[caner@archlinux ~]$ salt --versions-report
Traceback (most recent call last):
  File "/usr/bin/salt", line 33, in <module>
    sys.exit(load_entry_point('salt==3007.0', 'console_scripts', 'salt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/salt/scripts.py", line 526, in salt_main
    import salt.cli.salt
  File "/usr/lib/python3.12/site-packages/salt/cli/salt.py", line 9, in <module>
    import salt.utils.parsers
  File "/usr/lib/python3.12/site-packages/salt/utils/parsers.py", line 34, in <module>
    import salt.utils.process
  File "/usr/lib/python3.12/site-packages/salt/utils/process.py", line 23, in <module>
    from tornado import gen
ModuleNotFoundError: No module named 'tornado'

Additional context

I cannot install a global package in Arch, at least not in a way I currently know.

[caner@archlinux ~]$ pipx install tornado

No apps associated with package tornado or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead.
[caner@archlinux ~]$ pip install tornado
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Latest Tornado package for Arch is python2-tornado, https://aur.archlinux.org/packages/python2-tornado, which, you know, it is for Python 2.

This issue occurs on every single command in Salt.

[caner@archlinux ~]$ salt --help
Traceback (most recent call last):
  File "/usr/bin/salt", line 33, in <module>
    sys.exit(load_entry_point('salt==3007.0', 'console_scripts', 'salt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/salt/scripts.py", line 526, in salt_main
    import salt.cli.salt
  File "/usr/lib/python3.12/site-packages/salt/cli/salt.py", line 9, in <module>
    import salt.utils.parsers
  File "/usr/lib/python3.12/site-packages/salt/utils/parsers.py", line 34, in <module>
    import salt.utils.process
  File "/usr/lib/python3.12/site-packages/salt/utils/process.py", line 23, in <module>
    from tornado import gen
ModuleNotFoundError: No module named 'tornado'

thanks for any help.

@caner-cetin caner-cetin added Bug broken, incorrect, or confusing behavior needs-triage labels May 11, 2024
Copy link

welcome bot commented May 11, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@caner-cetin
Copy link
Author

also see => #55555 maybe related

@omgroves
Copy link

Ran into this today on a clean salt install on Arch. Fixed by installing python-tornado package from Extra manually

@caner-cetin
Copy link
Author

boop, closing it then. havent worked with saltstack since eternity, so i am fully trusting you on this

@dmurphy18
Copy link
Contributor

@caner-cetin FYI bootstrap repo https://github.com/saltstack/salt-bootstrap is a better place to log bootstrap issues.

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 needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants