Skip to content

Commit

Permalink
Decoding machine status fails during machine Update calls (openshift#103
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gdoctor authored and pierreprinetti committed Apr 22, 2024
1 parent 3ff1ee4 commit 972e7e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cloud/openstack/machine/instancestatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package machine
import (
"bytes"
"fmt"

"k8s.io/apimachinery/pkg/runtime/serializer/json"

"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down Expand Up @@ -84,7 +85,7 @@ func (oc *OpenstackClient) machineInstanceStatus(machine *clusterv1.Machine) (in

serializer := json.NewSerializer(json.DefaultMetaFactory, oc.scheme, oc.scheme, false)
var status clusterv1.Machine
_, _, err := serializer.Decode([]byte(a), &schema.GroupVersionKind{Group: "", Version: "cluster.k8s.io/v1alpha1", Kind: "Machine"}, &status)
_, _, err := serializer.Decode([]byte(a), &schema.GroupVersionKind{Group: "cluster.k8s.io", Version: "v1alpha1", Kind: "Machine"}, &status)
if err != nil {
return nil, fmt.Errorf("decoding failure: %v", err)
}
Expand Down

0 comments on commit 972e7e1

Please sign in to comment.