particuleio/symplegma

Step 'Wait for port 22 to be ready' stucked

xunleii opened this issue · 9 comments

Hello,

I'm trying to test symplegma and I'm stucked at the first step : 'Wait for port 22 to be ready'.
Of course, if I try manually nc HOST PORT, I can find the string 'OpenSSH' and, if I comment this part, it works.

How to solve this problem ?

Environment:

  • Ansible version: 2.7.8
  • Provider: Scaleway
  • OS: Ubuntu Bionic

Hi,

Thanks for trying it out.

That's weird, I only tested it on CentOS and CoreOS, I can try tomorrow on ubuntu. Do you have any debug log from ansible ?

I'll try it now in debug mode and I'll join you the result :)

Sorry for my response time, I would try something before writing my response :)

After testing with -vvv (and a lot of patience...) I found one problem: wrong ansible_python_interpreter value ... I've changed python with python3, but not /opt (for CoreOS I think) with /usr.

But this step still stucked and here is the debug logs :

<localhost> ESTABLISH LOCAL CONNECTION FOR USER: xunleii
<localhost> EXEC /bin/sh -c 'echo ~xunleii && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036 `" && echo ansible-tmp-1563224302.811949-245313105333036="` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036 `" ) && sleep 0'
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: xunleii
<localhost> EXEC /bin/sh -c 'echo ~xunleii && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677 `" && echo ansible-tmp-1563224302.8239734-257772676152677="` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677 `" ) && sleep 0'
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: xunleii
<localhost> EXEC /bin/sh -c 'echo ~xunleii && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892 `" && echo ansible-tmp-1563224302.8381455-111083372960892="` echo /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892 `" ) && sleep 0'
Using module file /usr/local/lib/python3.7/dist-packages/ansible/modules/utilities/logic/wait_for.py
Using module file /usr/local/lib/python3.7/dist-packages/ansible/modules/utilities/logic/wait_for.py
<localhost> PUT /home/xunleii/.ansible/tmp/ansible-local-20896ifq1srq8/tmp0o2914_7 TO /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036/AnsiballZ_wait_for.py
Using module file /usr/local/lib/python3.7/dist-packages/ansible/modules/utilities/logic/wait_for.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036/ /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036/AnsiballZ_wait_for.py && sleep 0'
<localhost> PUT /home/xunleii/.ansible/tmp/ansible-local-20896ifq1srq8/tmpi9c3gfqb TO /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892/AnsiballZ_wait_for.py
<localhost> PUT /home/xunleii/.ansible/tmp/ansible-local-20896ifq1srq8/tmpbospkq9w TO /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677/AnsiballZ_wait_for.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892/ /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892/AnsiballZ_wait_for.py && sleep 0'
<localhost> EXEC /bin/sh -c 'chmod u+x /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677/ /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677/AnsiballZ_wait_for.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python3 /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.811949-245313105333036/AnsiballZ_wait_for.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python3 /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8239734-257772676152677/AnsiballZ_wait_for.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python3 /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892/AnsiballZ_wait_for.py && sleep 0'

When I'm running manually the last line (/usr/bin/python3 /home/xunleii/.ansible/tmp/ansible-tmp-1563224302.8381455-111083372960892/AnsiballZ_wait_for.py), I get this output:

/home/xunleii/.ansible/tmp/ansible-tmp-1563224508.982143-123080354506233/AnsiballZ_wait_for.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

Thanks for your help :)

NB: I've another problem with pip3 install.... but I'll write you an issue tomorrow about that

The thing is that the role os_bootstrap should not be necessary if you already have python-dev and pip install.

I'll try quickly with ubuntu on AWS.

The bootstrap role installs python and pip for coreos in a standalone folder.

Could you try setting bootstrap_python: false in group_vars

After testing, python3 is installed by default, but not pip3 (I don't know where it used).
Also, if I skip python bootstrapping, it try to uninstall docker which is not installed by default.

I think OS Bootstrapping must be allowed only on CoreOS, avoid theses errors.

What do you think about that ?

I've been trying to install on Ubuntu. There are a couple of error i'm fixing and will release today. It is mostly what you said:

  • bootstrapping python must be done only for CoreOS, so bootstrap_python should be set to false in your case.
  • python-dev and python-pip or python3-dev and python3-pip should be install for ansible.
  • etcdctl is missing for non CoreOS OS by default, i'll add it also
  • runc is missing also on ubuntu, I will add it to the containerd playbook
  • bin_dir should be set to /usr/local/bin in non CoreOS os as it is in PATH by default and avoid error.
  • docker.service masking should be allowed to fail in case it does not exist.

Thank you so much :)

New version works well we Ubuntu ... thanks