MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / validate

Method validate

cmd/nvidia-validator/main.go:880–913  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

878}
879
880func (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
915func (d *Driver) createStatusFile(driverInfo driverInfo) error {
916 statusFileContent := strings.Join([]string{

Callers 1

validateComponentFunction · 0.95

Calls 4

runValidationMethod · 0.95
createStatusFileMethod · 0.95
deleteStatusFileFunction · 0.85
createDevCharSymlinksFunction · 0.85

Tested by

no test coverage detected