Open ThoAppelsin opened 5 months ago
I've encountered with the same issue, and got it working with the change from this PR. https://github.com/trailofbits/algo/pull/14680
I still have this issue today. Though I'm running the command through ansible-playbook.
One additional comment, the README says to run this command on Ubuntu:
sudo apt install -y --no-install-recommends python3-virtualenv file lookup
When I execute this on Ubuntu 22.04.3 LTS, I receive this error:
sudo apt install -y --no-install-recommends python3-virtualenv file lookup
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package lookup
So I didn't install lookup as part of setting up the dependencies.
Full log of algo install afterwards:
~/algo$ ansible-playbook main.yml -e \
"provider=azure \
server_name=[REMOVED] \
ondemand_cellular=false \
ondemand_wifi=false \
dns_adblocking=true \
ssh_tunneling=false \
store_pki=false \
azure_secret=[REMOVED] \
azure_tenant=[REMOVED] \
azure_client_id=[REMOVED] \
azure_subscription_id=[REMOVED] \
region=eastus2"
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==9.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]
TASK [Set facts based on the input] ************************************************************************************
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.3 LTS (Virtualized: microsoft)
Created from git clone. Last commit: 74051d0 Update README.md dependencies (#14634)
Python 3.10.12
Runtime variables:
algo_provider "azure"
algo_ondemand_cellular "False"
algo_ondemand_wifi "False"
algo_ondemand_wifi_exclude "X251bGw="
algo_dns_adblocking "True"
algo_ssh_tunneling "False"
wireguard_enabled "True"
dns_encryption "True"
TASK [Display the invocation environment] ******************************************************************************
changed: [localhost]
TASK [Install the requirements] ****************************************************************************************
changed: [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] *************************************************************************************
TASK [cloud-azure : Install requirements] ******************************************************************************
changed: [localhost]
TASK [cloud-azure : set_fact] ******************************************************************************************
ok: [localhost]
TASK [cloud-azure : set_fact] ******************************************************************************************
ok: [localhost]
TASK [cloud-azure : Create AlgoVPN Server] *****************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob' (/home/[REMOVED]/algo/.env/lib/python3.10/site-packages/azure/storage/blob/__init__.py)
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (ansible[azure] (azure >= 2.0.0)) on [REMOVED]'s Python /home/[REMOVED]/algo/.env/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
TASK [include_tasks] ***************************************************************************************************
included: /home/[REMOVED]/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=22 changed=6 unreachable=0 failed=1 skipped=10 rescued=1 ignored=0
Describe the bug
Deployment to Azure fails with an error (on Windows with WSL2 running Ubuntu 22 LTS). The message is as follows:
I have already got the auth token from Azure using
azure-cli
'saz login
(although algo didn't guide me through that either, and I think it should have, but that would be the topic of another issue).To Reproduce
Steps to reproduce the behavior:
virtualenv
and more.azure-cli
. Receive auth token from Azure withaz login
../algo
.TASK [cloud-azure : Create AlgoVPN Server]
, the provided in the code block above in the description is generated.Expected behavior
The installation should continue.
Additional context
Full log
This is the whole output of
./algo
. There is another one from./algo -vvv
beneath it.The output of
./algo -vvv
, but only the part where the error is raised (the rest is too long for me to find and eliminate sensitive bits):