-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
After executing 'salt * inventory.audit' ,No data is written to the database #29
Comments
Hi, Which operating system(s) are you using on your Salt master and minions? Which version(s) of SaltStack are you using on your Salt master and minions? If no records are being written to the database then then it sounds like the issue is on the server side where the inventory.py runner is executed - this script is invoked when presence and audit events are triggered by minions and writes records to the database.
If either of these import commands fail, then please install the appropriate Python packages for your operating system and try again.
In the second shell run:
Take a note of any errors that are reported in the first shell in the Salt master log. You can then exit the tail command using Ctrl + C.
Now in the second shell run:
There should be a few events appearing in the first shell. Look for any errors in the output. |
Hello I found it: Please help solve this problem Thank you |
The inventory module will not work on Windows 10 Salt Minions as there is Linux specific code in the module. I believe that the runner would work on a Windows 10 Salt Master but this has not been tested. It looks like your Salt Master cannot find the inventory.py runner. Can you confirm that you have the following in your
If not, please add the above and restart your Salt master. Also please confirm that
If not, please copy these files from the runners directory from Salt Minion Inventory download. Then restart your Salt Master. Also, do you have selinux enabled? |
Can you confirm if you are using the SaltStack python 2 or 3 version? From the warning message you have shared I am assuming version 2. I don't see this error on my server which is running the python 2 version of Salt Stack 2019. This could be coming from something else in your SaltStack set-up. In one of my previous replies I asked if you could run:
in one shell and then in a second shell run:
Can you share the output from the SaltStack event queue? It should show the inventory.audit function being executed on the minion(s), the result returned to the queue and then the result of the reactor running. Hopefully there will be some useful info here. |
Looks like the warning message you are seeing is due to a known issue: saltstack/salt#52487 It would appear that this fix has been included in Salt Stack 2019.2.1 - there are no RPMs for this version at this time. I don't think that this warning explains why the Salt Minion Inventory isn't working though. |
Thanks for the screen shots. It looks like the Python interpreter cannot find the ConfigParser module which is normally installed as part of the python-libs RPM under CentOS. Does /usr/lib64/python2.7/ConfigParser.py exist on your Salt Master? Is the python-libs RPM installed? |
What happens if you try importing the ConfigParser in the Python 2? E.g. load the python interpreter:
Then type:
You should see this:
|
Thanks for the info. Yes, that is the correct output, however I wasn't expecting it to work under your set-up as for some reason the module is not found when running under SaltStack. I've just made some minor modifications to the runner to make it work with the Python 3 version of SaltStack also. Have you tried this version at some point? I only ask as one of your earlier screen shots shows in /var/lib/salt/runners a sub directory called pycache which is only created when using Python 3. Please can you try downloading https://raw.githubusercontent.com/neilmunday/Salt-Minion-Inventory/master/runners/inventory.py and saving it to /var/lib/salt/runners/inventory.py. Then restart your Salt Master: Now try the tests above again please. |
Looks like you have put a space either side of the equals sign. Please run like so:
|
Hello friend! |
Excellent - are you happy for this issue to be closed? |
[WARNING ] /usr/lib/python2.7/site-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)
salt-syndic-node1:
salt-syndic-node1 properties have not changed
The text was updated successfully, but these errors were encountered: