-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support time namespaces #2345
Comments
runc should not support timens directly, this feature is aimed mostly for stuff like checkpoint/restore (so that the system time won't jump forward in the restored container). Maybe @avagin can chime in, too. Feel free to discuss it further, but I'm closing this for now |
I think runc can support timens directly. Having different clocks across containers would be very useful for Jepsen(-ish) testing. |
I agree that we should at least have support for it, though the only annoyance is that we'd need to have a different configuration mechanism for In any case, this issue should be an issue/PR against the runtime-spec. |
FWIW, there's an initial PR on the runtime-spec now: (edited for new PR link) |
|
Hi there
Since Kernel 5.6 there is support for time namespaces using
CLONE_NEWTIME
(seesetns(2)
).Support for it in
runc
would allow people to have different times in containers, which is useful for testing of time based services/jobs.Currently we are doing it with libfaketime but the software which is being tested needs to be compatible with it.
It looks like
golang.org/x/sys/unix
already supports theCLONE_NEWTIME
argument.I've opened this issue to track it. If I get some time I will try to implement it and open a pull request.
Boris
P.S. The challenge seams to be that as soon as the first child is spawned after the unshare, the time offsets cannot be changed. An example is shown in time_namespaces(7)
The text was updated successfully, but these errors were encountered: