This repository was archived by the owner on Feb 24, 2020. It is now read-only.
Open
Conversation
This changes the start order of the iomux service so it starts before the app service instead of after (in the diff, "before" and "after" are swapped because this code refers to the app service). If the app has a pre-start hook that fails, iomux will never start and we won't get any logs of the pre-start hook so users will have a hard time debugging. With this change, iomux will be started before the app service starts, capturing all the relevant logs.
It might happen that the iomux service starts before the socket unit is
started. This means that the file specified in ListenFIFO (e.g.
`/rkt/iottymux/0-myapp-container/stage2-stdin`) won't exist and iomux
will fail with something like this:
Listening on stderr socket for 0-myapp-container.
Listening on stdout socket for 0-myapp-container.
iottymux: runtime failure
└─invalid stdin FIFO: open /rkt/iottymux/0-myapp-container/stage2-stdin: no such file or directory
Starting Create /etc/passwd and /etc/group...
Listening on stdin socket for 0-myapp-container.
iomux@0-myapp-container.service: Main process exited, code=exited, status=254/n/a
iomux@0-myapp-container.service: Unit entered failed state.
iomux@0-myapp-container.service: Failed with result 'exit-code'.
This adds a Before=iomux.service dependency to the socket units so they
start before it, making sure the FIFO exists by the time iomux starts.
Member
Author
|
Added another commit. It might happen that the iomux service starts before the socket unit is started. This means that the file specified in ListenFIFO (e.g. So I added a |
alban
approved these changes
Nov 22, 2017
Member
Author
|
Even with this PR, iottymux with pre-start hooks won't work unless #3861 is resolved. In any case, this shouldn't hurt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the start order of the iomux service so it starts before
the app service instead of after (in the diff, "before" and "after" are
swapped because this code refers to the app service).
If the app has a pre-start hook that fails, iomux will never start and
we won't get any logs of the pre-start hook so users will have a hard
time debugging. With this change, iomux will be started before the app
service starts, capturing all the relevant logs.