Skip to content

NodeFeatureGroup cr in other namespace not update status #2385

@Xunli-Yang

Description

@Xunli-Yang

What happened:
The node-feature-discovery deploys in default namespace. While I create a NodeFeatureGroup cr in other namespace, the status of NodeFeatureGroup cr will not update. The status of NodeFeatureGroup cr in nfd-master's namespace can update normally.
What you expected to happen:
The status of NodeFeatureGroup cr in all namespaces can update normally.
How to reproduce it (as minimally and precisely as possible):
Create a NodeFeatureGroup cr in the namespace expect nfd-master's namespace.
Anything else we need to know?:
I found that the update will only check the NodeFeatureGroup in nfd-master's namespace.

func (u *updaterPool) processNodeFeatureGroupUpdateRequest(cli nfdclientset.Interface) bool {
	nfgName, quit := u.nfgQueue.Get()
	if quit {
		return false
	}
	defer u.nfgQueue.Done(nfgName)

	nodeFeatureGroupUpdateRequests.Inc()

	// Check if NodeFeatureGroup exists
	var nfg *nfdv1alpha1.NodeFeatureGroup
	var err error
	if nfg, err = getNodeFeatureGroup(cli, u.nfdMaster.namespace, nfgName); apierrors.IsNotFound(err) {
		klog.InfoS("NodeFeatureGroup not found, skip update", "NodeFeatureGroupName", nfgName)
	} else if err := u.nfdMaster.nfdAPIUpdateNodeFeatureGroup(u.nfdMaster.nfdClient, nfg); err != nil {
		if n := u.nfgQueue.NumRequeues(nfgName); n < 15 {
			klog.InfoS("retrying NodeFeatureGroup update", "nodeFeatureGroup", klog.KObj(nfg), "lastError", err)
		} else {
			klog.ErrorS(err, "failed to update NodeFeatureGroup, queueing for retry", "nodeFeatureGroup", klog.KObj(nfg), "lastError", err, "numRetries", n)
		}
		u.nfgQueue.AddRateLimited(nfgName)
		return true
	}

	u.nfgQueue.Forget(nfgName)
	return true
}

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions