Bug 53120

Summary: salt-api: не работает вызов функции /run
Product: Branch p10 Reporter: Alexander Makeenkov <amakeenk>
Component: salt-apiAssignee: Anton Vyatkin <toni>
Status: CLOSED FIXED QA Contact: qa-p10 <qa-p10>
Severity: normal    
Priority: P5 CC: cas
Version: не указана   
Hardware: x86_64   
OS: Linux   

Description Alexander Makeenkov 2025-02-17 16:59:34 MSK
Версия пакета:
salt-api-3007.1-alt0.p10.2

Шаги воспроизведения:
```
# hostnamectl set-hostname salt-master && reboot

# apt-get install -y salt-master salt-api salt-minion

# cat > /etc/salt/master.d/salt-api.conf <<EOF
rest_cherrypy:
  port: 8999
  disable_ssl: True
EOF

# cat > /etc/salt/master.d/eauth.conf <<EOF
external_auth:
  pam:
    test:
      - .*
EOF

# echo "master: 127.0.0.1" >> /etc/salt/minion && \
echo "netapi_enable_clients: [local]" >> /etc/salt/master

# systemctl start salt-master salt-api

# (echo 1; echo 1) | passwd test

# curl -si localhost:8999/login -H "Accept: application/json" -d username='test' -d password='1' -d eauth='pam'

# systemctl start salt-minion

# salt-key -A

# curl -isS localhost:8999/run -H 'Accept: application/x-yaml' -d eauth='pam' -d username='test' -d client='local' -d tgt='salt-master' -d password='1' -d fun='test.ping'
```

Получаемый результат:

Ошибка при выполнении функции /run:

HTTP/1.1 500 Internal Server Error
Content-Type: application/x-yaml
Server: CherryPy/18.9.0
Date: Mon, 17 Feb 2025 13:52:44 GMT
Allow: GET, HEAD, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: GET, POST
Access-Control-Allow-Credentials: true
Vary: Accept-Encoding
Content-Length: 49

return: An unexpected error occurred
status: 500

В логах никаких ошибок нет.
В р11 и сизифе не воспроизводится.
Comment 1 Repository Robot 2025-02-20 16:58:40 MSK
salt-3007.1-alt0.p10.3 -> p10:

 Wed Feb 19 2025 Anton Vyatkin <toni@altlinux> 3007.1-alt0.p10.3
 - Fix salt-api (Closes: #53120).