-
Notifications
You must be signed in to change notification settings - Fork 141
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
Handle errors in specerror #572
Comments
good ! Seems we still need lots of work to do. |
I think this is done
We have 'specConfig' in validate.go.
|
About the 3 |
#576 is checked in. I'll set 'DevicesErrorOnDup' to 'done'. |
Set DefaultStateJSONPattern to done. |
We can add ❌ mark things that are unverifiable. |
@q384566678 and I remove the '[ ]' to list valid tasks only. |
'start' test is done here: #578 |
I have ruled out the following errors that need not be verified: I'll just mark them as ❌ , and if there's any inaccuracy, I can modify it. |
|
'kill' test is mostly done here: #580 ----added on 2.27 |
Mark 'BlkIOWeightOrLeafWeightExist' to DONE since #570 is merged. |
RootOnWindowsRequired is checked in #584 |
Set |
DefaultRuntimeLinuxSymlinks has implemented in runtimetest/main.go . Set it to DONE. |
set PosixProcRlimitsSoftMatchCur and PosixProcRlimitsHardMatchMax to 'done' since #587 is merged |
LinuxProcCapError and PosixProcRlimitsTypeGenError is checked in #591 |
Mark LinuxProcCapError and PosixProcRlimitsTypeGenError to 'done'. |
set AnnotationsKeyIgnoreUnknown, AnnotationsKeyReversedDomain, AnnotationsKeyReservedNS, ValidValues and ExtensibilityIgnoreUnknownProp to done. |
I tried to write a test program for the intelRdt, but I got the following information, so I thought the contents related to the intelRdt were marked as ❌.
|
@q384566678 I read the git history of 'how intelRdt being added to the runtime spec', it seems a quite new feature to the linux kernel. So I think most running servers nowadays will not support this, which means it is hard for us to verify it. I suggest we need help from the original committer @xiaochenshen. PS, |
Current Intel RDT implementation in OCI/runc could handle these two cases: (1) hardware support Intel RDT, (2) hardware doesn't support Intel RDT. For case (1), in my opinion, it is not difficult to find a hardware platform to verify. Intel RDT features are supported from recent generations of Intel Xeon servers. You could find the matrix of Intel RDT features and supported hardware: |
ProcArgsApplyUntilStart is checked in #602 |
mark ProcArgsApplyUntilStar done |
ConfigUpdatesWithoutAffect is checked in #604 |
DevicesMajMinRequired cannot be verified. The default '0' value is also valid. Mark it ❌. |
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSInheritWithoutType, i.e. "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type". See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSInheritWithoutType, i.e. "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type". See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSInheritWithoutType, i.e. "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type". See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
This test is to check for NSInheritWithoutType, i.e. "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type". See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
Set |
Set |
Set |
Because there are still some things that need to be discussed and implemented, it may take a long time, so mark it as |
Set |
`checkNSPathMatchType` checks if the container returns an error when deliberately setting a wrong namespace type. Doing that, it is possible to verify `NSPathMatchTypeError`, i.e. `The runtime MUST generate an error if path is not associated with a namespace of type "type"`. See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
Set |
Set |
`checkNSPathMatchType` checks if the container returns an error when deliberately setting a wrong namespace type. Doing that, it is possible to verify `NSPathMatchTypeError`, i.e. `The runtime MUST generate an error if path is not associated with a namespace of type "type"`. See also opencontainers#572 Signed-off-by: Dongsu Park <[email protected]>
set |
Does the resources here refer to the
I don't understand this very well. I don't have any idea how to implement it. |
For example, if the container joins an existing cgroup, the runtime should not attempt to delete that cgroup when it deletes the container. On the scoping side, I think this is "resources" broadly, not just
Yeah, it's going to be hard to cover this completely, because there are many resources that the runtime could be releasing. I'd just pick one (cgroups?) to start, and we can add others if/when someone requests them. |
@q384566678 |
@wking I know the container will create the cgroup during create process, but I don't know how to join an existing cgroup, can you explain in detail or give me some example? Thanks. |
Set |
There are some declared errors in specerror that have not been called to validate them. Now they are listed below, and we can discuss what needs to be done and what does not.
If there's anything you need to add or remove, you can edit directly.
Bundle
config.json
.Config-linux
Namespace
path
.path
is not associated with a namespace of typetype
.path
is not specified, the runtime MUST create a new container namespace of typetype
.namespaces
array, the container MUST inherit the runtime namespace of that type.User namespace mappings
Devices
major, minor
(int64, REQUIRED unlesstype
isp
) - major, minor numbers for the device.type
,major
andminor
SHOULD NOT be used for multiple devices.Cgroups
cgroupsPath
MUST be either an absolute path or a relative path./
), the runtime MUST take the path to be relative to the cgroups mount point.cgroupsPath
.cgroupsPath
values to be invalid, and MUST generate an error if this is the case.Device whitelist
Block IO
weight
orleafWeight
in a given entry, and MAY specify both.IntelRdt
intelRdt
is set, the runtime MUST write the container process ID to the<container-id>/tasks
file in a mountedresctrl
pseudo-filesystem, using the container ID fromstart
and creating thecontainer-id
directory if necessary.resctrl
pseudo-filesystem is available in the runtime mount namespace, the runtime MUST generate an error.intelRdt
is not set, the runtime MUST NOT manipulate anyresctrl
pseudo-filesystems.l3CacheSchema
is set, runtimes MUST write the value to theschemata
file in the<container-id>
directory discussed inintelRdt
.l3CacheSchema
is not set, runtimes MUST NOT write toschemata
files in anyresctrl
pseudo-filesystems.Config-Windows
HyperV
Config
Root
Mounts
ro
, mounting the filesystem read-only whenro
is given.Process
start
is called. (same with StartWithProcUnsetGenError)consoleSize
ifterminal
isfalse
or unset.POSIX process
rlimits
, agetrlimit(3)
ontype
MUST succeed.rlim.rlim_cur
MUST match the configured value.rlim.rlim_max
MUST match the configured value.Linux Process
oomScoreAdj
is not set, the runtime MUST NOT change the value ofoom_score_adj
.POSIX-platform Hooks
Annotations
com.example.myKey
.org.opencontainers
namespace are reserved and MUST NOT be used by subsequent specifications.Extensibility
Valid values
Runtime-Linux
mounts
.Runtime
State
id
(string, REQUIRED) is the container's ID. This MUST be unique across all containers on this host.Lifecycle
config.json
.config.json
, it MUST generate an error.config.json
after this step MUST NOT affect the container.Errors
Warnings
Operations
Create
config.json
except forprocess
MUST be applied.process.args
MUST NOT be applied until triggered by thestart
operation.Start
start
operation MUST generate an error if it is not provided the container ID.start
a container that is notcreated
MUST have no effect on the container.start
a container that is notcreated
MUST generate an error.start
operation MUST run the user-specified program as specified byprocess
.start
operation MUST generate an error ifprocess
was not set.Kill
kill
operation MUST generate an error if it is not provided the container ID.created
norrunning
MUST generate an error.kill
operation MUST send the specified signal to the container process.created
norrunning
MUST have no effect.Delete
delete
operation MUST generate an error if it is not provided the container ID.delete
a container that is notstopped
MUST have no effect on the container.delete
a container that is notstopped
MUST generate an error.create
step.The text was updated successfully, but these errors were encountered: