Currently wings ignores the output of the install script itself and returns a "successfull" install even if an error happened. Ideally it should check for any errors happening when running the install script and/ or check the exit code of the script.
If possible the error message and the exit code should be reported back to the panel so we can display that on the frontend.
|
sChan, eChan := ip.client.ContainerWait(ctx, r.ID, container.WaitConditionNotRunning) |
|
select { |
|
case err := <-eChan: |
|
// Once the container has stopped running we can mark the install process as being completed. |
|
if serr := s.SyncInstallState(err == nil, reinstall); serr != nil { |
Test case: set the install script of an egg to exit 1, setup a server with this egg and trigger an install. Wings will return the installation as "successfull" while it should be "failed".
Currently wings ignores the output of the install script itself and returns a "successfull" install even if an error happened. Ideally it should check for any errors happening when running the install script and/ or check the exit code of the script.
If possible the error message and the exit code should be reported back to the panel so we can display that on the frontend.
wings/server/install.go
Lines 500 to 503 in b0d18ec
wings/server/install.go
Line 54 in b0d18ec
Test case: set the install script of an egg to
exit 1, setup a server with this egg and trigger an install. Wings will return the installation as "successfull" while it should be "failed".