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

__virtual__ returned False is cryptic #54702

Closed
ksalman opened this issue Sep 20, 2019 · 12 comments
Closed

__virtual__ returned False is cryptic #54702

ksalman opened this issue Sep 20, 2019 · 12 comments
Assignees
Labels
good first issue good for someone new to salt ZRelease-Sodium retired label
Milestone

Comments

@ksalman
Copy link

ksalman commented Sep 20, 2019

The error is cryptic while it just needed python3-mysqldb package. So apt-get install -y python3-mysqldb fixed it.

Setup

vlab local user:
  mysql_user.present:
    - name: user
    - host: localhost
    - allow_passwordless: True
    - require:
      - pkg: mysql-server

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)
Tried to create user with the example pasted above and got this error

<snip>
[DEBUG   ] Could not LazyLoad mysql_user.present: 'mysql_user' __virtual__ returned False
[INFO    ] Running state [vlab] at time 08:06:37.711519
[DEBUG   ] LazyLoaded mysql_user.present
[ERROR   ] State 'mysql_user.present' was not found in SLS 'roles.vlab.database'
Reason: 'mysql_user' __virtual__ returned False
<snip>
----------
          ID: vlab local user
    Function: mysql_user.present
        Name: user
      Result: False
     Comment: State 'mysql_user.present' was not found in SLS 'roles.vlab.database'
              Reason: 'mysql_user' __virtual__ returned False
     Changes:

Versions Report

salt-minion --versions
Salt Version:
Salt: 2019.2.0

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.3.7
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.5.2 (default, Nov 12 2018, 13:43:14)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-21-generic
system: Linux
version: Ubuntu 16.04 xenial

@lsh-0
Copy link

lsh-0 commented Dec 13, 2019

just encountered this, thank you for opening a ticket with a solution! from the error message I assumed we had written some arcane custom code somewhere and forgotten about it.

@stale
Copy link

stale bot commented Jan 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 12, 2020
@ksalman
Copy link
Author

ksalman commented Jan 12, 2020 via email

@stale
Copy link

stale bot commented Jan 12, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 12, 2020
@stale
Copy link

stale bot commented Feb 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Feb 11, 2020
@ksalman
Copy link
Author

ksalman commented Feb 11, 2020 via email

@stale
Copy link

stale bot commented Feb 11, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Feb 11, 2020
@stale
Copy link

stale bot commented Mar 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Mar 12, 2020
@RolandRosenfeld
Copy link

Please reopen and fix the issue...

@stale
Copy link

stale bot commented Mar 13, 2020

Thank you for updating this issue. It is no longer marked as stale.

@sagetherage
Copy link
Contributor

closing as fixed in PR #56395 will be released in Sodium

@sagetherage sagetherage added the good first issue good for someone new to salt label May 23, 2020
@sc-kanga
Copy link

Please reopen and fix the issue...

If you're still having issues with this, post installation of python3-mysqldb, it's likely you've made the same mistake I did and haven't updated your map.jinja or whatever else it is you've used to jinja map. As soon as I did that, everything worked (though i now have an equally odd error on CentOS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good for someone new to salt ZRelease-Sodium retired label
Projects
None yet
Development

No branches or pull requests

7 participants