Skip to content

runc version 0.0.8 does not comply with version 0.3.0 of the spec for the "devices" block #566

@sajones

Description

@sajones

Per https://github.com/opencontainers/specs/blob/master/config-linux.md#devices I should be able to specify "type" with the same letter codes as mknod, however runc still expects to parse an integer for that field.

According to the spec version 0.3.0 this definition should work:

"devices": [
    {
        "path": "/dev/sde",
        "type": "b",
        "major": 8,
        "minor": 64,
        "fileMode": 660,
        "uid": 0,
        "gid": 6
    }
]

However when I try to start a container I get this error:
json: cannot unmarshal string into Go value of type int32

This definition does work:

"devices": [
    {
        "path": "/dev/sde",
        "major": 8,
        "minor": 64,
        "type": 98,
        "uid": 0,
        "gid": 6,
        "fileMode": 660,
        "permissions": "rwm"
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions