Skip to content

Rootless config generates invalid mount for /etc/resolv.conf #294

@rneilson

Description

@rneilson

Using umoci unpack --rootless (or umoci raw config --rootless), an extra mount is generated for /etc/resolv.conf, with "type": "none" 1. This causes runc to parse the mount with the default (directory) behavior 2, trying to create the destination as a directory instead of a file 3.

TBH, not sure if this is a runtime spec problem, a runc mount parsing problem, or a umoci config generation problem, but I'm guessing it's most easily fixed here.

To reproduce:

> skopeo copy docker://busybox:latest oci:busybox:latest
> umoci raw unpack --rootless --image busybox rootfs
> umoci raw config --image=busybox --rootless --rootfs=rootfs config.json
> runc run busybox
container_linux.go:344: starting container process caused "process_linux.go:424: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/resolv.conf\\\" to rootfs \\\"/data/contained/temp/rootfs\\\" at \\\"/data/contained/temp/rootfs/etc/resolv.conf\\\" caused \\\"not a directory\\\"\""

umoci --version

umoci version 0.4.4

runc --version

runc version 1.0.0-rc6
spec: 1.0.1-dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions