agent: Remove dev from pciDeviceMap when device is unplugged#730
Conversation
8c4fc51 to
b3b9811
Compare
Codecov Report
@@ Coverage Diff @@
## master #730 +/- ##
==========================================
- Coverage 60.73% 60.45% -0.28%
==========================================
Files 17 17
Lines 2544 2569 +25
==========================================
+ Hits 1545 1553 +8
- Misses 850 868 +18
+ Partials 149 148 -1 |
|
thanks @darfux /test |
b3b9811 to
95c2953
Compare
|
Added |
|
hey @darfux don't worry 😄 /test |
|
Thanks @devimc , could you plz restart the failed cases? |
|
@darfux - I've nudged the two failed CIs for rebuilds. |
|
Thanks @grahamwhaley ! |
|
done. kicked rebuild. |
|
one more review here please |
grahamwhaley
left a comment
There was a problem hiding this comment.
l g t m
would like @jodh-intel to check the span code of course ;-)
|
same comment as @grahamwhaley. Would like @jodh-intel to take a look at the span handling before this is merged. |
|
Thanks for reviewing! Hi @jodh-intel could you plz take a look at the span handling? 😁 |
jodh-intel
left a comment
There was a problem hiding this comment.
Thanks @darfux.
lgtm
The spans seem fine although an alternative would be to do something like:
diff --git a/agent.go b/agent.go
index d49fb70..7823722 100644
--- a/agent.go
+++ b/agent.go
@@ -730,13 +730,11 @@ func (s *sandbox) listenToUdevEvents() {
s.Lock()
delete(s.pciDeviceMap, uEv.DevPath)
s.Unlock()
- span.finish()
- continue
+ goto FINISH_SPAN
}
if uEv.Action != "add" {
- span.finish()
- continue
+ goto FINISH_SPAN
}
fieldLogger.Infof("Received add uevent")
@@ -792,6 +790,7 @@ func (s *sandbox) listenToUdevEvents() {
}
}
+ FINISH_SPAN:
span.finish()
}
}|
Merging blocked due to the dnm label still - can this be removed now? |
Delete `uEv.DevPath` from pciDeviceMap when recieving `remove` uevent. Fixes kata-containers#729 Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
95c2953 to
3f0d98e
Compare
|
Thanks @jodh-intel. I've applied your suggestion |
|
Thanks @darfux. |
|
/test |
|
Thanks @grahamwhaley . The |
|
np, scheduled.... |
Delete
uEv.DevPathfrom pciDeviceMap when recievingremoveuevent.Fixes #729
Signed-off-by: Li Yuxuan liyuxuan04@baidu.com