latenighttales / alcali

Featureful Saltstack GUI
https://alcali.dev
MIT License
354 stars 60 forks source link

3007.0 - salt-master seems to have plenty of breakage. #531

Closed steverweber closed 2 months ago

steverweber commented 2 months ago

Describe the bug 3007.0 salt has breakage ... this is mostly just some notes that might help someone get things working.

to install python mysql module try:

salt-pip install mysqlclient

if using eauth_acl_module: alcali you will want to update an import.

try:
    import salt.ext.six as six
except ImportError:
    import six

if using 'rest_cherrypy' i had seen logs on master like:

[TRACE   ] Request POST Data: {'password': 'xxxxxxxxx', 'username': 'admin'}
[DEBUG   ] Using selector: EpollSelector
[DEBUG   ] Authentication module threw Cannot run the event loop while another loop is running
[TRACE   ] Process manager iteration
[WARNING ] Authentication failure of type "eauth" occurred.

to hack around the "cannot run the event loop" "error" putting the following at the top of /opt/saltstack/salt/lib/python3.10/site-packages/salt/auth/__init__.py gets the "Salt WebSocket" returning OK on the webpage.

# first run: salt-pip install nest_asyncio
import nest_asyncio
nest_asyncio.apply()

At this point i hit a wall. The "Salt WebSocket" is returning OK but I see no minions.

jpisard commented 2 months ago

Hi since salt version 3006 netapi have new config parameters in master config file

netapi_enable_clients:
  - local
  - local_async
  - local_batch
  - local_subset
  - wheel
  - runner
  - runner_async

hope that help ! (works for me with salt 3007.0 on debian 12 with rest_cherrypy and SALT_AUTH=alcali

steverweber commented 2 months ago

@jpisard yep im using netapi_enable_clients

strange that im seeing these issues. The test system has ubuntu22.04, I'll give it another test using ubuntu24.04.

steverweber commented 2 months ago

same issues on ubuntu24.04. However did confirm that using the /run view works! I was able to send a test.ping to minions and see the return data.

however views like jobs, minions, events fail.

XHRGET
http://alcali :8088/api/minions/
[HTTP/1.1 500 Internal Server Error 77ms]
Uncaught (in promise) Error: Request failed with status code 500

logs in salt-api and salt-master not giving any good hints that I'm able to follow.

steverweber commented 2 months ago

ah after running in debug mode i noticed had my database incorrectly setup. working now.

So the takeaway is if using rest_cherrypy you likely still need that nest_asyncio hack but his should be reported to the salt devs so it can be fixed for the 3008.0 LTS... shrug.. resolved.