()
| 878 | } |
| 879 | |
| 880 | func (d *Driver) validate() error { |
| 881 | // delete driver status file if already present |
| 882 | err := deleteStatusFile(outputDirFlag + "/" + driverStatusFile) |
| 883 | if err != nil { |
| 884 | return err |
| 885 | } |
| 886 | |
| 887 | driverInfo, err := d.runValidation(false) |
| 888 | if err != nil { |
| 889 | log.Errorf("driver is not ready: %v", err) |
| 890 | return err |
| 891 | } |
| 892 | |
| 893 | err = createDevCharSymlinks(driverInfo, disableDevCharSymlinkCreation) |
| 894 | if err != nil { |
| 895 | msg := strings.Join([]string{ |
| 896 | "Failed to create symlinks under /dev/char that point to all possible NVIDIA character devices.", |
| 897 | "The existence of these symlinks is required to address the following bug:", |
| 898 | "", |
| 899 | " https://github.com/NVIDIA/gpu-operator/issues/430", |
| 900 | "", |
| 901 | "This bug impacts container runtimes configured with systemd cgroup management enabled.", |
| 902 | "To disable the symlink creation, set the following envvar in ClusterPolicy:", |
| 903 | "", |
| 904 | " validator:", |
| 905 | " driver:", |
| 906 | " env:", |
| 907 | " - name: DISABLE_DEV_CHAR_SYMLINK_CREATION", |
| 908 | " value: \"true\""}, "\n") |
| 909 | return fmt.Errorf("%w\n\n%s", err, msg) |
| 910 | } |
| 911 | |
| 912 | return d.createStatusFile(driverInfo) |
| 913 | } |
| 914 | |
| 915 | func (d *Driver) createStatusFile(driverInfo driverInfo) error { |
| 916 | statusFileContent := strings.Join([]string{ |
no test coverage detected