Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error "No containers are available to restart" occurs when restarting a stopped container in the ACI context environment #2602

Closed
v-ruizh opened this issue Jan 7, 2021 · 3 comments · Fixed by #2605 or #2634
Labels
Milestone

Comments

@v-ruizh
Copy link

v-ruizh commented Jan 7, 2021

OS: Windows 10
Build Version: 20210106.8

Repro Steps:

  1. Right click one ACR image -> Select "Deploy Image to Azure Container Instances..." and create one new ACI.
  2. Stop the container in the ACI context environment.
  3. F1 -> Docker Container: Restart.

Expect:
Wizard to the container option.

Actual:
An error "No containers are available to restart" occurs.
image

More Info:
This issue does not reproduce in default context environment.

@v-ruizh v-ruizh added the AT-CTI label Jan 7, 2021
@bwateratmsft bwateratmsft added this to the 1.9.1 milestone Jan 7, 2021
@bwateratmsft
Copy link
Contributor

bwateratmsft commented Jan 7, 2021

Found the root cause. ACI added some new state strings, "Node Pending" (starting), and "Node Stopped" (stopped). Both should be treated as stopped states (for purposes of the icon), but "Node Stopped" should also show the "Start" action.

@bwateratmsft
Copy link
Contributor

I've found that the container does not always transition to "Node Stopped". Eventually it always ends up at "Terminated", but sometimes it seems to skip "Node Stopped". So far I have not seen it skip "Node Pending", but it's probably safe to assume that is a possibility.

@bwateratmsft
Copy link
Contributor

There's one remaining issue. For non-ACI contexts, we allow the user to run the Restart command from the palette, and show stopped containers (however, in context menu, only the Start command is shown). However, for ACI contexts, this behavior is not mirrored. I think the fix is just to allow the "terminated" state in the multi-select regex for restartContainer.

@bwateratmsft bwateratmsft reopened this Jan 15, 2021
@bwateratmsft bwateratmsft modified the milestones: 1.9.1, 1.10.0 Jan 15, 2021
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants