Skip to content

Investigate validation differences between youki and runc #3553

@saku3

Description

@saku3

Description

There is a validation difference between youki and runc.

For example, if hostname is specified but the UTS namespace is not configured, youki currently succeeds and the hostname is effectively ignored.

runc explicitly returns an error in this case.

Investigate these kinds of validation differences.

Steps to Reproduce

Create a config.json that specifies hostname but does not include the UTS namespace.

For example:

config.json


{

...

  "hostname": "youki",
  "linux": {
    "namespaces": [
      {
        "type": "pid"
      },
      {
        "type": "ipc"
      },
      {
        "type": "mount"
      },
      {
        "type": "cgroup"
      }
    ]
  }

...

}

Then run the container with youki and runc.

$ youki run container 
# Succeeds but hostname not applyed

$ runc run container
ERRO[0000] runc run failed: unable to set hostname without a private UTS namespace 

Expected Behavior

youki should return an error, matching runc’s behavior, when hostname is specified without an UTS namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions