<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>53120</bug_id>
          
          <creation_ts>2025-02-17 16:59:34 +0300</creation_ts>
          <short_desc>salt-api: не работает вызов функции /run</short_desc>
          <delta_ts>2025-02-20 16:58:40 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p10</product>
          <component>salt-api</component>
          <version>не указана</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Makeenkov">amakeenk</reporter>
          <assigned_to name="Anton Vyatkin">toni</assigned_to>
          <cc>cas</cc>
          
          <qa_contact name="qa-p10@altlinux.org">qa-p10</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>259451</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2025-02-17 16:59:34 +0300</bug_when>
    <thetext>Версия пакета:
salt-api-3007.1-alt0.p10.2

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

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

# cat &gt; /etc/salt/master.d/salt-api.conf &lt;&lt;EOF
rest_cherrypy:
  port: 8999
  disable_ssl: True
EOF

# cat &gt; /etc/salt/master.d/eauth.conf &lt;&lt;EOF
external_auth:
  pam:
    test:
      - .*
EOF

# echo &quot;master: 127.0.0.1&quot; &gt;&gt; /etc/salt/minion &amp;&amp; \
echo &quot;netapi_enable_clients: [local]&quot; &gt;&gt; /etc/salt/master

# systemctl start salt-master salt-api

# (echo 1; echo 1) | passwd test

# curl -si localhost:8999/login -H &quot;Accept: application/json&quot; -d username=&apos;test&apos; -d password=&apos;1&apos; -d eauth=&apos;pam&apos;

# systemctl start salt-minion

# salt-key -A

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

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

Ошибка при выполнении функции /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 и сизифе не воспроизводится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>259704</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-02-20 16:58:40 +0300</bug_when>
    <thetext>salt-3007.1-alt0.p10.3 -&gt; p10:

 Wed Feb 19 2025 Anton Vyatkin &lt;toni@altlinux&gt; 3007.1-alt0.p10.3
 - Fix salt-api (Closes: #53120).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>