TobyTheHutt
Mission Specialist
Mission Specialist
  • 118 Views

Machine config labels for MCPs and Tuned

Why am I supposed to set `machineConfigSelector` for my MCPs and `machineConfigLabels` for my Tuned profile in the final lab of the Cluster Partitioning chapter? According to the docs, the labels are used to select the proper MCs:

If machineConfigLabels is defined, machine config pool based matching is turned on for the given recommend: list item. <mcLabels> specifies the labels for a machine config.

 

Further, the MCP documentation states the following:

When the controller detects any of those events, it will generate a new rendered Machine Config object that contains all of the Machine Configs based on MachineConfigSelector from each MachineConfigPool.

 

This suggests to me, that setting this in the lab exercise has not impact, since there are no MCs with the label `machineconfiguration.openshift.io/role=numa-bal`. Therefore, those label selectors will never find any results.

HOWEVER, somehow my Tuned profile gets properly assigned to the correct node at the end of the exercise, even though there is not a single MC, MCP, Profile or other resource with that label. I'm a bit lost here and would appreciate any help.

Custom tuning specification 

What does Machine Config Controller do? 

 

UPDATE 1:

I tested it by leaving out `numa-bal` from the MCP `machineConfigSelector`, which causes Tuned to apply its profile to all workers.

It seems to me like `machineConfigLabels` and `machineConfigSelector` just have to match and are treated as virtual labels which are never really assigned to any object. Tuned seems to just look for its label in the MCPs and - if it finds one - tries to recommend its policies to the matching nodes of that MCP. This is not verified as documentation is scarce.

It really bothers me deeply that someone chose the `machineconfiguration.openshift.io/role` label key, which is actually used in MCs, and made it an abstract, intransparent, virtual Tuned-managed thing for their own purpose.

0 Replies
Join the discussion
You must log in to join this conversation.