salt icon indicating copy to clipboard operation
salt copied to clipboard

Salt API sometimes does not return the result of execution. The return from API is empty

Open adityask2 opened this issue 7 years ago • 4 comments

Salt API sometimes does not return the result of execution. The return from API is empty.

We have disabled all kinds of caching on the system.

We run salt state sls using API. It intermittently returns the result. The Job API through salt-api is sync. However, many times the job is actually successful but result is empty.

Setup

master.txt

Steps to Reproduce Issue

commandOutput - {"return": [{}]}] Just run the high state using salt API. minion.txt

Versions Report

salt-api 2018.3.3 (Oxygen) Salt Version: Salt: 2018.3.3

Dependency Versions: cffi: 1.9.1 cherrypy: Not Installed dateutil: Not Installed docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.9.5 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.5.6 (default, Dec 12 2018, 13:21:20) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 16.0.2 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.5.2 ZMQ: 4.1.4

System Versions: dist:
locale: UTF-8 machine: x86_64 release: 4.4.147-1.ph1 system: Linux version: Not Installed ``

adityask2 avatar Jan 22 '19 17:01 adityask2

can you include the entire salt-api request that you are making?

how often does this occur? Daily? every other call?

Ch3LL avatar Jan 23 '19 17:01 Ch3LL

This occurs when the machines are distantly placed in the network . Occurs like 2 out of every 5 times for me.

Request - curl -X POST
https://localhost:8553/run
-H 'Content-Type: application/json'
-H 'Postman-Token: f966d18b-b1e4-4a03-b7ee-f744469c35db'
-H 'X-Auth-Token: f2326fc589d402345ed4b1585a45366afaa5ef1b1b4e78483c9b6ece7fd00da3'
-H 'cache-control: no-cache'
-d '{ "client" : "local", "tgt" : "$machine id$", "fun" : "state.sls", "kwargs" : { "mods" : "$sls file to apply$", "pillar" : { "$key-pillar$" : "$value-pillar$" } } }'

adityask2 avatar Jan 23 '19 17:01 adityask2

I'm using tornado webserver.

adityask2 avatar Jan 24 '19 09:01 adityask2

@adityask2 Could You get any insights on how You were able to resolve this issue?

djmmatracki avatar Jul 05 '23 07:07 djmmatracki