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

No error shown when workspace fails to start due to supervisor error #14293

Closed
WVerlaek opened this issue Oct 31, 2022 · 17 comments · Fixed by #14650 or #15602
Closed

No error shown when workspace fails to start due to supervisor error #14293

WVerlaek opened this issue Oct 31, 2022 · 17 comments · Fixed by #14650 or #15602
Assignees
Labels
team: IDE type: bug Something isn't working

Comments

@WVerlaek
Copy link
Member

WVerlaek commented Oct 31, 2022

Bug description

When a workspace fails to start due to supervisor exiting with an error (e.g. failing to setup the gitpod user in a custom image), the workspace immediately transitions to stopping and stopped, but doesn't show any error to the user:

image

Related: #12978 (comment) (has some more context as well)

Steps to reproduce

  • Start workspace with a custom base image that doesn't have the gitpod user (e.g. hashicorp/terraform:1.2.9)
  • supervisor fails to add the gitpod user and exits
  • Workspace transitions to stopping -> stopped states without showing an error

Workspace affected

No response

Expected behavior

An error is shown to users if a workspace fails to start due to supervisor exiting with an error. If the error is for a missing gitpod user, the error message sent to the user should include a link to our docs on custom base images.

Example repository

No response

Anything else?

No response

@kylos101
Copy link
Contributor

kylos101 commented Nov 1, 2022

@akosyakov would you like Team IDE to own this one,or, is it one of those scenarios where maybe you'd prefer Team Workspace contribute to Supervisor? cc: @Furisto @utam0k @WVerlaek

@akosyakov
Copy link
Member

@kylos101 if it is urgent for the workspace team because of PVC go ahead and create a PR 🙏

@kylos101
Copy link
Contributor

kylos101 commented Nov 2, 2022

👋 @akosyakov not urgent because of PVC (even when using object storage, the user gets an error message that is not helpful, so both failure modes are roughly the same). If I were to ask IDE team to do, could you estimate when you may be able to ingest as part of groundwork? That will help us know if we should do or not.

@kylos101
Copy link
Contributor

kylos101 commented Nov 2, 2022

Updated expected behavior to include a link if the gitpod user is missing.

@akosyakov
Copy link
Member

We will consider it next Monday.

@kylos101
Copy link
Contributor

kylos101 commented Nov 4, 2022

For posterity, @WVerlaek is going to raise a PR, reference.

@WVerlaek
Copy link
Member Author

WVerlaek commented Nov 4, 2022

For posterity, @WVerlaek is going to raise a PR, #12978 (comment).

Note that PR will solve a different issue that what's described here (it will fix a small bug in adduser for busybox-type images)

@kylos101
Copy link
Contributor

kylos101 commented Nov 4, 2022

Doh! Thank you, @WVerlaek .

Does this mean we still need help from IDE team? I ask because it's still in their inbox, and @akosyakov shared they were going to pick it up next week.

@WVerlaek
Copy link
Member Author

WVerlaek commented Nov 4, 2022

@kylos101 yes if possible 🙏

Just raised the adduser fix here: #14438

@kylos101
Copy link
Contributor

kylos101 commented Nov 4, 2022

Perfect, thanks for clarifying @WVerlaek ! 💪 @akosyakov please let @WVerlaek know if you bump into any trouble or need help testing.

@jeanp413 jeanp413 moved this to Scheduled in 🚀 IDE Team Nov 7, 2022
Repository owner moved this from Scheduled to Done in 🚀 IDE Team Nov 14, 2022
@kylos101
Copy link
Contributor

Hi @mustard-mh , I tested #14650 with https://gitlab.com/kylos101/prebuild-experiment/-/blob/kylos101/customer-image/.gitpod.yml#L1, which should cause an error due to the gitpod user missing, but, the error message only mentions the exit status is 1. I was expecting a better error message to the user, for example, a message sharing that the gitpod user is missing. In other words, an exit status of 1 does not tell me what to fix so that my workspace can start.

Is that possible to change? Here is what I see now when trying to start a workspace from this branch:

image

@WVerlaek what sort of error message were you expecting to see? The workspace I tested with is https://kylos101-prebuildexperi-3ui0u5wx2ib.ws-us75.gitpod.io/.

@kylos101
Copy link
Contributor

kylos101 commented Nov 14, 2022

cc: @akosyakov reopened, and added back to inbox

@kylos101 kylos101 removed the status in 🚀 IDE Team Nov 14, 2022
@kylos101 kylos101 reopened this Nov 14, 2022
@WVerlaek
Copy link
Member Author

@kylos101 in that specific example (a terraform workspace image) the bug in #14438 gets triggered which fails to add the gitpod user, if that issue gets fixed it shouldn't error on a missing gitpod user anymore. supervisor will still fail to start the terraform-based workspace though once fixed, as it's missing some other required tools as well (it's an alpine image, which was mentioned in the issue that we don't really support)

@WVerlaek
Copy link
Member Author

Maybe on workspace startup failure, if it's an alpine-based image we can somehow show that it's not something we support currently?

@kylos101
Copy link
Contributor

kylos101 commented Nov 15, 2022

Maybe on workspace startup failure, if it's an alpine-based image we can somehow show that it's not something we support currently?

@WVerlaek Can you create that as a separate issue for supervisor and inbox to IDE team for consideration?

@kylos101
Copy link
Contributor

@kylos101 in that specific example (a terraform workspace image) the bug in #14438 gets triggered which fails to add the gitpod user, if that issue gets fixed it shouldn't error on a missing gitpod user anymore. supervisor will still fail to start the terraform-based workspace though once fixed, as it's missing some other required tools as well (it's an alpine image, which was mentioned in the issue that we don't really support)

@WVerlaek whoops, thank you! For this issue, could you update the description? For example, Steps to recreate should avoid using an alpine image as the base image.

@mustard-mh what happens if you try using a custom image that is not alpine based? For example, is the error exit status 1, or does the error message indicate something else - like the gitpod user is missing?

@mustard-mh
Copy link
Contributor

@mustard-mh what happens if you try using a custom image that is not alpine based? For example, is the error exit status 1, or does the error message indicate something else - like the gitpod user is missing?

If you use custom image that is not alpine based, it will success, because even you don't have gitpod user, supervisor will create it, but it still can failed by some reason, e.g missing useradd or adduser

We will continue improve this error message in following PR

@jeanp413 jeanp413 removed this from 🚀 IDE Team Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: IDE type: bug Something isn't working
Projects
Status: Done
5 participants