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

Method runValidation

cmd/nvidia-validator/main.go:810–838  ·  view source on GitHub ↗
(silent bool)

Source from the content-addressed store, hash-verified

808}
809
810func (d *Driver) runValidation(silent bool) (driverInfo, error) {
811 err := validateHostDriver(silent)
812 if err == nil {
813 log.Info("Detected a pre-installed driver on the host")
814 return getDriverInfo(true, hostRootFlag, hostRootFlag, "/host"), nil
815 }
816
817 log.Infof("No pre-installed driver detected on the host: %v", err)
818
819 log.Info("Validating containerized driver installation")
820
821 driverManagedByOperator, err := isDriverManagedByOperator(d.ctx)
822 if err != nil {
823 return driverInfo{}, fmt.Errorf("error checking if driver is managed by GPU Operator: %w", err)
824 }
825
826 err = validateDriverContainer(silent, driverManagedByOperator)
827 if err != nil {
828 return driverInfo{}, err
829 }
830
831 if driverManagedByOperator {
832 err = validateAdditionalDriverComponents(d.ctx, driverContainerStatusFilePath)
833 if err != nil {
834 return driverInfo{}, err
835 }
836 }
837 return getDriverInfo(false, hostRootFlag, driverInstallDirFlag, driverInstallDirCtrPathFlag), nil
838}
839
840// validateAdditionalDriverComponents validates additional driver components such as
841// gdrcopy, gds, nvidia-peermem(rdma) if they are enabled.

Callers 2

watchDriverValidationMethod · 0.95
validateMethod · 0.95

Calls 5

validateHostDriverFunction · 0.85
getDriverInfoFunction · 0.85
validateDriverContainerFunction · 0.85

Tested by

no test coverage detected