Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

network: Ignore routes with proto as "kernel" #1936

Merged

Conversation

amshinde
Copy link
Member

@amshinde amshinde commented Aug 6, 2019

Routes with proto "kernel" are routes that are automatically added
by the kernel.
It is a route added automatically when you assign an address to an
interface which is not /32.
With this commit, these routes are ignored. The guest kernel
would add these routes on the guest side. A corresponding commit on the
agent side would no longer delete these routes while updating them.

Without this commit, netlink gives an error complaining that a route
already exists when you try to add a route with the same dest subnet.

Something like:
dest: 192.168.1.0/24 device:net1 source:192.168.1.217 scope:253
dest: 192.168.1.0/24 device:net2 source:192.168.1.218 scope:253

Fixes: #1811

Signed-off-by: Archana Shinde [email protected]

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
nice find.
but what do I know ;-)

@grahamwhaley grahamwhaley requested a review from mcastelino August 6, 2019 15:28
@devimc
Copy link

devimc commented Aug 6, 2019

/test

Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amshinde thanks

amshinde added a commit to amshinde/agent-1 that referenced this pull request Aug 6, 2019
Routes with proto kernel are automatically added by the kernel
when an interface is added with ip assigned as a subnet address.
With github.com/kata-containers/runtime#1936, these routes will no
longer be sent from the runtime.

Depends-on: github.com/kata-containers/runtime#1936

Fixes: kata-containers#623

Signed-off-by: Archana Shinde <[email protected]>
@amshinde amshinde force-pushed the ignore-routes-with-kernel-proto branch from f492701 to b44a785 Compare August 6, 2019 16:25
@amshinde
Copy link
Member Author

amshinde commented Aug 6, 2019

/test

amshinde added a commit to amshinde/agent-1 that referenced this pull request Aug 6, 2019
Routes with proto kernel are automatically added by the kernel
when an interface is added with ip assigned as a subnet address.
With github.com/kata-containers/runtime#1936, these routes will no
longer be sent from the runtime.

Depends-on: github.com/kata-containers/runtime#1936

Fixes: kata-containers#623

Signed-off-by: Archana Shinde <[email protected]>
@codecov
Copy link

codecov bot commented Aug 6, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@48e0043). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master    #1936   +/-   ##
=========================================
  Coverage          ?   52.16%           
=========================================
  Files             ?      108           
  Lines             ?    14229           
  Branches          ?        0           
=========================================
  Hits              ?     7422           
  Misses            ?     5925           
  Partials          ?      882

amshinde added a commit to amshinde/agent-1 that referenced this pull request Aug 6, 2019
Routes with proto kernel are automatically added by the kernel
when an interface is added with ip assigned as a subnet address.
With github.com/kata-containers/runtime#1936, these routes will no
longer be sent from the runtime.

Depends-on: github.com/kata-containers/runtime#1936

Fixes: kata-containers#623

Signed-off-by: Archana Shinde <[email protected]>
Routes with proto "kernel" are routes that are automatically added
by the kernel.
It is a route added automatically when you assign an address to an
interface which is not /32.
With this commit, these routes are ignored. The guest kernel
would add these routes on the guest side. A corresponding commit on the
agent side would no longer delete these routes while updating them.

Without this commit, netlink gives an error complaining that a route
already exists when you try to add a route with the same dest subnet.

Something like:
dest: 192.168.1.0/24 device:net1 source:192.168.1.217 scope:253
dest: 192.168.1.0/24 device:net2 source:192.168.1.218 scope:253

Depends-on: github.com/kata-containers/agent#624

Fixes: kata-containers#1811

Signed-off-by: Archana Shinde <[email protected]>
@amshinde amshinde force-pushed the ignore-routes-with-kernel-proto branch from b44a785 to df7cf77 Compare August 6, 2019 21:39
@amshinde
Copy link
Member Author

amshinde commented Aug 6, 2019

/test

@amshinde amshinde requested a review from egernst August 6, 2019 21:46
amshinde added a commit to amshinde/agent-1 that referenced this pull request Aug 9, 2019
Routes with proto kernel are automatically added by the kernel
when an interface is added with ip assigned as a subnet address.
With github.com/kata-containers/runtime#1936, these routes will no
longer be sent from the runtime.

Depends-on: github.com/kata-containers/runtime#1936

Fixes: kata-containers#623

Signed-off-by: Archana Shinde <[email protected]>
@amshinde
Copy link
Member Author

amshinde commented Aug 9, 2019

/test

@amshinde
Copy link
Member Author

amshinde commented Aug 9, 2019

@chavafg @GabyCT
Seeing this on the debian CI:

11:36:18 INFO: Checking Jaeger status (and logging traces to /var/log/kata-tests/logs/traces/kata-runtime-traces.json)
11:36:18 Failed at 171: status=$(get_jaeger_status "$service")
11:36:21 jaeger
11:36:21 jaeger
11:36:21 INFO: Disabling kata tracing on /usr/share/defaults/kata-containers/configuration.toml
11:36:21 make: *** [Makefile:177: tracing] Error 56
11:36:21 Failed at 40: sudo -E PATH="$PATH" bash -c "make test"
11:36:21 Build step 'Execute shell' marked build as failure

Is this something that we have seen before. Going to rerun it.

@egernst egernst merged commit cfedb06 into kata-containers:master Aug 12, 2019
@amshinde amshinde deleted the ignore-routes-with-kernel-proto branch October 4, 2019 18:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multus CNI attempts to overwrite device name for multiple interfaces
4 participants