try old patch after new patch fails

This commit is contained in:
ymqytw
2016-11-17 10:46:23 -08:00
parent 5efdea63b2
commit f32696e734
18 changed files with 58 additions and 123 deletions

View File

@@ -59,10 +59,6 @@ type nodeStatusUpdater struct {
}
func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error {
smPatchVersion, err := strategicpatch.GetServerSupportedSMPatchVersion(nsu.kubeClient.Discovery())
if err != nil {
return err
}
nodesToUpdate := nsu.actualStateOfWorld.GetVolumesToReportAttached()
for nodeName, attachedVolumes := range nodesToUpdate {
nodeObj, exists, err := nsu.nodeInformer.GetStore().GetByKey(string(nodeName))
@@ -111,8 +107,9 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error {
err)
}
// Defaulting to SMPatchVersion_1_5 is safe, since updateNodeStatus doesn't update any lists of primitives
patchBytes, err :=
strategicpatch.CreateStrategicMergePatch(oldData, newData, node, smPatchVersion)
strategicpatch.CreateStrategicMergePatch(oldData, newData, node, strategicpatch.SMPatchVersion_1_5)
if err != nil {
return fmt.Errorf(
"failed to CreateStrategicMergePatch for node %q. %v",