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

Vagrant: The sample-multiserver.yml example fails with bionic and "Unable to find any of pip3 to use. pip needs to be installed." #122

Open
acsr opened this issue Sep 21, 2019 · 6 comments

Comments

@acsr
Copy link

acsr commented Sep 21, 2019

Full failure report on the prompt for the plone-5.2/primary:

...
TASK [plone.plone_server : Superlance installed] *******************************
fatal: [bionic]: FAILED! => {"changed": false, "msg": "Unable to find any of pip3 to use.  pip needs to be installed."}
...

You can quickly fix that after the initial vagrant up by installing pip3 in the vm like this and reprovision the vm

While the VM is still up after vagrant up:

vagrant ssh  # enter the VM
sudo apt install python3-pip  # install pip by hand (only for testing)

now reprovision:

vagrant provision

To permanently include the pip3 command you need to enhance the playbook.
I come back if I fixed it or someone else jumps in to choose the proper location to put the code in.

must be something similar to https://relativkreativ.at/articles/how-to-install-python-with-ansible

For now I have no idea where the pip3 requirement comes from in the current playbook version 1.3.7 since

  • grep does not find any pip3 locally in the local ansible-playbook directory
  • the provisioned Plone 5.2 uses still python 2.7.
@smcmahon
Copy link
Member

smcmahon commented Oct 1, 2019

I wonder if the problem here is with the superlance install. I haven't tested using python3 and superlance at the same time.

Can you try your test with "plone_hot_monitor" set to "cron"?

plone_hot_monitor: cron

I like the cron-style hot monitor better in any case. It does a smoother client start/stop.

@smcmahon
Copy link
Member

smcmahon commented Oct 1, 2019

If it turns out that superlance is the problem, I propose to add an error message to let the user know that python3 and superlance aren't compatible.

@stevepiercy
Copy link
Contributor

stevepiercy commented Nov 16, 2019

I ran into this issue myself, and bumping superlance to 1.0 (which supports Python 2 and 3) fixed the reported issue. Or maybe worked around it.

I think it is possible to install Plone 5.2 on Python 3, yes?

https://github.com/plone/ansible.plone_server/blob/95c7b22f15ab5499bc2082a1c298f93539fe1018/defaults/main.yml#L9

@stevepiercy
Copy link
Contributor

I ran into this again, but this time when specifying plone_python_version: '3'. To get past this issue, I used the following in roles/plone.plone_server/tasks/main.yml.

pip: name=superlance version=1.0 extra_args='--index-url=https://pypi.python.org/simple/' executable=/usr/bin/pip3

I got the executable path by looking at set_fact: virtualenv_path=/usr/bin/ in roles/plone.plone_server/tasks/Debian.yml.

After that, I still had to run the playbook repeatedly, once because of the issue mentioned under Supervisor task list is updated and we have a memmon and some other weird issue with Create initial Plone site.

@stevepiercy
Copy link
Contributor

@acsr @smcmahon I submitted plone/ansible.plone_server#137 to resolve this issue.

I still have not got the playbook to run Python 3 yet, but my PR for zc.monitor was approved and merged, and I'm waiting for a new release to see if that works.

@stevepiercy
Copy link
Contributor

Although my PR for zc.monitor was merged and a new release was made...

zopefoundation/zc.monitor#1

...it has a dependency zc.ngi that either needs to be ported to Python 3 or replaced with asyncio:

zopefoundation/zc.monitor#3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants