Skip to content

Commit

Permalink
[YUNIKORN-1097] ERMProxy DEBUG cannot log event with channel
Browse files Browse the repository at this point in the history
  • Loading branch information
steinsgateted committed Mar 1, 2022
1 parent c61bf9a commit 366fce8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/rmproxy/rmevent/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,36 +106,36 @@ func GetEventWithoutChan(ev interface{}) interface{} {
switch v := ev.(type) {
case *RMRegistrationEvent:
c := <-v.Channel
m["RMRegistrationEvent"] = map[string]interface{}{
m = map[string]interface{}{
"Registration": v.Registration,
"Channel": c,
}
return m
case *RMConfigUpdateEvent:
c := <-v.Channel
m["RMConfigUpdateEvent"] = map[string]interface{}{
m = map[string]interface{}{
"RmID": v.RmID,
"Channel": c,
}
return m
case *RMPartitionsRemoveEvent:
c := <-v.Channel
m["RMPartitionsRemoveEvent"] = map[string]interface{}{
m = map[string]interface{}{
"RmID": v.RmID,
"Channel": c,
}
return m
case *RMNewAllocationsEvent:
c := <-v.Channel
m["RMNewAllocationsEvent"] = map[string]interface{}{
m = map[string]interface{}{
"RmID": v.RmID,
"Allocations": v.Allocations,
"Channel": c,
}
return m
case *RMReleaseAllocationEvent:
c := <-v.Channel
m["RMPartitionsRemoveEvent"] = map[string]interface{}{
m = map[string]interface{}{
"RmID": v.RmID,
"ReleasedAllocations": v.ReleasedAllocations,
"Channel": c,
Expand Down
1 change: 1 addition & 0 deletions pkg/rmproxy/rmproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func enqueueAndCheckFull(queue chan interface{}, ev interface{}) {
select {
case queue <- ev:
log.Logger().Debug("enqueue event",
zap.String("eventType", reflect.TypeOf(ev).String()),
zap.Any("event", rmevent.GetEventWithoutChan(ev)),
zap.Int("currentQueueSize", len(queue)))
default:
Expand Down

0 comments on commit 366fce8

Please sign in to comment.