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] Function grains.items in mine.update failed to execute #57055

Closed
MyIgel opened this issue May 2, 2020 · 5 comments
Closed

[BUG] Function grains.items in mine.update failed to execute #57055

MyIgel opened this issue May 2, 2020 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior Duplicate Duplicate of another issue or PR - will be closed

Comments

@MyIgel
Copy link

MyIgel commented May 2, 2020

Description
When setting mine_functions to run grains.items it fails to execute after upgrade to 3000.2 (from before 3000 where it worked).

Setup
/etc/salt/minion.d/50-mine.conf

mine_functions:
  grains.items: [host]

Steps to Reproduce the behavior
Restart the minion

May 02 21:12:14 prometheus salt-minion[5753]: [ERROR   ] Function grains.items in mine.update failed to execute
May 02 21:12:14 prometheus salt-minion[5753]: [DEBUG   ] Error: Traceback (most recent call last):                                                                                            
May 02 21:12:14 prometheus salt-minion[5753]:   File "/usr/lib/python2.7/dist-packages/salt/modules/mine.py", line 192, in update
May 02 21:12:14 prometheus salt-minion[5753]:     **function_kwargs
May 02 21:12:14 prometheus salt-minion[5753]:   File "/usr/lib/python2.7/dist-packages/salt/utils/functools.py", line 147, in call_function
May 02 21:12:14 prometheus salt-minion[5753]:     return salt_function(*function_args, **function_kwargs)

(lines may be inaccurate as i added more debug messages to the code, see Additional context)

Expected behavior
The grains.items to be collected

Versions Report

salt-call --versions-report The same problem occurs on minions running python 3 on a new debian vm
Salt Version:
           Salt: 3000.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
      docker-py: 1.9.0
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.9.4
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.1

System Versions:
           dist: debian 9.12
         locale: UTF-8
        machine: x86_64
        release: 4.9.0-12-amd64
         system: Linux
        version: debian 9.12

Additional context
The value of function_args is [u'host'] and the value of function_kwargs is {'sanitize': False}, where the sanitize part seems to cause the problem. Where does it come from?

Removing the **function_kwargs parameter from return salt_function(*function_args, **function_kwargs) solves the problem but that can not be the solution ;)

What would be the expected value here?

@MyIgel MyIgel added the Bug broken, incorrect, or confusing behavior label May 2, 2020
@MyIgel
Copy link
Author

MyIgel commented May 2, 2020

Interestingly when using grains.items: [] it works somehow but why?

Or: Adding (maybe invalid?) parameters should show an more descriptive error?

@rossengeorgiev
Copy link
Contributor

Hi @MyIgel whats your salt master log saying? Do you see any errors, or Requested method not exposed: ..... ?

@MyIgel
Copy link
Author

MyIgel commented May 3, 2020

I can't see that message in the master debug log (but as i have more minions its not that easy to find anything in it ;)) and so far no other related errors?

But i don't think its that master related (and only affects minions)?

@OrangeDog
Copy link
Contributor

Duplicate of #56496

@waynew waynew added the Duplicate Duplicate of another issue or PR - will be closed label May 6, 2020
@waynew
Copy link
Contributor

waynew commented May 6, 2020

Closing this as duplicate

@waynew waynew closed this as completed May 6, 2020
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 Duplicate Duplicate of another issue or PR - will be closed
Projects
None yet
Development

No branches or pull requests

4 participants