azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az aks use-dev-spaces always request az login

Open francofs opened this issue 7 years ago • 1 comments

Describe the bug I am following the following article to setup an debug an AKS cluster through VS Code: https://docs.microsoft.com/en-us/azure/dev-spaces/quickstart-nodejs

Follow every step until: az aks use-dev-spaces -g $rg -n $aks

When I run this command I get:

Run 'az login' to login to Azure and try again.

No matter how many times I try to login, after running the command I get logged out of azure and have to login again to do anything else.

To Reproduce Just follow the tutorial: https://docs.microsoft.com/en-us/azure/dev-spaces/quickstart-nodejs

Azure-CLI version: azure-cli (2.0.49) Dev-Spaces version: dev-spaces-preview (0.1.6)

Expected behavior Ability to use dev-spaces-preview extension and complete the tutorial.

Environment summary

**Azure Location**
WestEurope

**OS**
Windows 10 Pro (updated) 

**PowerShell:**
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17134  407

**Azure-CLI:**
azure-cli (2.0.49)

acr (2.1.7)
acs (2.3.9)
advisor (0.6.0)
ams (0.2.4)
appservice (0.2.5)
backup (1.2.1)
batch (3.4.1)
batchai (0.4.4)
billing (0.2.0)
botservice (0.1.1)
cdn (0.2.0)
cloud (2.1.0)
cognitiveservices (0.2.3)
command-modules-nspkg (2.0.2)
configure (2.0.18)
consumption (0.4.0)
container (0.3.7)
core (2.0.49)
cosmosdb (0.2.2)
dla (0.2.3)
dls (0.1.4)
dms (0.1.1)
eventgrid (0.2.0)
eventhubs (0.3.0)
extension (0.2.2)
feedback (2.1.4)
find (0.2.12)
hdinsight (0.1.0)
interactive (0.3.31)
iot (0.3.3)
iotcentral (0.1.3)
keyvault (2.2.5)
lab (0.1.2)
maps (0.3.2)
monitor (0.2.5)
network (2.2.7)
nspkg (3.0.3)
policyinsights (0.1.0)
profile (2.1.1)
rdbms (0.3.2)
redis (0.3.2)
relay (0.1.2)
reservations (0.4.0)
resource (2.1.5)
role (2.1.8)
search (0.1.1)
servicebus (0.3.1)
servicefabric (0.1.6)
signalr (1.0.0)
sql (2.1.5)
storage (2.2.3)
telemetry (1.0.0)
vm (2.2.6)

Extensions:
dev-spaces-preview (0.1.6)

Additional context Also tried updating Azure-CLI from 2.0.49 to 2.0.52, same behavior. I do have more than one Azure Subscription under my user. But I can create AKS through my default subscription.

with --debug and --verbose flags:

Command arguments: ['aks', 'use-dev-spaces', '--verbose', '--debug', '--output', 'table', '--name', 'AKS-PoC', '--resource-group', 'Azure-AKS-PoC']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03B8F858>, <function OutputProducer.on_global_arguments at 0x03A0A6A8>, <function CLIQuery.on_global_arguments at 0x03B10CD8>]
Event: CommandInvoker.OnPreCommandTableCreate []
Installed command modules ['acr', 'acs', 'advisor', 'ams', 'appservice', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'lab', 'maps', 'monitor', 'network', 'policyinsights', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'servicebus', 'servicefabric', 'signalr', 'sql', 'storage', 'vm']
Loaded module 'acr' in 0.005 seconds.
Loaded module 'acs' in 0.004 seconds.
Loaded module 'advisor' in 0.002 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'ams' in 0.007 seconds.
Loaded module 'appservice' in 0.008 seconds.
Loaded module 'backup' in 0.004 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'batch' in 0.011 seconds.
Loaded module 'batchai' in 0.004 seconds.
Loaded module 'billing' in 0.002 seconds.
Loaded module 'botservice' in 0.004 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'cdn' in 0.005 seconds.
Loaded module 'cloud' in 0.002 seconds.
Loaded module 'cognitiveservices' in 0.002 seconds.
Loaded module 'configure' in 0.002 seconds.
Loaded module 'consumption' in 0.004 seconds.
Loaded module 'container' in 0.003 seconds.
Loaded module 'cosmosdb' in 0.005 seconds.
Loaded module 'dla' in 0.005 seconds.
Loaded module 'dls' in 0.004 seconds.
Loaded module 'dms' in 0.002 seconds.
Loaded module 'eventgrid' in 0.003 seconds.
Loaded module 'eventhubs' in 0.004 seconds.
Loaded module 'extension' in 0.001 seconds.
Loaded module 'feedback' in 0.001 seconds.
Loaded module 'find' in 0.001 seconds.
Loaded module 'hdinsight' in 0.003 seconds.
Loaded module 'interactive' in 0.001 seconds.
Loaded module 'iot' in 0.004 seconds.
Loaded module 'iotcentral' in 0.002 seconds.
Loaded module 'keyvault' in 0.006 seconds.
Loaded module 'lab' in 0.005 seconds.
Loaded module 'maps' in 0.002 seconds.
Loaded module 'monitor' in 0.005 seconds.
Loaded module 'network' in 0.025 seconds.
Loaded module 'policyinsights' in 0.002 seconds.
Loaded module 'profile' in 0.002 seconds.
Loaded module 'rdbms' in 0.007 seconds.
Loaded module 'redis' in 0.003 seconds.
Loaded module 'relay' in 0.004 seconds.
Loaded module 'reservations' in 0.003 seconds.
Loaded module 'resource' in 0.010 seconds.
Loaded module 'role' in 0.005 seconds.
Loaded module 'search' in 0.002 seconds.
Loaded module 'servicebus' in 0.005 seconds.
Loaded module 'servicefabric' in 0.003 seconds.
Loaded module 'signalr' in 0.002 seconds.
Loaded module 'sql' in 0.007 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'storage' in 0.029 seconds.
Loaded module 'vm' in 0.012 seconds.
Loaded all modules in 0.245 seconds. (note: there's always an overhead with the first module loaded)
Extensions directory: 'c://Repos/\.azure\cliextensions'
Found 1 extensions: ['dev-spaces-preview']
Event: CommandLoader.OnLoadCommandTable []
Loaded extension 'dev-spaces-preview' in 0.003 seconds.
Event: CommandInvoker.OnPreCommandTableTruncate []
Event: CommandInvoker.OnPostCommandTableCreate [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x03BDEC00>, <function register_ids_argument.<locals>.add_ids_arguments at 0x03BE7660>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x048A0618>]
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03A0A6F0>, <function CLIQuery.handle_query_parameter at 0x03B10C90>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x03BE76A8>, <function handler at 0x0492E978>]
Getting management service client client_type=ContainerServiceClient
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
Extensions directory: 'c://Repos/\.azure\cliextensions'
Run 'az login' to login to Azure and try again.
Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x03BDEB28>, <function _x509_from_base64_to_hex_transform at 0x03BDEB70>]
Event: CommandInvoker.OnFilterResult []
Event: Cli.PostExecute []
telemetry.save : Save telemetry record of length 2489 in cache
telemetry.check : Negative: The c://Repos/\.azure\telemetry.txt was modified at 2018-12-17 15:57:02.430569, which in less than 600.000000 s

francofs avatar Dec 17 '18 11:12 francofs

Closing pending repro.

seanmck avatar Jul 15 '19 04:07 seanmck