-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
There exists two different places within the MachineConfigNode resource where PinnedImageSet applied to the Node are mentioned: # In the Spec MachineConfigNode.Spec.PinnedImageSets
- In the Status MachineConfigNode.Status.PinnedImageSets
The Status.PinnedImageSets seems to get updated regularly by both GenerateAndApplyMachineConfigNodes and UpdateMachineConfigNodeStatus. However the Spec.PinnedImageSets gets updated only on UpdateMachineConfigNodeStatus at this specific conditions (when MCN status is not Pending and Provisioning).Also the Spec.PinnedImageSets has comments on its API definition mentioning:
// pinnedImageSets is a user defined value that holds the names of the desired image sets that the node should pull and pin.
However there does not seem to be any existing logic within the MachineConfigController or the MachineConfigDaemon responding to any changes made in the MachineConfigNode.Spec.PinnedImageSetsWhile reviewing the Pull Request for the API I see this comment made by Sam changing the name of the field from Status.PinnedImageSetVersion to Status.PinnedImageSet. Does this indicate a different intention (perhaps to control the version)?So my question being: # What is the usecase of having a MCN.Spec.PinnedImageSets when the same can be viewed in the MCN.Status.PinnedImageSets and the Pool.Status.PinnedImageSets? If there is no use, are we okay to remove it from the MCN V1 API?
- If there exists a usecase, why does the current PIS implementation only update the MCN.Spec.PinnedImageSets in very specific cases. Is this a bug and needs fix before GA?
- If there exists a usecase and we fix the "bug" mentioned in point 2, what happens when:
- I apply PIS_A to Pool_A (which has worker_A)
- In the MCN_A for Worker_A I decide to remove the PIS_A from the Spec.PinnedImageSets
- What happens to the Status reflected in MachineConfigNode, MachineConfigPool? Is the expectation to unpin the imageset specifically for the node?
That said
Here's my take on this:
If the MCO does not react to the changes made by the user on MCN.Spec.PinnedImageSets , it should simply not exist. There is no benefit to it existing as a "psuedo" Status. There are several other methods to:
View an applied PIS to a node by looking at the MCN.Status.PinnedImageSets
Modify an applied PIS to a Pool by adding and deleting an applied PIS resource
If the intention is to be able to modify the pinned images on a specific node (not the Pool which is currently supported) using the MCN, that should be added as a new epic targeted for post GA. This functionality can simply not be added to the current epic as it needs careful consideration and testing for edge cases.