Non UTF-8 boot log crashes decoder
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 64
Description
## Describe the bug
**Command Name**
`az vm boot-diagnostics get-boot-log`
**Errors:**
```
'utf-8' codec can't decode byte 0xff in position 20023: invalid start byte
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
...
storage/v2018_11_09/blob/baseblobservice.py, ln 2166, in get_blob_to_stream
stream.write(blob.content)
cli/command_modules/vm/custom.py, ln 1438, in write
content = str_or_bytes.decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 20023: invalid start byte
```
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Deploy URN `audiocodes:mediantsessionbordercontroller:mediantvirtualsbcazure:latest`
- `az vm boot-diagnostics get-boot-log -n {} -g {}`
## Expected Behavior
Boot log to be downloaded.
## Environment Summary
```
Linux-4.19.128-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB
azure-cli 2.13.0
Extensions:
azure-devops 0.18.0
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.