containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

Ignore sysfs missing uevent file error, ignore "/dev/vfio/vfio" #428

Closed amshinde closed 7 years ago

amshinde commented 7 years ago

Ability to obtain device names from major-minor number of device was added in kernel 2.6.27 version: torvalds/linux@e105b8b

But for certain devices like /dev/cuse, /dev/fuse, this sysfs interface may not exist. This may also depend on the kernel version used.

We are primarily using this sysfs interface to obtain device name in case the renamed device name was passed to the runtime.

To accomodate these devices, which are passed by docker by default for priveleged/non-priveleged containers, we ignore the missing file error for /sys/dev files and assume device name passed in the oci spec file for such devices is not the renamed device name.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.04%) to 65.197% when pulling 1906a3e0203e9cf05537d267c8de38b34ee5683e on amshinde:ignore-sysfs-missing-uevent-file into 9bdb14850d74eb6ead411254f39e481d911e84db on containers:master.

sameo commented 7 years ago

@amshinde Could you please copy the first commit message into that PR description?

sboeuf commented 7 years ago

@amshinde please add a description to the PR.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.08%) to 65.468% when pulling 9403d91fcf7198393e69809cae6e11b874198c36 on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

sboeuf commented 7 years ago

LGTM

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 65.428% when pulling 5002cae8fc0e89fe031bb1b01d266eba01a23ec7 on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 65.435% when pulling c323b8394e7a863a274cc4ec09692555b58e27aa on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 65.435% when pulling 6eb81de83e438fa97de8a5cb0cf875ed200da1de on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 65.435% when pulling 6eb81de83e438fa97de8a5cb0cf875ed200da1de on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 65.435% when pulling 6eb81de83e438fa97de8a5cb0cf875ed200da1de on amshinde:ignore-sysfs-missing-uevent-file into bad7e7437b173ab22f858d0f43f85a4c201af604 on containers:master.

amshinde commented 7 years ago

@sboeuf Can you merge this ?

sboeuf commented 7 years ago

All comments have been addressed. Let's merge this and we should continue to track clearcontainers/runtime#746 since we should also implement something in the runtime itself.