mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-05 16:27:05 +00:00
source/custom: do not return on rule errors
Skip to the next rule instead of returning immediately on rule errors. For instance, if the static rules failed, user provided rules would never be processed. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
8b156d49fc
commit
d1cce3ba29
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package custom
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"sigs.k8s.io/node-feature-discovery/source"
|
||||
|
@ -76,7 +75,8 @@ func (s Source) Discover() (source.Features, error) {
|
|||
for _, customFeature := range allFeatureConfig {
|
||||
featureExist, err := s.discoverFeature(customFeature)
|
||||
if err != nil {
|
||||
return features, fmt.Errorf("failed to discover feature: %s. %s", customFeature.Name, err.Error())
|
||||
log.Printf("ERROR: failed to discover feature: %q: %s", customFeature.Name, err.Error())
|
||||
continue
|
||||
}
|
||||
if featureExist {
|
||||
features[customFeature.Name] = true
|
||||
|
|
Loading…
Add table
Reference in a new issue