-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Hi there
Since Kernel 5.6 there is support for time namespaces using CLONE_NEWTIME (see setns(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 the CLONE_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)