Skip to content

Commit e79d121

Browse files
committed
more logging, set the subnet ID
1 parent ae90c16 commit e79d121

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloud/linode/route_controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,13 @@ func (r *routes) handleInterfaces(ctx context.Context, intfRoutes []string, lino
246246
if instance.InterfaceGeneration == linodego.GenerationLinode {
247247
interfaceUpdateOptions := linodego.LinodeInterfaceUpdateOptions{
248248
VPC: &linodego.VPCInterfaceCreateOptions{
249-
IPv4: &linodego.VPCInterfaceIPv4CreateOptions{Ranges: linodeInterfaceRoutes},
249+
SubnetID: intfVPCIP.SubnetID,
250+
IPv4: &linodego.VPCInterfaceIPv4CreateOptions{Ranges: linodeInterfaceRoutes},
250251
},
251252
}
252253
resp, err := r.client.UpdateInterface(ctx, instance.ID, intfVPCIP.InterfaceID, interfaceUpdateOptions)
253254
if err != nil {
255+
klog.V(4).Infof("Unable to update legacy interface %d for node %s", intfVPCIP.InterfaceID, route.TargetNode)
254256
return err
255257
}
256258
klog.V(4).Infof("Updated routes for node %s. Current routes: %v", route.TargetNode, resp.VPC.IPv4.Ranges)
@@ -260,6 +262,7 @@ func (r *routes) handleInterfaces(ctx context.Context, intfRoutes []string, lino
260262
}
261263
resp, err := r.client.UpdateInstanceConfigInterface(ctx, instance.ID, intfVPCIP.ConfigID, intfVPCIP.InterfaceID, interfaceUpdateOptions)
262264
if err != nil {
265+
klog.V(4).Infof("Unable to update linode interface %d for node %s", intfVPCIP.InterfaceID, route.TargetNode)
263266
return err
264267
}
265268
klog.V(4).Infof("Updated routes for node %s. Current routes: %v", route.TargetNode, resp.IPRanges)

0 commit comments

Comments
 (0)