Azure / Azure/azure-cli

Container crash frequently

Open
#27,259 4 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign bug Container Instances customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Some time azure container instance crashes frequently and constanstly during the app startup below is the logs
`(count: 3) (last timestamp: 2023-08-25 05:26:51+00:00) Started container
(count: 1) (last timestamp: 2023-08-25 05:26:54+00:00) Successfully pulled image "xyz.azurecr.io/eventapi@sha256{hidden id}"
(count: 4) (last timestamp: 2023-08-25 05:26:59+00:00) Killing container with id {hidden id} .
(count: 21) (last timestamp: 2023-08-25 06:09:24+00:00) Killing container with id {hidden id}
(count: 22) (last timestamp: 2023-08-25 06:09:55+00:00) Started container

Start streaming logs:

Exception in thread Thread-1 (_stream_container_events_and_logs):
Traceback (most recent call last):
File "threading.py", line 1016, in _bootstrap_inner
File "threading.py", line 953, in run
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 912, in _stream_container_events_and_logs
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 866, in _stream_logs
AttributeError: 'NoneType' object has no attribute 'split'`

### Related command

az container start

### Errors

Some time azure container instance crashes frequently and constanstly during the app startup below is the logs
`(count: 3) (last timestamp: 2023-08-25 05:26:51+00:00) Started container
(count: 1) (last timestamp: 2023-08-25 05:26:54+00:00) Successfully pulled image "xyz.azurecr.io/eventapi@sha256{hidden id}"
(count: 4) (last timestamp: 2023-08-25 05:26:59+00:00) Killing container with id {hidden id} .
(count: 21) (last timestamp: 2023-08-25 06:09:24+00:00) Killing container with id {hidden id}
(count: 22) (last timestamp: 2023-08-25 06:09:55+00:00) Started container

Start streaming logs:

Exception in thread Thread-1 (_stream_container_events_and_logs):
Traceback (most recent call last):
File "threading.py", line 1016, in _bootstrap_inner
File "threading.py", line 953, in run
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 912, in _stream_container_events_and_logs
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 866, in _stream_logs
AttributeError: 'NoneType' object has no attribute 'split'`

### Issue script & Debug output

Some time azure container instance crashes frequently and constanstly during the app startup below is the logs
`(count: 3) (last timestamp: 2023-08-25 05:26:51+00:00) Started container
(count: 1) (last timestamp: 2023-08-25 05:26:54+00:00) Successfully pulled image "xyz.azurecr.io/eventapi@sha256{hidden id}"
(count: 4) (last timestamp: 2023-08-25 05:26:59+00:00) Killing container with id {hidden id} .
(count: 21) (last timestamp: 2023-08-25 06:09:24+00:00) Killing container with id {hidden id}
(count: 22) (last timestamp: 2023-08-25 06:09:55+00:00) Started container

Start streaming logs:

Exception in thread Thread-1 (_stream_container_events_and_logs):
Traceback (most recent call last):
File "threading.py", line 1016, in _bootstrap_inner
File "threading.py", line 953, in run
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 912, in _stream_container_events_and_logs
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 866, in _stream_logs
AttributeError: 'NoneType' object has no attribute 'split'`

### Expected behavior

it should start the application and log stream

### Environment Summary

azure-cli 2.51.0

core 2.51.0
telemetry 1.1.0

Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\kishan\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### Additional context

_No response_

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.