Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
GRPC update (#69)
Browse files Browse the repository at this point in the history
Bug Fix for K8s v25
I have replicated this error on the newest version of kubernetes v25.3 with CRI-O runtime.
The error is due to the order of initializing grpc with kubelet. Newest version of kubelet requires grpc to first start and then register a session.
I've also tested the reordering of the grpc functions with older version of k8s (22.5) which works as expected.
  • Loading branch information
patrickog11 authored and garyloug committed Jan 12, 2023
1 parent d9d43e6 commit c30d397
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/deviceplugin/poolManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ func (pm *PoolManager) Init(config PoolConfig) error {
pm.BpfHandler = bpf.NewHandler()
pm.NetHandler = networking.NewHandler()

if err := pm.startGRPC(); err != nil {
return err
}
logging.Infof("Pool "+pm.DevicePrefix+"/%s started serving", pm.Name)

if err := pm.registerWithKubelet(); err != nil {
return err
}
logging.Infof("Pool "+pm.DevicePrefix+"/%s registered with Kubelet", pm.Name)

if err := pm.startGRPC(); err != nil {
return err
}
logging.Infof("Pool "+pm.DevicePrefix+"/%s started serving", pm.Name)

if len(pm.Devices) > 0 {
pm.UpdateSignal <- true
}
Expand Down

0 comments on commit c30d397

Please sign in to comment.