Azure/aks-periscope

aks-periscope.yaml not included in aks-preview extension

Closed this issue · 4 comments

Describe the bug
Based on the README provided, the expected usage of this tool is via the Azure CLI by installing the aks-preview extension and running az aks kollect. However when running this command the aks-periscope.yaml file is not found to be included with that extension. I have seen in your notes of previous commits that there was some plan on changing the behavior of how this tool is consumed but this has not been reflected in the provided readme

To Reproduce

  1. run 'az extension add --name aks-preview'
  2. run 'az aks kollect -g -n --storage-account
  3. Receive following error & traceback:

The command failed with an unexpected error. Here is the traceback:
[Errno 2] No such file or directory: 'C:\Users\jamesonhearn\.azure\cliextensions\aks-preview\azext_aks_preview\deploymentyaml\aks-periscope.yaml'
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, in call
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\jamesonhearn.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 1430, in aks_kollect
deployment_yaml = _read_periscope_yaml()
File "C:\Users\jamesonhearn.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 1520, in _read_periscope_yaml
yaml_file = open(periscope_yaml_file, "r")
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\jamesonhearn\.azure\cliextensions\aks-preview\azext_aks_preview\deploymentyaml\aks-periscope.yaml'

Expected behavior
Expect logging to be successfully run against the provided cluster and storage in the specified storage account

Screenshots
MicrosoftTeams-image

5b6566c4151e4a671ac72976ef3841ef

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 21H2

Additional context
CLI is latest version and aks-preview extension was uninstalled and reinstalled

Thank you so much for reporting this @jamesonhearn, can you please share what version of az cli and extension you have installed please? (az version command can get you that output).

This is possibly az-cli bug and has to do the bundling of az extension via az-cli before I transfer this to cli I will do a quick gentle ping to @FumingZhang just for some thoughts for missing deployment file in the az-cli location. Kind regards ❤️🙏☕️ (Fix to this is probably not needed against this repo - but lets keep this as it is and glad you have opened this here) thank-you.

💡 Just for more idea and help: For further help please see this @FumingZhang - https://github.com/Azure/azure-cli-extensions/tree/main/src/aks-preview/azext_aks_preview (Contains deployment folder). But if you ls on latest aks-preview in local install - this doesn't exist.

💡 There are few other ways I could help unblock you @jamesonhearn, let me know if you need hand for it. (other ways could be recommendations like directly using aks-persicope deployment file via kubectl or a vscode extension).

Thanks for the quick response @Tatsinnit Below is the output of az version:

{
  "azure-cli": "2.32.0",
  "azure-cli-core": "2.32.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "aks-preview": "0.5.51"
  }
} 

I have been able to temporarily workaround this issue by manually creating the deploymentyaml folder and storing the .yaml inside.

Thanks for the quick response @Tatsinnit Below is the output of az version:

{
  "azure-cli": "2.32.0",
  "azure-cli-core": "2.32.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "aks-preview": "0.5.51"
  }
} 

I have been able to temporarily workaround this issue by manually creating the deploymentyaml folder and storing the .yaml inside.

Oh Nice 👍 (glad that worked) and this kind of proof that the deployment directory is missing from latest deployment Of az-extension. @FumingZhang please feel free to transfer this or whatever works, I don’t have permission to transfer this to “az-cli” repo. 🙏☕️ Thank you so much to you both.

💡 Thank you @FumingZhang for the tracking item, I will close this for now. ☕️🙏