Bug? In Yum module, under CentOS 6.6 - plugins not loaded
40 views
Skip to first unread message
Eric Coulter
unread,
Aug 19, 2015, 10:02:19 PM8/19/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
On a machine running CentOS 6.6, and the Rocks cluster management software, with Python 2.6.6, yum version 3.2.29, I get the following errors from running one of the example plays in the yum module:
# ansible-playbook -vvv yum_test.yml No config file found; using defaults 1 plays in yum_test.yml
PLAY ***************************************************************************
TASK [setup] ******************************************************************* ESTABLISH LOCAL CONNECTION FOR USER: root localhost EXEC mkdir -p "$HOME/.ansible/tmp/ansible-tmp-1439997821.13-201432756979773" && echo "$HOME/.ansible/tmp/ansible-tmp-1439997821.13-201432756979773" localhost PUT /tmp/tmpYGI4Qv TO /root/.ansible/tmp/ansible-tmp-1439997821.13-201432756979773/setup localhost EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1439997821.13-201432756979773/setup; rm -rf "/root/.ansible/tmp/ansible-tmp-1439997821.13-201432756979773/" >/dev/null 2>&1 ok: [localhost]
TASK [install XSEDE yum repo] ************************************************** ESTABLISH LOCAL CONNECTION FOR USER: root localhost EXEC mkdir -p "$HOME/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944" && echo "$HOME/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944" localhost PUT /tmp/tmpkYALU8 TO /root/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944/yum localhost EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944/yum; rm -rf "/root/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944/" >/dev/null 2>&1 An exception occurred during task execution. The full traceback is: Traceback (most recent call last): File "/root/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944/yum", line 3424, in <module> main() File "/root/.ansible/tmp/ansible-tmp-1439997821.64-29832905906944/yum", line 919, in main if 'rhnplugin' in my.plugins._plugins: AttributeError: DummyYumPlugins instance has no attribute '_plugins'
PLAY RECAP ********************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1
########################################
It appears that in ansible/lib/ansible/modules/core/packaging/os/yum.py the comment in lines 917-918 is not true (at least for my system...)
914 my = yum_base(params['conf_file']) 915 # A sideeffect of accessing conf is that the configuration is 916 # loaded and plugins are discovered 917 my.conf 919 repoquery = None 919 if 'rhnplugin' in my.plugins._plugins:
Anyone run into this before? I assume it's something in my local environment, but no idea where to look.
Thanks! Eric C.
Toshio Kuratomi
unread,
Aug 20, 2015, 6:20:11 PM8/20/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
I haven't seen that either. I could make that check for 'rhnplugin'
in my.plugins more robust in case of an exception but I'm not sure
what would cause it in the first place.
the commit assumes that if there's no _plugins attribute then we don't
have the rhnplugin enabled. That seems reasonable but it is just an
assumption. Hopefully it proves correct in practice.
-Toshio
Eric Coulter
unread,
Aug 21, 2015, 12:02:56 PM8/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Awesome! The new commit does work on my system. I really appreciate your quick response.