Skip to content

Support time namespaces #2345

@djboris9

Description

@djboris9

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions