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

Setup fails for Vultr #14602

Open
MGelbana opened this issue Apr 15, 2023 · 2 comments
Open

Setup fails for Vultr #14602

MGelbana opened this issue Apr 15, 2023 · 2 comments

Comments

@MGelbana
Copy link

Describe the bug

An error occurs while installing Algo on Vultr

Full log

./algo

PLAY [localhost] *******************************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Playbook dir stat] ***********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Ensure Ansible is not being run in a world writable directory] ***************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[DEPRECATION WARNING]: Use 'ansible.utils.ipaddr' module instead. This feature will be removed from ansible.netcommon in a release after 2024-01-01. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
[WARNING]: The value '' is not a valid IP address or network, passing this value to ipaddr filter might result in breaking change in future.

TASK [Ensure the requirements installed] *******************************************************************************************************************************************************************
ok: [localhost]

TASK [Set required ansible version as a fact] **************************************************************************************************************************************************************
ok: [localhost] => (item=ansible==6.1.0)

TASK [Just get the list from default pip] ******************************************************************************************************************************************************************
ok: [localhost]

TASK [Verify Python meets Algo VPN requirements] ***********************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Verify Ansible meets Algo VPN requirements] **********************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[WARNING]: Found variable using reserved name: no_log

PLAY [Ask user for the input] ******************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [localhost]
[Cloud prompt]
What provider would you like to use?
    1. DigitalOcean
    2. Amazon Lightsail
    3. Amazon EC2
    4. Microsoft Azure
    5. Google Compute Engine
    6. Hetzner Cloud
    7. Vultr
    8. Scaleway
    9. OpenStack (DreamCompute optimised)
    10. CloudStack (Exoscale optimised)
    11. Linode
    12. Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)
  
Enter the number of your desired provider
:
7^M
TASK [Cloud prompt] ****************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] ************************************************************************************************************************************************************************
ok: [localhost]
[VPN server name prompt]
Name the vpn server
[algo]
:
^M
TASK [VPN server name prompt] ******************************************************************************************************************************************************************************
ok: [localhost]
[Cellular On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to cellular networks?
[y/N]
:
^M
TASK [Cellular On Demand prompt] ***************************************************************************************************************************************************************************
ok: [localhost]
[Wi-Fi On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to Wi-Fi?
[y/N]
:
^M
TASK [Wi-Fi On Demand prompt] ******************************************************************************************************************************************************************************
ok: [localhost]
[Retain the PKI prompt]
Do you want to retain the keys (PKI)? (required to add users in the future, but less secure)
[y/N]
:
^M
TASK [Retain the PKI prompt] *******************************************************************************************************************************************************************************
ok: [localhost]
[DNS adblocking prompt]
Do you want to enable DNS ad blocking on this VPN server?
[y/N]
:
^M
TASK [DNS adblocking prompt] *******************************************************************************************************************************************************************************
ok: [localhost]
[SSH tunneling prompt]
Do you want each user to have their own account for SSH tunneling?
[y/N]
:
^M
TASK [SSH tunneling prompt] ********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] ************************************************************************************************************************************************************************
ok: [localhost]

PLAY [Provision the server] ********************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [localhost]

--> Please include the following block of text when reporting issues:

Algo running on: Ubuntu 22.04.2 LTS
Created from git fork. Last commit: 45fe0f5 change dockerhub docs references
Python 3.10.6
Runtime variables:
    algo_provider "vultr"
    algo_ondemand_cellular "False"
    algo_ondemand_wifi "False"
    algo_ondemand_wifi_exclude "X251bGw="
    algo_dns_adblocking "False"
    algo_ssh_tunneling "False"
    wireguard_enabled "True"
    dns_encryption "True"

TASK [Display the invocation environment] ******************************************************************************************************************************************************************
changed: [localhost]

TASK [Install the requirements] ****************************************************************************************************************************************************************************
ok: [localhost]

TASK [Generate the SSH private key] ************************************************************************************************************************************************************************
changed: [localhost]

TASK [Generate the SSH public key] *************************************************************************************************************************************************************************
changed: [localhost]

TASK [Copy the private SSH key to /tmp] ********************************************************************************************************************************************************************
changed: [localhost]

TASK [Include a provisioning role] *************************************************************************************************************************************************************************
[cloud-vultr : pause]
Enter the local path to your configuration INI file
(https://trailofbits.github.io/algo/cloud-vultr.html):
:
^M
TASK [cloud-vultr : pause] *********************************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Set the token as a fact] ***************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Get regions] ***************************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Format regions] ************************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Set regions as a fact] *****************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Set default region] ********************************************************************************************************************************************************************
ok: [localhost]
[cloud-vultr : pause]
What region should the server be located in?
(https://www.vultr.com/locations/):
    1.   Melbourne
    2.   Sydney
    3.   São Paulo
    4.   Toronto
    5.   Santiago
    6.   Frankfurt
    7.   Madrid
    8.   Paris
    9.   London
    10.   Bangalore
    11.   Delhi NCR
    12.   Mumbai
    13.   Osaka
    14.   Tokyo
    15.   Seoul
    16.   Mexico City
    17.   Amsterdam
    18.   Warsaw
    19.   Stockholm
    20.   Singapore
    21.   Atlanta
    22.   Chicago
    23.   Dallas
    24.   Honolulu
    25.   Los Angeles
    26.   Miami
    27.   New Jersey
    28.   Seattle
    29.   Silicon Valley
    30.   Johannesburg
  
Enter the number of your desired region
[27]
:
9^M
TASK [cloud-vultr : pause] *********************************************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Set the desired region as a fact] ******************************************************************************************************************************************************
ok: [localhost]

TASK [cloud-vultr : Creating a firewall group] *************************************************************************************************************************************************************
changed: [localhost]

TASK [cloud-vultr : Creating firewall rules] ***************************************************************************************************************************************************************
changed: [localhost] => (item={'protocol': 'tcp', 'port': 4160, 'ip': 'v4', 'cidr': '0.0.0.0/0'})
changed: [localhost] => (item={'protocol': 'tcp', 'port': 4160, 'ip': 'v6', 'cidr': '::/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 500, 'ip': 'v4', 'cidr': '0.0.0.0/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 500, 'ip': 'v6', 'cidr': '::/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 4500, 'ip': 'v4', 'cidr': '0.0.0.0/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 4500, 'ip': 'v6', 'cidr': '::/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 51820, 'ip': 'v4', 'cidr': '0.0.0.0/0'})
changed: [localhost] => (item={'protocol': 'udp', 'port': 51820, 'ip': 'v6', 'cidr': '::/0'})

TASK [cloud-vultr : Upload the startup script] *************************************************************************************************************************************************************
changed: [localhost]

TASK [cloud-vultr : Creating a server] *********************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: invalid literal for int() with base 10: '1.524'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 107, in <module>\n  File \"<stdin>\", line 99, in _ansiballz_main\n  File \"<stdin>\", line 47, in invoke_module\n  File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_vultr_server_payload_6iqka2sy/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py\", line 933, in <module>\n  File \"/tmp/ansible_vultr_server_payload_6iqka2sy/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py\", line 928, in main\n  File \"/tmp/ansible_vultr_server_payload_6iqka2sy/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/module_utils/vultr.py\", line 291, in get_result\n  File \"/tmp/ansible_vultr_server_payload_6iqka2sy/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/module_utils/vultr.py\", line 271, in normalize_result\nValueError: invalid literal for int() with base 10: '1.524'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

TASK [include_tasks] ***************************************************************************************************************************************************************************************
included: /home/mgelbana/workspace/repos/open/algo/playbooks/rescue.yml for localhost

TASK [debug] ***********************************************************************************************************************************************************************************************
ok: [localhost] => {
    "fail_hint": [
        "Sorry, but something went wrong!",
        "Please check the troubleshooting guide.",
        "https://trailofbits.github.io/algo/troubleshooting.html"
    ]
}

TASK [Fail the installation] *******************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost                  : ok=37   changed=7    unreachable=0    failed=1    skipped=1    rescued=1    ignored=0
@cloudrck
Copy link

cloudrck commented Jun 28, 2023

This is the same as #14569

The fix is to make sure you're using a python virtual environment (I'm using venv) and install the upgraded version of ngine_io.vultr using Ansible-galaxy. Currently 1.1.3

@daemonhorn
Copy link

ansible-galaxy collection install ngine_io.vultr Will install the latest version, and allow vultr to work with the setup automation again. My vultr region must be busy as I also had to modify the playbooks/cloud_post.yml to increase the timeouts under Wait until SSH becomes ready... to:

 delay: 20
 timeout: 520

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