Azure / Azure/azure-cli

az vm boot-diagnostics get-boot-log fails, 'RetrieveBootDiagnosticsDataResult' object has no attribute 'done'

Open
#17,892 1 comment 0 reactions 2 assignees Claimed by @zhoxing-ms View on GitHub
act-observability-squad Compute Error Handling feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

AZ CLI is set up and works well, but the operation "az vm boot-diagnostics get-boot-log" fails on all our VMs with the following error message / stacktrace.

**Command Name**
`az vm boot-diagnostics get-boot-log`

**Errors:**
```
'RetrieveBootDiagnosticsDataResult' object has no attribute 'done'
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 231, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 657, in execute
raise ex
cli/core/commands/__init__.py, ln 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 691, in _run_job
result = cmd_copy(params)
cli/core/commands/__init__.py, ln 328, in __call__
return self.handler(*args, **kwargs)
azure/cli/core/__init__.py, ln 807, in default_command_handler
return op(**command_args)
cli/command_modules/vm/custom.py, ln 1553, in get_boot_log
uris = LongRunningOperation(cmd.cli_ctx)(poller)
cli/core/commands/__init__.py, ln 958, in __call__
while not poller.done():
AttributeError: 'RetrieveBootDiagnosticsDataResult' object has no attribute 'done'
```

## To Reproduce:

az configure -l
Name Source Value
------------ ------------------------------ ------------------------------------
location /home/nfs/abusch/.azure/config westeurope
group /home/nfs/abusch/.azure/config (correct name of our resource group)
subscription /home/nfs/abusch/.azure/config (correct UUID of our subscription)

az vm boot-diagnostics get-boot-log --name (any VM name in the configured resource group)

The command fails and produces the stack trace. We have tried several VMs (all of them working and running normally) and could not get the boot log from any of them.

## Expected Behavior

The command succeeds and prints the boot / serial log of the specified VM.

## Environment Summary
```
Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-redhat-7.9-Maipo
Python 3.6.8
Installer: RPM

azure-cli 2.22.1

```
## Additional Context

I can get the boot log via the Azure portal without problems.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.