Comments (8)
Confirmed fixed (tested using docker image above). Thanks a ton guys!
from vpp-agent.
@sbyx please make sure that the eth0 and other interfaces you are trying to use with the af-packet are on the VPP host VM/docker. Af-packet interface cannot be connected directly to the interface in the different namespace (container in this case) simply because VPP does not allow it.
VPP agent also didn't throw the error because it didn't know about the eth0 interface (it means the interface was not registered within vpp-agent). The configuration for the eth0 was cached until the interface eth0 appears. You can see that with 'debug' log option turned on.
The vpp-agent automatically registers all the linux interfaces in the host. That's why it worked with 'lo'.
The "name" field is mainly for the vpp-agent internal use, or if you want to refer to the interface from a different configuration type (f.e. if you want to put an interface to bridge domain). VPP interfaces are named by the VPP (the vpp internal name) which the vpp-agent cannot affect.
from vpp-agent.
I'm a bit confused since I am assuming VPP and ligato are running inside the container (namespace) of node1..3 respectively and would register and take interfaces from there own namespace instead of from the (docker) host.
Especially since I get what I want if I go on vppctl inside any of the nodes (docker-compose exec node1 vppctl) and do "create host-interface name eth0" which makes VPP register an AF_PACKET interface using the eth0 assigned to the container itself (as I would expect).
I was actually building the same setup with a container including VPP and honeycomb and there it works fine too. Do you have any suggestions on whether or how I could achieve the same using ligato?
from vpp-agent.
@sbyx could you provide dump from Etcd for this agent instance? There is special ../vpp/status/..
section with actual status where we could see if the eth0 interface was detected.
from vpp-agent.
/vnf-agent/node1/vpp/config/v1/interface/host-eth0
{
"afpacket": {
"host_if_name": "eth0"
},
"enabled": true,
"mtu": 1500,
"ip_addresses": [
"fd12::10/64"
],
"name": "host-eth0",
"phys_address": "00:00:00:00:12:10",
"type": 4
}
/vnf-agent/node1/vpp/status/v1/interface/local0
{"name":"local0","internal_name":"local0","admin_status":2,"oper_status":2,"statistics":{}}
Again launching vppctl and doing "create host-interface name eth0" afterwards works fine.
from vpp-agent.
@sbyx I tried the same config and it created the af-packet interface just fine.
please make sure that MICROSERVICE_LABEL
environment variable is already set to node1 (default is vpp1) since it has to match with the value in the interface key.
If it still won't work, please set the environment variable INITIAL_LOGLVL=debug
to enable debug logs - we will have a look and try to figure it out.
from vpp-agent.
Thanks for bearing with me. Yes, the label is set beforehand, also the status-plugin writes the interface status correctly to /vnf-agent/node1. With INITIAL_LOGLVL=debug the output is as follows:
node1_1 | 2018-09-18 07:46:22,851 DEBG 'agent' stdout output:
node1_1 | time="2018-09-18 07:46:22.85175" level=debug msg="Start processing change for key: vpp/config/v1/interface/eth0" loc="vpp/data_change.go(41)" logger=vpp
node1_1 |
node1_1 | 2018-09-18 07:46:22,852 DEBG 'agent' stdout output:
node1_1 | time="2018-09-18 07:46:22.85193" level=debug msg="dataChangeIface false Put name:\"host-eth0\" type:AF_PACKET_INTERFACE enabled:true phys_address:\"00:00:00:00:12:10\" mtu:1500 ip_addresses:\"fd12::10/64\" afpacket:<host_if_name:\"eth0\" > " loc="vpp/data_change.go(396)" logger=vpp
node1_1 | time="2018-09-18 07:46:22.85201" level=info msg="Configuring new interface host-eth0" loc="ifplugin/interface_config.go(210)" logger=vpp-if-conf
node1_1 | time="2018-09-18 07:46:22.85206" level=debug msg="Afpacket interface with name host-eth0 added to cache (hostIf: eth0, pending: true)" loc="ifplugin/afpacket_config.go(218)" logger=vpp-if-conf
node1_1 |
node1_1 | 2018-09-18 07:46:22,853 DEBG 'agent' stdout output:
node1_1 | time="2018-09-18 07:46:22.85303" level=debug msg="interface name:\"host-eth0\" type:AF_PACKET_INTERFACE enabled:true phys_address:\"00:00:00:00:12:10\" mtu:1500 ip_addresses:\"fd12::10/64\" afpacket:<host_if_name:\"eth0\" > cannot be created yet and will be configured later" loc="ifplugin/interface_config.go(245)" logger=vpp-if-conf
node1_1 |
node1_1 | 2018-09-18 07:46:25,758 DEBG 'agent' stdout output:
node1_1 | time="2018-09-18 07:46:25.75803" level=debug msg="message sent: ProducerMessage - Topic: if_state, Key: vpp/status/v1/interface/local0, Value: {\"name\":\"local0\",\"internal_name\":\"local0\",\"admin_status\":2,\"oper_status\":2,\"statistics\":{}}, Meta: unexpected type <nil>, Offset: 74, Partition: 0\n" loc="client/syncproducer.go(180)" logger=kafka
node1_1 |
node1_1 | 2018-09-18 07:46:35,750 DEBG 'agent' stdout output:
node1_1 | time="2018-09-18 07:46:35.75025" level=debug msg="message sent: ProducerMessage - Topic: if_state, Key: vpp/status/v1/interface/local0, Value: {\"name\":\"local0\",\"internal_name\":\"local0\",\"admin_status\":2,\"oper_status\":2,\"statistics\":{}}, Meta: unexpected type <nil>, Offset: 75, Partition: 0\n" loc="client/syncproducer.go(180)" logger=kafka
node1_1 |
and for reference:
$ etcdctl get "" --prefix
/vnf-agent/node1/vpp/config/v1/interface/eth0
{
"afpacket": {
"host_if_name": "eth0"
},
"enabled": true,
"mtu": 1500,
"ip_addresses": [
"fd12::10/64"
],
"name": "host-eth0",
"phys_address": "00:00:00:00:12:10",
"type": 4
}
/vnf-agent/node1/vpp/status/v1/interface/local0
{"name":"local0","internal_name":"local0","admin_status":2,"oper_status":2,"statistics":{}}
on another note I tried creating a TAP interface too using etcd
{
"tap": {
"host_if_name": "vpp"
},
"enabled": true,
"mtu": 1500,
"ip_addresses": [
"fd10::10/64"
],
"name": "tapcli-0",
"phys_address": "00:00:00:00:10:10",
"type": 3
}
This actually works fine, so might be something specific to af-packet.
from vpp-agent.
@sbyx so we have found what's the issue and it was actually on our side. I tried the setup locally, not in docker container - that's the reason it worked for me.
eth0 interface in the docker container is no longer and eth type, but a veth - and I didn't realize that the veth-type interfaces are not registered automatically as other types. The reason was that it is not always possible to easily find the other end.
I talked briefly with @ondrej-fabry and we suppose that it should not cause any harm allowing it, so we removed this restriction in our dev branch (pantheon-dev).
If I may kindly ask you to try your setup with latest pantheon-dev branch (we expect it to be currently stable) and let us know whether it worked.
You can optionally use our docker image: ligato/vpp-agent:pantheon-dev
from vpp-agent.
Related Issues (20)
- CNAT plugin added HOT 1
- BUG: rest plugin return 500 /vpp/telemetry HOT 2
- Unable to start the `vpp-agent` Docker container in WSL
- kvscheduler internal graph bug HOT 4
- Deprecate clientv2 package
- Update k8s directory
- restful-api got configuration error. HOT 4
- BUG: srv6 ad failed to create ip neighbor HOT 1
- Is there any plan about supporting VPP 22.06 or 22.10? HOT 2
- How do I save my /confiuration interface configuration to etcd?
- Remove robot tests
- How to del some configuration by http ? HOT 1
- Unable to use REST plugin to configure vpp loopback interface
- Question: why telementry plugin use api sock to dump memory telemetry rather than stats.sock? HOT 2
- Question: does vpp-agent support linux-cp plugin? or how to send vpp cli commands through gRPC? HOT 2
- connect: No such file or directory HOT 1
- ligato Delivers the configuration of the linux host interface
- why (*InterfaceVppHandler).DumpInterfaces fail? HOT 3
- how to get interface status?
- Can we run the VPP Agent as part of the host process instead of container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpp-agent.