-
Notifications
You must be signed in to change notification settings - Fork 374
network: Detect and add static ARP entries #2672
Conversation
This needs to be merged after the agent PR is merged and vendored here. |
virtcontainers/kata_agent.go
Outdated
if grpcStatus.Convert(err).Code() == codes.Unimplemented { | ||
k.Logger().WithFields(logrus.Fields{ | ||
"arpneighbors-requested": fmt.Sprintf("%+v", neighs), | ||
}).Warn("add ARP neighbors request failed due to old agent, please upgrade agent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be clearer if we change this message slightly since it assumes knowledge of Kata internals. Maybe something like:
.Warn("add ARP neighbors request failed due to old agent (please upgrade Kata Containers image version)")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
virtcontainers/kata_agent.go
Outdated
} | ||
k.Logger().WithFields(logrus.Fields{ | ||
"arpneighbors-requested": fmt.Sprintf("%+v", neighs), | ||
}).WithError(err).Error("add ARP neighbors request failed:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Trailing colon in error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -11,6 +11,7 @@ | |||
IPAddress | |||
Interface | |||
Route | |||
ARPNeighbor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing commit to update Gopkg.toml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have vendored in the agent changes. This is fixed now.
34bff7b
to
8fb7b1b
Compare
changes: 42438f network: Add grpc method to add static arp neighbors Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
8fb7b1b
to
ea7c276
Compare
Some network plugins add static arp entries in the network namespace. Scan namespace for static entries and pass these on to the agent to be added within the guest. If the grpc api is not implemented by the agent due to a older running agent, check for this and do not error out to maintain backward compatibility. Fixes kata-containers#2671 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
ea7c276
to
67d3e2c
Compare
/test |
This is ready for review. I have vendored in agent changes. |
Codecov Report
@@ Coverage Diff @@
## master #2672 +/- ##
==========================================
+ Coverage 45.83% 50.41% +4.58%
==========================================
Files 118 118
Lines 17526 17205 -321
==========================================
+ Hits 8033 8674 +641
+ Misses 8605 7467 -1138
- Partials 888 1064 +176 |
ARM CI is failing - I suspect something on the build node rather than this PR. /cc @Pennyzct
|
Hi @grahamwhaley |
cc @mcastelino |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @amshinde
Some network plugins add static arp entries in the network namespace.
Scan namespace for static entries and pass these on to the
agent to be added within the guest.
Fixes #2671
Signed-off-by: Archana Shinde archana.m.shinde@intel.com