accelerate mode and custom python interpreter (virtualenv)

92 views
Skip to first unread message

knac...@googlemail.com

unread,
Sep 2, 2015, 3:33:05 AM9/2/15
to Ansible Project
Hi guys,

unfortunately I'm on REHL6 without the option to install python packages for the standard python installation. Thus I'm using Ansible from an virtualenv on the managing node. That works fine, except that now I'm running into performance issues.

The virtualenv sits on a nfs share which is mounted to all nodes. Thus it is available on all nodes.

python-keyczar is installed in the virtualenv and seems to work. At least the following command runs from within the virtualenv

keyczart create --location=~/temp --purpose=crypt

Now I've created a wrapper script for the custom python interpreter (/home/test/PythonVirtualEnv/pyenv
)
:

#!/bin/tcsh

source
/home/ft2vwaa/PythonVirtualEnv/AnsibleEnv2/bin/activate.csh

python $argv
[1]


and I can use it as custom interpreter, e.g.:

- hosts: logstash
  name
: Source virtual env
  remote_user
: "{{ test_remote_user }}"
  vars
:
    ansible_python_interpreter
: /home/test/PythonVirtualEnv/pyenv
  tasks
:
 
- name: check
    shell
: echo $VIRTUAL_ENV
   
register: out
 
- debug: var=out.stdout_lines

This prints out the virtualenv as expected. So it is actually loaded.

But adding the accelerate mode directive results in an error.

- hosts: logstash
  name
: Source virtual env
  remote_user
: "{{ ipf_remote_user }}"
  accelerate
: true
  vars
:
    ansible_python_interpreter
: /home/ft2vwaa/PythonVirtualEnv/pyenv
  tasks
:
 
- name: check
    shell
: echo $VIRTUAL_ENV
   
register: out
 
- debug: var=out.stdout_lines


GATHERING FACTS
***************************************************************
fatal
: [server_01] => Failed to launch the accelerated daemon on server_01 (reason: keyczar is not installed (on the remote side))
fatal
: [server_02] => Failed to launch the accelerated daemon on server_02 (reason: keyczar is not installed (on the remote side))


Any ideas or suggestions are highly welcome.

Cheers,

Jan



Toshio Kuratomi

unread,
Sep 2, 2015, 4:13:48 PM9/2/15
to ansible...@googlegroups.com
I haven't looked at the code yet to see if there's something about
accelerate that may interfere with ansible_python_interpreter but I
have a feeling that you might not get any speedup even if you get it
working. accelerate was written before openssh's controlpersist was
widespread. Now that even RHEL6 has a controlpersist capable openssh,
there's not much reason to use it for most platforms.

-Toshio
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9e6dc9bf-37c2-400b-bbc0-b5e4770869aa%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages