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

network: pass network interface RawFlags to agent#1393

Merged
devimc merged 1 commit into
kata-containers:masterfrom
zhabinecho:noarp-feature
Apr 23, 2019
Merged

network: pass network interface RawFlags to agent#1393
devimc merged 1 commit into
kata-containers:masterfrom
zhabinecho:noarp-feature

Conversation

@zhabinecho
Copy link
Copy Markdown

In order to support NOARP in ipvlan interface, the runtime
will pass the rawflags to agent, which also apply to other
network interfaces, not just ipvlan.

Fixes: #1391

Signed-off-by: Zha Bin zhabin@linux.alibaba.com

@grahamwhaley
Copy link
Copy Markdown
Contributor

Hi @zhabinecho - thanks for the PR! I've pulled in some of the network aware folks to review.
I will note for @sboeuf there looks to be a 'protobuf' change here as well, so we will need to scrutinize :-)

CI failed on 'no Fixes:' check, but I see one in the commit - so I have nudged, and if it still happens we'll have to figure out why.

@bergwolf
Copy link
Copy Markdown
Member

@zhabinecho Please do not edit vendor directly. Instead, please vendor the agent change in a separate commit when kata-containers/agent#493 is merged.

Other than that, the PR looks good to me.

Adding dnm because of dependency on kata-containers/agent#493.

@jodh-intel
Copy link
Copy Markdown

@zhabinecho
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Contributor

@mcastelino mcastelino left a comment

Choose a reason for hiding this comment

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

LGTM

This is a good catch. We have never really tested pure L3 interfaces properly.

Copy link
Copy Markdown
Member

@amshinde amshinde left a comment

Choose a reason for hiding this comment

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

lgtm!

@raravena80
Copy link
Copy Markdown
Member

@zhabinecho ping, any updates? Thx!

@zhabinecho
Copy link
Copy Markdown
Author

zhabinecho commented Mar 26, 2019

There are some failure. I can see the following error:

virtcontainers/kata_agent_test.go:194:63: AddInterfaceRequest not declared by package grpc (typecheck)
func (p *gRPCProxy) AddInterface(ctx context.Context, req *pb.AddInterfaceRequest) (*aTypes.Interface, error) {
^
virtcontainers/kata_agent_test.go:198:66: RemoveInterfaceRequest not declared by package grpc (typecheck)
func (p *gRPCProxy) RemoveInterface(ctx context.Context, req *pb.RemoveInterfaceRequest) (*aTypes.Interface, error) {

The AddInterface and RemoveInterface have already removed in agent.

@zhabinecho zhabinecho force-pushed the noarp-feature branch 3 times, most recently from fa9e64c to 9021485 Compare March 26, 2019 06:57
@sboeuf
Copy link
Copy Markdown

sboeuf commented Mar 26, 2019

@amshinde I think you removed the add/delete interface from the agent, right? Did you forget to update the vendoring on the runtime repo?

@zhabinecho
Copy link
Copy Markdown
Author

@sboeuf Do I need to update the commit? Thanks!

Comment thread Gopkg.toml
[[constraint]]
name = "github.com/kata-containers/agent"
revision = "8e48125fa2a793706e5e660e95bdc9755f1cf474"
revision = "48dd1c031530fce9bf16b0f6a7305979cedd8fc9"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

vendor/github.com/mdlayher/vsock has changed, did you forget to include it?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No that's fine, it changed because this is a subdependency. The runtime does not directly import the vsock package but the agent does. And by revendoring the agent package, we pull the updated package of vsock.

Copy link
Copy Markdown

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

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

@zhabinecho The PR looks good, but your carried some changes from another PR, and I don't expect to see virtcontainers/kata_agent_test.go in here.

func (p *gRPCProxy) MemHotplugByProbe(ctx context.Context, req *pb.MemHotplugByProbeRequest) (*gpb.Empty, error) {
return &gpb.Empty{}, nil
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@zhabinecho I think something went wrong with the rebase of master branch here. Those changes have not been introduced by your PR, right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry, I should add one comment to describe it. The agent also add MemHotplugByProbeRequest, StartTracingRequest and StopTracingRequest. The continuous-integration/travis-ci will failed:

virtcontainers/kata_agent_test.go:262:36: cannot use g (variable of type *gRPCProxy) as github.com/kata-containers/runtime/vendor/github.com/kata-containers/agent/protocols/grpc.AgentServiceServer value in argument to pb.RegisterAgentServiceServer: missing method MemHotplugByProbe (typecheck)

	pb.RegisterAgentServiceServer(s, g)

Also the StartTracingRequest and StopTracingRequest are the same.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Oh I see, those have not been updated from a runtime perspective yet... Then that's fine, let's approve this PR :)

@zhabinecho zhabinecho force-pushed the noarp-feature branch 2 times, most recently from 50bbd05 to f47d09e Compare March 29, 2019 02:27
@sboeuf
Copy link
Copy Markdown

sboeuf commented Mar 29, 2019

/test

@zhabinecho
Copy link
Copy Markdown
Author

@sboeuf, I don't understand the relation of commit with the jenkins-ci failing. Can we merge it now? Thanks.

@sboeuf
Copy link
Copy Markdown

sboeuf commented Apr 1, 2019

/test

@sboeuf
Copy link
Copy Markdown

sboeuf commented Apr 1, 2019

@zhabinecho the CI is not very stable, I'm restarting it, hopefully it'll pass this time.

@zhabinecho
Copy link
Copy Markdown
Author

@zhabinecho the CI is not very stable, I'm restarting it, hopefully it'll pass this time.

@sboeuf Please check the CI. Thanks.

@sboeuf
Copy link
Copy Markdown

sboeuf commented Apr 3, 2019

@chavafg could you check the CI failures and decide if this is mergeable?

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Apr 3, 2019

Arm CI is failed, but it is already fixed with #1433.

Fedora jobs failed on the functional tests:

• Failure [21.735 seconds]
state
/tmp/jenkins/workspace/kata-containers-runtime-fedora-PR/go/src/github.com/kata-containers/tests/functional/state_test.go:26
  container
  /tmp/jenkins/workspace/kata-containers-runtime-fedora-PR/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table.go:92
    with workload [true], timeWait 5 [It]
    /tmp/jenkins/workspace/kata-containers-runtime-fedora-PR/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go:46

    Expected
        <int>: 1
    to equal
        <int>: 0

The error I see is:

Running command '/usr/local/bin/kata-runtime [kata-runtime --log=/tmp/bundle024583885/log run --bundle=/tmp/bundle024583885 --console= --pid-file=/tmp/bundle024583885/pid --detach 0gwgKp887QQmi0Kbmm27]'
command failed error 'exit status 1'
[kata-runtime --log=/tmp/bundle024583885/log run --bundle=/tmp/bundle024583885 --console= --pid-file=/tmp/bundle024583885/pid --detach 0gwgKp887QQmi0Kbmm27]
Timeout: 120 seconds
Exit Code: 1
Stdout: 
Stderr: Failed to check if grpc server is working: rpc error: code = Unavailable desc = transport is closing

http://jenkins.katacontainers.io/job/kata-containers-runtime-fedora-PR/1776/console
http://jenkins.katacontainers.io/job/kata-containers-runtime-fedora-vsocks-PR/486/console

I don't recall having instabilities with this test. I have restarted both jobs to see how they behave.

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Apr 3, 2019

@sboeuf still getting failures on the same state container test

Stderr: Failed to check if grpc server is working: context deadline exceeded

and

Stderr: Failed to check if grpc server is working: rpc error: code = Unavailable desc = transport is closing

http://jenkins.katacontainers.io/job/kata-containers-runtime-fedora-PR/1804/
http://jenkins.katacontainers.io/job/kata-containers-runtime-fedora-vsocks-PR/515/

@sboeuf
Copy link
Copy Markdown

sboeuf commented Apr 3, 2019

@zhabinecho please take a look as those failures are caused by the PR.

@jcvenegas
Copy link
Copy Markdown
Member

@zhabinecho, this PR require rebase and check erros.

@zhabinecho
Copy link
Copy Markdown
Author

@zhabinecho, this PR require rebase and check erros.

OK, thanks.

@devimc
Copy link
Copy Markdown

devimc commented Apr 22, 2019

/test

In order to support NOARP in ipvlan interface, the runtime
will pass the rawflags to agent, which also apply to other
network interfaces, not just ipvlan.

Fixes: kata-containers#1391

Signed-off-by: Zha Bin <zhabin@linux.alibaba.com>
@zhabinecho
Copy link
Copy Markdown
Author

@devimc, please review the patch again. Thanks.

@devimc
Copy link
Copy Markdown

devimc commented Apr 23, 2019

/test

@devimc devimc merged commit 63e1c44 into kata-containers:master Apr 23, 2019
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.

pass the NOARP flag to guest network interface