Open frogunder opened 7 years ago
[root@ip-10-0-0-9 ~]# salt-call --local sys.doc none
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_elbv2. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_elbv2.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_elbv2', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_kinesis. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_kinesis.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
local:
----------
I am also able to replicate this.
Thanks, Daniel
I am facing this too.
This isn't specific to AWS instances. I get the same errors on a fresh install on Debian Stretch using the official repos if I have boto packages installed. Additionally installing python-raet
and python-ioflo
prevents some of the exceptions getting thrown in the debug output, but doesn't help with the KeyError exceptions. The Error and Warning messages are still printed.
I am also getting the same error on Ubuntu 16.04 running
$> salt-minion --version
salt-minion 2017.7.1 (Nitrogen)
salt-master
is the same version
This only happens on servers where i have the aws cli installed which of course depends on boto. This happens when calling states from the salt master as well, it is not limited to salt-local
calls
when updating a state that deals with aws, i see the following (most of this is above, but for completeness)
Aug 22 15:24:43 prodweb01 salt-minion[985]: [WARNING ] salt.loaded.int.module.boto_kinesis.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
Aug 22 15:24:49 prodweb01 salt-minion[985]: [ERROR ] Failed to import module boto_datapipeline, this is due most likely to a syntax error:
Aug 22 15:24:49 prodweb01 salt-minion[985]: Traceback (most recent call last):
Aug 22 15:24:49 prodweb01 salt-minion[985]: File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1411, in _load_module
Aug 22 15:24:49 prodweb01 salt-minion[985]: mod = imp.load_module(mod_namespace, fn_, fpath, desc)
Aug 22 15:24:49 prodweb01 salt-minion[985]: File "/usr/lib/python2.7/dist-packages/salt/modules/boto_datapipeline.py", line 20, in <module>
Aug 22 15:24:49 prodweb01 salt-minion[985]: boto3.set_stream_logger(level=logging.CRITICAL)
Aug 22 15:24:49 prodweb01 salt-minion[985]: AttributeError: 'module' object has no attribute 'set_stream_logger'
Aug 22 15:24:49 prodweb01 salt-minion[985]: [ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_efs. Module will not be loaded: 'module' object has no attribute '__version__'
Aug 22 15:24:49 prodweb01 salt-minion[985]: [WARNING ] salt.loaded.int.module.boto_efs.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_efs', please fix this.
Aug 22 15:24:49 prodweb01 salt-minion[985]: [ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_elbv2. Module will not be loaded: 'boto3.assign_funcs'
Aug 22 15:24:49 prodweb01 salt-minion[985]: [WARNING ] salt.loaded.int.module.boto_elbv2.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_elbv2', please fix this.
Aug 22 15:24:49 prodweb01 salt-minion[985]: [ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_kinesis. Module will not be loaded: 'boto3.assign_funcs'
Aug 22 15:24:49 prodweb01 salt-minion[985]: [WARNING ] salt.loaded.int.module.boto_kinesis.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
Upgrading boto3 via pip solved my problem, you can give it a shot.
pip install --upgrade boto3
@erktigli I tried upgrading boto3, but I still get these error messages:
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_elbv2. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_elbv2.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_elbv2', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_kinesis. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_kinesis.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
Versions:
OS: Ubuntu 16.04
Python version: Python 2.7.12
Boto3 version: boto3-1.4.7
The update for me only fixed the exception error, the rest remain.
Hello, I have the same issue too. Tested with Centos 7.3 and 7.4 IUS and EPEL enabled Nitrogen 2017.7.1
Just after installing AWS CLI, it starts to have a lot of tracebacks too as shown in the initial message.
Sorry for not getting this resolved but i created another instance to reproduce the issue which i succeed but after installing boto3 those errors and warning went away. My environment is fully updated CentOS 7.4 with only amazon SSM agent installed.
awscli version: 1.11.154
botocore: 1.7.16
boto3: 1.4.7
boto: 2.25.0
salt: Nitrogen
@erktigli , thanks for your test. which python version are you using ? mine is 2.7.5 Is is Nitrogen 2017.7.0 or 2017.7.1 ?
@hegyre , no problem. I'm using python "2.7.5" with salt "2017.7.1" and another side note, i uninstalled boto3 and installed the version 1.4.4 but the error didn't appear. I will try to inspect thoroughly next time maybe i can find something else.
I'm wondering if this is due to this issue: https://bugs.centos.org/view.php?id=13644
In which I have Epel 7.9 during python installation instead of 7.10... I will try again with fresh epel 7.10 and let you know
Well at least, the issue is solved for me.
I don't know if this was epel 7-10 or boto3 1.4.7 which solved the issue, but after installing both, and before installing salt, there is no more issue at all (even those in the initial ticket message are cleared!)
Here is what I did to solve the issue in this order: Install a fresh Centos 7.3 (because there is no AWS AMI for 7.4 yet) Install epel 7-10 directly (without passing via 7-9, but it should not be an issue), with the following: yum -y localinstall http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
then: yum -y update yum -y install python2-pip pip install --upgrade pip # This one may not be needed to solve the issue, anyway I keep it there pip install awscli pip install --upgrade boto3
then install salt 2017.7.1
Hope this helps some of you
See my comment on #44062 about the root of this problem.
Basically, Salt is trying to use boto3
in its own module (salt.util.boto3
). This causes import inconsistencies depending on how sys.path
is setup.
@erktigli upgrading boto3 fixed the error messages I was getting.
Seeing this again:
○ : [WARNING ] /usr/lib/python2.7/site-packages/salt/states/cmd.py:824: DeprecationWarning: The legacy user/group arguments are deprecated. Replace them with runas. These arguments will be removed in Salt Oxygen.
Sep 6 18:56:00 localhost salt-minion: [ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_elbv2. Module will not be loaded: 'boto3.assign_funcs'
Sep 6 18:56:00 localhost salt-minion: [WARNING ] salt.loaded.int.module.boto_elbv2.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_elbv2', please fix this.
Sep 6 18:56:00 localhost salt-minion: [ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.boto_kinesis. Module will not be loaded: 'boto3.assign_funcs'
Sep 6 18:56:00 localhost salt-minion: [WARNING ] salt.loaded.int.module.boto_kinesis.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
@VirtualAirwaves This is already fixed in SaltStack 2018.2 (but is not is 2017.7.7): https://github.com/saltstack/salt/pull/44063/commits/1789ca93f905a56b0ab93a54afb1bcb4b3e9f58c
On 4+ year old hardware...
$ apt install python-pip $ pip install --upgrade boto3
$ salt-call state.highstate
[ERROR ] Exception raised when processing virtual function for salt.loaded.int.module.boto_elbv2. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_elbv2.virtual() is wrongly returning None
. It should either return True
, False
or a new name. If you're the developer of the module 'boto_elbv2', please fix this.
[ERROR ] Exception raised when processing virtual function for salt.loaded.int.module.boto_kinesis. Module will not be loaded: 'boto3.assign_funcs'
[WARNING ] salt.loaded.int.module.boto_kinesis.virtual() is wrongly returning None
. It should either return True
, False
or a new name. If you're the developer of the module 'boto_kinesis', please fix this.
$ dpkg -l | grep salt ii salt-common 2017.7.4+dfsg1-1ubuntu18.04.2 all shared libraries that salt requires for all packages ii salt-master 2017.7.4+dfsg1-1ubuntu18.04.2 all remote manager to administer servers via salt ii salt-minion 2017.7.4+dfsg1-1ubuntu18.04.2 all client package for salt, the distributed remote execution system
$ salt-call --versions-report Salt Version: Salt: 2017.7.4
Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.6.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.10 libgit2: 0.26.0 libnacl: Not Installed M2Crypto: Not Installed Mako: 1.0.7 msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: 0.26.2 Python: 3.6.9 (default, Mar 15 2022, 13:55:28) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 16.0.2 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.2.5
System Versions: dist: Ubuntu 18.04 bionic locale: UTF-8 machine: x86_64 release: 5.4.0-109-generic system: Linux version: Ubuntu 18.04 bionic
$ uname -a Linux gort 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
:-(
Description of Issue/Question
On 2017.7.0 when running
salt-call --local sys.doc none
orsalt-call --local sys.doc aliases.list_aliases
on amazon linux I get errors/warnings. Commands seems to run fine. Other salt-call --local commands runs fine without the warning/error. I see this:Setup
Amazon linux machine with salt 2017.7.0
Steps to Reproduce Issue
Other salt-call commands don't give it:
Running in debug mode I see a lot of tracebacks:
Versions Report