Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Rover login command fails when running in VS Code container #97

Open
paolosalvatori opened this issue Sep 2, 2021 · 3 comments
Open
Labels
bug Something isn't working upstream_dependency

Comments

@paolosalvatori
Copy link

Describe the bug
The rover login command fails when trying to login after following the instructions at Getting started with Azure Cloud Adoption Framework landing zones for Terraform

vscode@f912543adaf1:/tf/caf$ rover login

  /$$$$$$   /$$$$$$  /$$$$$$$$       /$$$$$$$
 /$$__  $$ /$$__  $$| $$_____/      | $$__  $$
| $$  \__/| $$  \ $$| $$            | $$  \ $$  /$$$$$$  /$$    /$$/$$$$$$   /$$$$$$
| $$      | $$$$$$$$| $$$$$         | $$$$$$$/ /$$__  $$|  $$  /$$/$$__  $$ /$$__  $$
| $$      | $$__  $$| $$__/         | $$__  $$| $$  \ $$ \  $$/$$/ $$$$$$$$| $$  \__/
| $$    $$| $$  | $$| $$            | $$  \ $$| $$  | $$  \  $$$/| $$_____/| $$
|  $$$$$$/| $$  | $$| $$            | $$  | $$|  $$$$$$/   \  $/ |  $$$$$$$| $$
 \______/ |__/  |__/|__/            |__/  |__/ \______/     \_/   \_______/|__/


              version: aztfmod/rover:1.0.1-2106.3012

@calling verify_azure_session

Checking existing Azure session
ERROR: Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/devicecode?api-version=1.0 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb6d23e4e50>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))
Error on or near line 206; exiting with status 1
Error on or near line 206; exiting with status 1

@calling clean_up_variables
cleanup variables
clean_up backend_files

Even az login command fails, ore better, I can successfully login via browser, but the command fails with the following error:

vscode@f912543adaf1:/tf/caf$ az login 
The default web browser has been opened at https://login.microsoftonline.com/common/oauth2/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc94e5c0130>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))

Also, note that the folder name shown close to the green button in VS Code lower bar is not Azure CAF rover, but CAF Starter Terraform landing zones.

To Reproduce
1.I cloned the repo as shown in the instructions using git clone https://github.com/Azure/caf-terraform-landingzones-starter.git
2.Opened the folder in VS Code
3.Clicked the green button and selected Open folder in container...
4.Run rover login in the prompt command

Expected behavior
I would expect to successfully login.

Screenshots
See the text above.

Configuration (please complete the following information):

  • OS and version: Windows 10
  • Version of the rover: version: aztfmod/rover:1.0.1-2106.3012
  • Version of the landing zone: lastest
@paolosalvatori paolosalvatori changed the title rover login command fails when running in VS Code container Rover login command fails when running in VS Code container Sep 2, 2021
@LaurentLesle
Copy link
Contributor

Hi @paolosalvatori we also noticed this issue with latest update of Docker Desktop on windows. See the issue here - Azure/caf-terraform-landingzones#250

From now you have to downgrade docker desktop to 3.5.2.

@paolosalvatori
Copy link
Author

Let's keep the issue open for a while just to keep track of any progress. When the bug gets fixed, and the rover works as expected with Docker DE 4.0.0 you can write here and close the issue 😃

@LaurentLesle LaurentLesle added bug Something isn't working upstream_dependency labels Sep 22, 2021
@jasonpanggit
Copy link

Able to resolve it by exiting vscode. Then stopping and deleting the container in Docker Desktop (v4.01) and open vscode to let it recreate again. Able to do rover login and also logout and login again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream_dependency
Projects
None yet
Development

No branches or pull requests

3 participants