trailofbits/algo

vpn creation on azure fails

timhn2501 opened this issue · 0 comments

Describe the bug

A clear and concise description of what the bug is.

After I start ./algo, and answer all the prompts, the scrip fails at the very end after I choose a region and generally the message says that I have specified an invalid resource. I try entering different numbers for different regions, but always get a similar error

To Reproduce

Steps to reproduce the behavior:

  1. Do this..
  2. Do that..
  3. ..

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Add any other context about the problem here.

Full log

PUT THE OUTPUT HERE

timish@TimHnGram:~/algo$ ./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
:
4^M
TASK [Cloud prompt] ********************************************************************************************ok: [localhost]

TASK [Set facts based on the input] ****************************************************************************ok: [localhost]
[VPN server name prompt]
Name the vpn server
[algo]
:
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]
:
y^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]
:
y^M
TASK [Wi-Fi On Demand prompt] **********************************************************************************ok: [localhost]
[Trusted Wi-Fi networks prompt]
List the names of any trusted Wi-Fi networks where macOS/iOS clients should not use "Connect On Demand"
(e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi)
:
^M
TASK [Trusted Wi-Fi networks 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]
:
y^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]
:
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]
:
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 20.04.5 LTS (Virtualized: wsl)
Created from git fork. Last commit: 651f949 Update cloud-hetzner.md (#14450)
Python 3.8.10
Runtime variables:
    algo_provider "azure"
    algo_ondemand_cellular "True"
    algo_ondemand_wifi "True"
    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] ****************************************************************************ok: [localhost]

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

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

TASK [Include a provisioning role] *****************************************************************************
TASK [cloud-azure : Install requirements] **********************************************************************ok: [localhost]

TASK [cloud-azure : set_fact] **********************************************************************************ok: [localhost]

TASK [cloud-azure : Set the default region] ********************************************************************ok: [localhost]
[cloud-azure : pause]
What region should the server be located in?
    1. Asia
    2. Asia Pacific
    3. Australia
    4. (Asia Pacific) Australia Central
    5. (Asia Pacific) Australia Central 2
    6. (Asia Pacific) Australia East
    7. (Asia Pacific) Australia Southeast
    8. Brazil
    9. (South America) Brazil South
    10. (South America) Brazil Southeast
    11. Canada
    12. (Canada) Canada Central
    13. (Canada) Canada East
    14. (Asia Pacific) Central India
    15. (US) Central US
    16. (US) Central US EUAP
    17. (US) Central US (Stage)
    18. (Asia Pacific) East Asia
    19. (Asia Pacific) East Asia (Stage)
    20. (US) East US
    21. (US) East US 2
    22. (US) East US 2 EUAP
    23. (US) East US 2 (Stage)
    24. (US) East US (Stage)
    25. Europe
    26. (Europe) France Central
    27. (Europe) France South
    28. (Europe) Germany North
    29. (Europe) Germany West Central
    30. Global
    31. India
    32. Japan
    33. (Asia Pacific) Japan East
    34. (Asia Pacific) Japan West
    35. (Asia Pacific) Jio India Central
    36. (Asia Pacific) Jio India West
    37. (Asia Pacific) Korea Central
    38. (Asia Pacific) Korea South
    39. (US) North Central US
    40. (US) North Central US (Stage)
    41. (Europe) North Europe
    42. (Europe) Norway East
    43. (Europe) Norway West
    44. (Europe) Qatar Central
    45. (Africa) South Africa North
    46. (Africa) South Africa West
    47. (US) South Central US
    48. (US) South Central US (Stage)
    49. (Asia Pacific) Southeast Asia
    50. (Asia Pacific) Southeast Asia (Stage)
    51. (Asia Pacific) South India
    52. (Europe) Sweden Central
    53. (Europe) Sweden South
    54. (Europe) Switzerland North
    55. (Europe) Switzerland West
    56. (Middle East) UAE Central
    57. (Middle East) UAE North
    58. United Kingdom
    59. (Europe) UK South
    60. (Europe) UK West
    61. United States
    62. (US) West Central US
    63. (Europe) West Europe
    64. (Asia Pacific) West India
    65. (US) West US
    66. (US) West US 2
    67. (US) West US 2 (Stage)
    68. (US) West US 3
    69. (US) West US (Stage)

Enter the number of your desired region
[20]
:
62^M
TASK [cloud-azure : pause] *************************************************************************************ok: [localhost]

TASK [cloud-azure : set_fact] **********************************************************************************ok: [localhost]

TASK [cloud-azure : Create AlgoVPN Server] *********************************************************************fatal: [localhost]: FAILED! => {"changed": false, "msg": "Resource group create_or_update failed with status code: 409 and message: Invalid resource group location 'westcentralus'. The Resource group already exists in location 'westus2'."}

TASK [include_tasks] *******************************************************************************************included: /home/timish/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=32   changed=1    unreachable=0    failed=1    skipped=0    rescued=1    ignored=0