Why my nfd-topology-updater can't detect topology policies?

45 views
Skip to first unread message

james beck

unread,
May 10, 2022, 12:24:47 PM5/10/22
to kubernetes-sig-node
I met a question that I used helm to install node-feature-discovery-0.11.0.Then nfd-topology-updater creates the CR that says "Topology Policies: None". But I set topologyPolicyName="restricted".And I saw the logs of the kubelet to prove it.So how I deal with it .How my nfd-topology-updater  can detect the topology policies?Or please provide me with a solution to find the reason.Thanks!!!

nfd-master pod logs:

I0510 23:31:34.272718       1 nfd-master.go:423] received labeling request for node "node1"
I0510 23:31:34.277436       1 nfd-master.go:423] received labeling request for node "node3"
I0510 23:31:34.890385       1 nfd-master.go:423] received labeling request for node "node2"
I0510 23:31:38.162723       1 nfd-master.go:488] received CR updation request for node "node3"
I0510 23:31:40.157143       1 nfd-master.go:488] received CR updation request for node "node2"
I0510 23:31:41.343629       1 nfd-master.go:488] received CR updation request for node "node1"
I0510 23:32:34.304750       1 nfd-master.go:423] received labeling request for node "node1"
I0510 23:32:34.309063       1 nfd-master.go:423] received labeling request for node "node3"
I0510 23:32:34.923390       1 nfd-master.go:423] received labeling request for node "node2"
I0510 23:32:38.217047       1 nfd-master.go:488] received CR updation request for node "node3"
I0510 23:32:40.224115       1 nfd-master.go:488] received CR updation request for node "node2"
I0510 23:32:41.416083       1 nfd-master.go:488] received CR updation request for node "node1"

nfd-topology-updater pod logs:

I0510 23:27:36.628824       1 nfd-topology-updater.go:133] Scanning
I0510 23:27:36.629433       1 podresourcesscanner.go:129] podresource iter: kube-proxy-74bjf
I0510 23:27:36.629459       1 podresourcesscanner.go:210] pod:kube-proxy-74bjf doesn't have devices
I0510 23:27:36.637879       1 podresourcesscanner.go:65] podresource: kube-proxy-74bjf
I0510 23:27:36.637904       1 podresourcesscanner.go:129] podresource iter: mytest-node-feature-discovery-worker-rfmdq
I0510 23:27:36.637909       1 podresourcesscanner.go:210] pod:mytest-node-feature-discovery-worker-rfmdq doesn't have devices
I0510 23:27:36.642624       1 podresourcesscanner.go:65] podresource: mytest-node-feature-discovery-worker-rfmdq
I0510 23:27:36.642652       1 podresourcesscanner.go:129] podresource iter: nginx-proxy-node3
I0510 23:27:36.642657       1 podresourcesscanner.go:210] pod:nginx-proxy-node3 doesn't have devices
I0510 23:27:36.646726       1 podresourcesscanner.go:65] podresource: nginx-proxy-node3
I0510 23:27:36.646775       1 podresourcesscanner.go:129] podresource iter: calico-node-l5d9d
I0510 23:27:36.646782       1 podresourcesscanner.go:210] pod:calico-node-l5d9d doesn't have devices
I0510 23:27:36.651992       1 podresourcesscanner.go:65] podresource: calico-node-l5d9d
I0510 23:27:36.652025       1 podresourcesscanner.go:129] podresource iter: mytest-node-feature-discovery-topology-updater-6c25x
I0510 23:27:36.652030       1 podresourcesscanner.go:210] pod:mytest-node-feature-discovery-topology-updater-6c25x doesn't have devices
I0510 23:27:36.656024       1 podresourcesscanner.go:65] podresource: mytest-node-feature-discovery-topology-updater-6c25x
I0510 23:27:36.656060       1 podresourcesscanner.go:129] podresource iter: nodelocaldns-68dtc
I0510 23:27:36.656064       1 podresourcesscanner.go:210] pod:nodelocaldns-68dtc doesn't have devices
I0510 23:27:36.659911       1 podresourcesscanner.go:65] podresource: nodelocaldns-68dtc
I0510 23:27:36.659934       1 podresourcesscanner.go:129] podresource iter: coredns-76b4fb4578-z7brd
I0510 23:27:36.659938       1 podresourcesscanner.go:210] pod:coredns-76b4fb4578-z7brd doesn't have devices
I0510 23:27:36.663607       1 podresourcesscanner.go:65] podresource: coredns-76b4fb4578-z7brd
I0510 23:27:36.663655       1 base.go:127] connecting to nfd-master at mytest-node-feature-discovery-master:8080 ...
I0510 23:27:36.663676       1 component.go:36] [core]parsed scheme: ""
I0510 23:27:36.663681       1 component.go:36] [core]scheme "" not registered, fallback to default scheme
I0510 23:27:36.663693       1 component.go:36] [core]ccResolverWrapper: sending update to cc: {[{mytest-node-feature-discovery-master:8080  <nil> 0 <nil>}] <nil> <nil>}
I0510 23:27:36.663699       1 component.go:36] [core]ClientConn switching balancer to "pick_first"
I0510 23:27:36.663703       1 component.go:36] [core]Channel switches to new LB policy "pick_first"
I0510 23:27:36.663729       1 component.go:36] [core]Subchannel Connectivity change to CONNECTING
I0510 23:27:36.663749       1 component.go:36] [core]Subchannel picks a new address "mytest-node-feature-discovery-master:8080" to connect
I0510 23:27:36.663825       1 component.go:36] [core]Channel Connectivity change to CONNECTING
I0510 23:27:36.666142       1 component.go:36] [core]Subchannel Connectivity change to READY
I0510 23:27:36.666175       1 component.go:36] [core]Channel Connectivity change to READY
I0510 23:27:36.676889       1 base.go:140] closing connection to nfd-master ...
I0510 23:27:36.676931       1 component.go:36] [core]Channel Connectivity change to SHUTDOWN
I0510 23:27:36.676964       1 component.go:36] [core]Subchannel Connectivity change to SHUTDOWN

kubelet logs :
May 10 02:49:06 node1 kubelet[355432]: I0510 02:49:06.538173  355432 topology_manager.go:133] "Creating topology manager with policy per scope" topologyPolicyName="restricted" topologyScopeName="container"
May 10 02:49:07 node1 kubelet[355432]: I0510 02:49:07.024931  355432 topology_manager.go:200] "Topology Admit Handler"
May 10 02:49:07 node1 kubelet[355432]: I0510 02:49:07.025457  355432 topology_manager.go:200] "Topology Admit Handler"
May 10 02:49:07 node1 kubelet[355432]: I0510 02:49:07.025828  355432 topology_manager.go:200] "Topology Admit Handler"
May 10 03:15:08 node1 kubelet[400462]: I0510 03:15:08.328234  400462 topology_manager.go:133] "Creating topology manager with policy per scope" topologyPolicyName="restricted" topologyScopeName="container"
May 10 03:15:08 node1 kubelet[400462]: I0510 03:15:08.826697  400462 topology_manager.go:200] "Topology Admit Handler"
May 10 03:15:08 node1 kubelet[400462]: I0510 03:15:08.827841  400462 topology_manager.go:200] "Topology Admit Handler"


CR:
Name:         node1
Namespace:
Labels:       <none>
Annotations:  <none>
API Version:  topology.node.k8s.io/v1alpha1
Kind:         NodeResourceTopology
Metadata:
  Creation Timestamp:  2022-05-10T20:18:27Z
  Generation:          142
  Managed Fields:
    API Version:  topology.node.k8s.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:topologyPolicies:
      f:zones:
    Manager:         nfd-master
    Operation:       Update
    Time:            2022-05-10T20:18:27Z
  Resource Version:  3039868
  UID:               61b2593e-8fdf-4cd5-b8f7-76b7e79d8281
Topology Policies:
  None
Zones:
  Costs:
    Name:   node-0
    Value:  10
    Name:   node-1
    Value:  20
  Name:     node-0
  Resources:
    Allocatable:  15
    Available:    15
    Capacity:     16
    Name:         cpu
    Allocatable:  14389751808
    Available:    14389751808
    Capacity:     16642093056
    Name:         memory
  Type:           Node
  Costs:
    Name:   node-0
    Value:  20
    Name:   node-1
    Value:  10
  Name:     node-1
  Resources:
    Allocatable:  16
    Available:    16
    Capacity:     16
    Name:         cpu
    Allocatable:  16907128832
    Available:    16907128832
    Capacity:     16907128832
    Name:         memory
  Type:           Node
Events:           <none>

Francesco Romani

unread,
May 10, 2022, 12:36:04 PM5/10/22
to kubernete...@googlegroups.com
On 5/10/22 18:24, 'james beck' via kubernetes-sig-node wrote:
> I met a question that I used helm to install
> node-feature-discovery-0.11.0.Then nfd-topology-updater creates the CR
> that says "Topology Policies: None". But I set
> topologyPolicyName="restricted".And I saw the logs of the kubelet to
> prove it.So how I deal with it .How my nfd-topology-updater can detect
> the topology policies?Or please provide me with a solution to find the
> reason.Thanks!!!


Hi James,


At the moment, the nfd-topology-updater needs to access and read the
kubelet config to learn and report the topology manager policy. Please
make sure to set correctly the `-kubelet-config-file` option of the
nfd-topology-updater, and to pass the path to the kubelet config file.


the nfd-topology-updater will emit a log line like

```

detected kubelet Topology Manager policy "restricted"

```

to report back the topology policy which was detected.


HTH,


--
Francesco Romani
SWE @ Red Hat
github: @fromanirh

Reply all
Reply to author
Forward
0 new messages