Skip to content

Commit 1df2271

Browse files
more remove wait machine
1 parent 9202175 commit 1df2271

File tree

1 file changed

+0
-25
lines changed
  • cmd/clusterctl/pkg/client/cluster

1 file changed

+0
-25
lines changed

cmd/clusterctl/pkg/client/cluster/mover.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -85,31 +85,6 @@ func newObjectMover(fromProxy Proxy, log logr.Logger) *objectMover {
8585
}
8686
}
8787

88-
const (
89-
retryIntervalResourceReady = 10 * time.Second
90-
timeoutMachineReady = 30 * time.Minute
91-
)
92-
93-
// waitForMachineReady waits for a machine just moved to a new management cluster to be reconciled and linked with the corresponding node.
94-
func waitForMachineReady(proxy Proxy, machineKey client.ObjectKey) error {
95-
machine := new(clusterv1.Machine)
96-
c, err := proxy.NewClient()
97-
if err != nil {
98-
return err
99-
}
100-
101-
err = wait.PollImmediate(retryIntervalResourceReady, timeoutMachineReady, func() (bool, error) {
102-
if err := c.Get(ctx, machineKey, machine); err != nil {
103-
return false, err
104-
}
105-
106-
// Return true if the Machine has a reference to a Node.
107-
return machine.Status.NodeRef != nil, nil
108-
})
109-
110-
return err
111-
}
112-
11388
// Move moves all the Cluster API objects existing in a namespace (or from all the namespaces if empty) to a target management cluster
11489
func (o *objectMover) move(graph *objectGraph, toProxy Proxy) error {
11590
clusters := graph.getClusters()

0 commit comments

Comments
 (0)