| Age | Commit message (Collapse) | Author |
|
This change removes inconsistencies collected over time in this package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This enables loopback networking when owning the net namespace.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This avoids a race between returning from syscall and checking the state.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Blocking prevents further wait4 processing causing ops to never receive their signals.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This includes the string for the failing op which helps with troubleshooting.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Due to the special nature of the init process, regular wait calls are unavailable. This change provides infrastructure to access wait4 loop state from Op.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful currently for daemon Op, but could be used for many other things.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is at a point considered to be already "within" the container. Daemons internal to the container can be started here.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This prevents leaking the setup pipe.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This closes them during the adopt wait delay. This also keeps them alive.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Should have done this when relocating this from container. Now is a good time to rename it before v0.3.x.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Init is not very talkative after process start even when verbose. Suspending output here is pointless and does more harm than good.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The SIGTERM signal is delivered in many other cases and can lead to strange behaviour. The unconditional resume of the logger also causes strange behaviour in the cancellation forwarding path. This change also passes through additional signals.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This covers invalid call to Init.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
When using two channels it is possible for the other case to be reached before all pending winfo are consumed, causing incorrect reporting.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These errors are printed with a descriptive message prefixed to them, so it is more readable to expose the underlying errno.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This package is quite useful. This change allows it to be imported without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows referencing FHS pathnames without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This frees all container instances of side effects.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes it possible to optionally omit the identifying verbose message, for when the Op implementation can provide a much more useful message in its case, using information not yet available to the String method.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is much cleaner from both the return statement and the error handling.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This moves repeated Op errors and impossible internal state errors off of msg.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This used to be entirely done via integration tests, with almost no hope of error injection and coverage profile. These tests significantly increase confidence of future work in this area.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows instrumentation of calls from goroutine without relying on finalizers.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This reduces the size of []kexpect in the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Scheduler nondeterminism cannot be accounted for, so do this instead.
There should not be any performance penalty as these calls are optimised out for direct.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The file is very difficult to stub. Pass fd instead as it is the value that is actually useful.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This degrades test performance if not stubbed out.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Check ops early and eliminate duplicate checks.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This helps with the eventual separation of all setup ops into individual files.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is only a nice to have feature as the init process has no additional privileges and the monitor process was never reachable anyway.
Closes #4.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows some LSM setup in the parent.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful for ops that need to be aware of previous instances of themselves.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These literals were missed when the constants were first defined.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This increases readability since this can help disambiguate absolute paths from similarly named path segments.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This code is useful beyond just pd behaviour, and implementing it this way also reduces IPC overhead.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows container processes to exit gracefully.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This change also makes some parts of the test more robust.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is more elegant and allows for much easier extension of the tests. Mountinfo is still serialised however due to libPaths nondeterminism.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is a very silly typo. Luckily has no effect due to an upper layer doing PR_SET_NO_NEW_PRIVS already.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Setting up via /tmp is okay, /proc/self/fd makes a lot more sense though for reasons described in the comment.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows slightly easier use of the vanity url. This also provides some disambiguation between low level containers and hakurei app containers.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|