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.
Description
There is a validation difference between youki and runc.
For example, if
hostnameis 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
Then run the container with youki and runc.
Expected Behavior
youki should return an error, matching runc’s behavior, when hostname is specified without an UTS namespace.