Write to virt-launcher logs if devices are not present
We don't log if a device which we want to expose is not present on the
node. Change that to make failure diagnosis easier.
@@ -296,8 +296,10 @@ func (dpi *GenericDevicePlugin) healthCheck() error {
if !os.IsNotExist(err) {
return fmt.Errorf("could not stat the device: %v", err)
}
+ logger.Warningf("device '%s' is not present, the device plugin can't expose it.", dpi.devicePath)
dpi.health <- pluginapi.Unhealthy
}
+ logger.Infof("device '%s' is present.", dpi.devicePath)
dirName = filepath.Dir(dpi.socketPath)
err = watcher.Add(dirName)
