ligato / sfc-controller Goto Github PK
View Code? Open in Web Editor NEWService Function Chain (SFC) Controller for stitching virtual and physical networking
License: Apache License 2.0
Service Function Chain (SFC) Controller for stitching virtual and physical networking
License: Apache License 2.0
Hi
I tried to run this example
https://github.com/contiv/vpp/blob/master/k8s/examples/sfc-controller/sfc-controller.yaml
In vpp-agent log I got an error
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
* NEW EVENT: Kubernetes State Change #58 *
* * resource: pod *
* * key: k8s/pod/vnf2/namespace/default *
* * prev-value: name:"vnf2" namespace:"default" label:<key:"sfc" value:"true" > container:<name:"vnf2" *
* port:<container_port:5002 > > *
* * new-value: name:"vnf2" namespace:"default" label:<key:"sfc" value:"true" > host_ip_address:"147.75.72.194" *
* container:<name:"vnf2" port:<container_port:5002 > > *
* EVENT HANDLERS: policy *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
time="2019-03-27 09:16:24.06183" level=debug msg="Pod does not have an IP Address assigned yet" loc="processor/processor.go(220)" logger=policy.-policyProcessor update-pod="name:\"vnf2\" namespace:\"default\" label:<key:\"sfc\" value:\"true\" > host_ip_address:\"147.75.72.194\" container:<name:\"vnf2\" port:<container_port:5002 > > "
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
* FINALIZED EVENT: Kubernetes State Change #58 *
* HANDLED BY: policy took 1ms *
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
* NEW EVENT: External Config Change [DB, PUT] #59 *
* * key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2 *
* new-value: dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2" *
* outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5 *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+======================================================================================================================+
| Transaction #11 NB Transaction |
+======================================================================================================================+
* transaction arguments:
- seq-num: 11
- type: NB Transaction
- Description: External Config Change
- values:
- key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2
val: { dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2" outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5 }
o----------------------------------------------------------------------------------------------------------------------o
* executed operations (2019-03-27 09:16:24.123 +0000 UTC -> 2019-03-27 09:16:24.125 +0000 UTC, dur: 2ms):
1. CREATE:
- key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2
- value: { dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2" outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5 }
- error: invalid CIDR address: 192.168.40.31
x----------------------------------------------------------------------------------------------------------------------x
| #11 took 1.8ms |
x----------------------------------------------------------------------------------------------------------------------x
``
It seems that dst_network:"192.168.40.31" is missing "/32"
Hi,
I am doing some work about sfc-controller on K8s with Contiv-vpp. I deploy a sfc-controller environment for testing based on following instructions https://github.com/contiv/vpp/tree/master/k8s/examples/sfc-controller. But it can not work. Is there anyone can help me about it?
$ sudo vppctl show interface
[sudo] password for jingzhao:
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
TenGigabitEthernet8d/0/0 1 up 9000/0/0/0 rx packets 65703
rx bytes 14742727
tx packets 14309
tx bytes 1998286
drops 51608
punt 151
ip4 43323
ip6 8321
tx-error 1
local0 0 down 0/0/0/0
loop0 2 up 9000/0/0/0
loop1 6 up 9000/0/0/0 rx packets 13897
rx bytes 999350
tx packets 28424
tx bytes 2565708
drops 1
ip4 13897
tap0 3 up 1450/0/0/0 rx packets 102237
rx bytes 18021778
tx packets 107254
tx bytes 11483714
drops 142
ip4 102124
ip6 39
tap2 7 up 1450/0/0/0 rx packets 11861
rx bytes 958503
tx packets 13513
tx bytes 5306964
drops 57
ip4 11844
ip6 17
tap3 8 up 1450/0/0/0 rx packets 11845
rx bytes 957094
tx packets 13639
tx bytes 5319322
drops 57
ip4 11828
ip6 17
tap4 9 up 1450/0/0/0 rx packets 17
rx bytes 1286
drops 17
ip6 17
tap5 10 up 1450/0/0/0 rx packets 34795
rx bytes 4190643
tx packets 30314
tx bytes 3049807
drops 17
ip4 34778
ip6 17
tap6 11 up 1450/0/0/0 rx packets 34927
rx bytes 4193220
tx packets 30413
tx bytes 3051571
drops 18
ip4 34909
ip6 18
vxlan_tunnel0 5 up 0/0/0/0 rx packets 13897
rx bytes 1193908
tx packets 14212
tx bytes 1794486
$
Firstly, i do not find any new created vxlan tunnel on host network
Secondly, I also find that there is no memif interface created in vnf pod.
sfc-controller generates probably logical interface names too long to digest by VPP.
I got this error message from ligato/vpp-agent
- executed operations (2019-03-22 10:34:30.507 +0000 UTC -> 2019-03-22 10:34:30.507 +0000 UTC, dur: 0s):
- DELETE [NOOP]:
- key: config/vpp/v2/interfaces/IF_VXLAN_L2PP_NET_SRVC_Y_CONN_1_FROM_contivvpp_vnf3_p1_TO_vppagent_vnf4_p1_VNI_5001
- value: { name:"IF_VXLAN_L2PP_NET_SRVC_Y_CONN_1_FROM_contivvpp_vnf3_p1_TO_vppagent_vnf4_p1_VNI_5001" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"192.168.30.30" dst_address:"192.168.30.31" vni:5001 > }
- prev-error: field name is invalid: VPP interface logical name exceeds the length limit (63 characters)
Here is configuration file for sfc-controller it is taken from https://github.com/contiv/vpp/blob/master/k8s/examples/sfc-controller/sfc-controller.yaml:
sfc.conf: |
sfc_controller_config_version: 2
description: 2 vnf chains spanning 2 hosts, memif's and vxlan tunnels
system_parameters:
memif_directory: "/var/run/contiv"
ipam_pools: # allocate internode vxlan mesh enpoints from a pool
- metadata:
name: "Q"
labels:
spec:
scope: system
network: 192.168.30.0/24
start_range: 30
end_range: 40
network_nodes:
- metadata:
name: "K0"
spec:
node_type: host
interfaces:
- name: VirtualFunctionEthernet1/0/2
bypass_renderer: true
if_type: ethernet
ip_addresses:
- "192.168.16.1/24"
- metadata:
name: "K1"
spec:
node_type: host
interfaces:
- name: VirtualFunctionEthernet1/0/2
bypass_renderer: true
if_type: ethernet
ip_addresses:
- "192.168.16.2/24"
network_services:
- metadata:
name: "X"
spec:
network_pods:
- metadata:
name: vnf1
spec:
pod_type: vppcontainer
interfaces:
- name: "p1"
if_type: memif
ip_addresses:
- "10.0.1.1/24"
- metadata:
name: vnf2
spec:
pod_type: vppcontainer
interfaces:
- name: "p1"
if_type: memif
ip_addresses:
- "10.0.1.2/24"
connections:
- conn_type: l2pp
conn_method: vswitch
network_node_overlay_name: "Z"
pod_interfaces:
- vnf1/p1
- vnf2/p1
- metadata:
name: "Y"
spec:
network_pods:
- metadata:
name: vnf3
spec:
pod_type: vppcontainer
interfaces:
- name: "p1"
if_type: memif
ip_addresses:
- "10.0.1.1/24"
- metadata:
name: vnf4
spec:
pod_type: vppcontainer
interfaces:
- name: "p1"
if_type: memif
ip_addresses:
- "10.0.1.2/24"
connections:
- conn_type: l2pp
conn_method: vswitch
network_node_overlay_name: "Z"
pod_interfaces:
- vnf3/p1
- vnf4/p1
network_node_overlays:
- metadata:
name: "Z"
spec:
service_mesh_type: mesh
connection_type: vxlan
vxlan_mesh_parms:
vni_range_start: 5000
vni_range_end: 5999
loopback_ipam_pool_name: Q
create_loopback_interface: true
create_loopback_static_routes: true
Hi,
I build the latest version of sfc-controller. I found that it can not build a dev_sfc_controller_alpine image successfully by using build.sh. The following are the errror log information.
Step 19/23 : RUN ./build-controller.sh
---> Running in cab2f3620fc6
/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/root/go/bin
/usr/local/go
/root/go
Setting up environment...
Done.
go version go1.9.7 linux/amd64
# building the sfc controller with plugins
github.com/ligato/sfc-controller/vendor/golang.org/x/sys/unix
github.com/ligato/sfc-controller/vendor/github.com/satori/go.uuid
github.com/ligato/sfc-controller/vendor/github.com/namsral/flag
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/utils/once
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/codes
github.com/ligato/sfc-controller/vendor/gopkg.in/yaml.v2
github.com/ligato/sfc-controller/vendor/github.com/gogo/protobuf/proto
github.com/ligato/sfc-controller/vendor/github.com/golang/protobuf/proto
github.com/ligato/sfc-controller/vendor/golang.org/x/net/context
github.com/ligato/sfc-controller/vendor/golang.org/x/net/internal/timeseries
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/grpclog
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/credentials/internal
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/metadata
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/resolver
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/encoding
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/grpcrand
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/envconfig
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/grpcsync
github.com/ligato/sfc-controller/vendor/golang.org/x/text/transform
github.com/ligato/sfc-controller/vendor/golang.org/x/text/unicode/bidi
github.com/ligato/sfc-controller/vendor/golang.org/x/net/http2/hpack
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/keepalive
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/stats
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/tap
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/backoff
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/resolver/passthrough
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/pkg/types
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/pkg/tlsutil
github.com/ligato/sfc-controller/vendor/github.com/gorilla/mux
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/connectivity
github.com/ligato/sfc-controller/vendor/golang.org/x/net/trace
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/naming
github.com/ligato/sfc-controller/vendor/github.com/dgrijalva/jwt-go
github.com/ligato/sfc-controller/vendor/github.com/pkg/errors
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/resolver/dns
github.com/ligato/sfc-controller/vendor/github.com/unrolled/render
github.com/ligato/sfc-controller/vendor/golang.org/x/crypto/blowfish
github.com/ligato/sfc-controller/vendor/github.com/beorn7/perks/quantile
github.com/ligato/sfc-controller/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
github.com/ligato/sfc-controller/vendor/golang.org/x/text/unicode/norm
github.com/ligato/sfc-controller/vendor/github.com/prometheus/common/model
github.com/ligato/sfc-controller/vendor/github.com/prometheus/procfs/internal/util
github.com/ligato/sfc-controller/vendor/github.com/philhofer/fwd
github.com/ligato/sfc-controller/plugins/controller/idapi/bitmap
github.com/ligato/sfc-controller/vendor/golang.org/x/text/secure/bidirule
github.com/ligato/sfc-controller/plugins/controller/idapi/ipam
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/utils/addrs
github.com/ligato/sfc-controller/vendor/github.com/prometheus/procfs/nfs
github.com/ligato/sfc-controller/vendor/golang.org/x/crypto/bcrypt
github.com/ligato/sfc-controller/vendor/github.com/prometheus/procfs/xfs
github.com/ligato/sfc-controller/plugins/controller/idapi
github.com/ligato/sfc-controller/vendor/github.com/tinylib/msgp/msgp
github.com/ligato/sfc-controller/vendor/github.com/prometheus/procfs
github.com/ligato/sfc-controller/vendor/golang.org/x/crypto/ssh/terminal
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/syscall
github.com/ligato/sfc-controller/vendor/github.com/sirupsen/logrus
github.com/ligato/sfc-controller/vendor/golang.org/x/net/idna
github.com/ligato/sfc-controller/vendor/github.com/ghodss/yaml
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/logging
github.com/ligato/sfc-controller/vendor/github.com/bshuster-repo/logrus-logstash-hook
github.com/ligato/sfc-controller/vendor/github.com/sirupsen/logrus/hooks/syslog
github.com/ligato/sfc-controller/vendor/golang.org/x/net/http/httpguts
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/logging/logrus
github.com/ligato/sfc-controller/vendor/golang.org/x/net/http2
github.com/ligato/sfc-controller/vendor/github.com/fluent/fluent-logger-golang/fluent
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/config
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/utils/safeclose
github.com/ligato/sfc-controller/vendor/github.com/evalphobia/logrus_fluent
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/infra
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/datasync/resync
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/servicelabel
github.com/ligato/sfc-controller/vendor/github.com/golang/protobuf/ptypes/any
github.com/ligato/sfc-controller/vendor/github.com/golang/protobuf/ptypes/duration
github.com/ligato/sfc-controller/vendor/github.com/golang/protobuf/ptypes/timestamp
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/credentials
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/encoding/proto
github.com/ligato/sfc-controller/vendor/github.com/prometheus/client_model/go
github.com/ligato/sfc-controller/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil
github.com/ligato/sfc-controller/vendor/google.golang.org/genproto/googleapis/rpc/status
github.com/ligato/sfc-controller/vendor/github.com/golang/protobuf/ptypes
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/balancer
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/channelz
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/peer
github.com/ligato/sfc-controller/vendor/github.com/prometheus/common/expfmt
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/status
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/balancer/base
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/binarylog
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/balancer/roundrobin
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/logging/measure/model/apitrace
github.com/ligato/sfc-controller/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/datasync
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/health/statuscheck/model/status
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/rpc/rest/security/model/access-security
github.com/ligato/sfc-controller/plugins/controller/model
github.com/ligato/sfc-controller/vendor/github.com/ligato/vpp-agent/plugins/linux/model/interfaces
github.com/ligato/sfc-controller/vendor/github.com/ligato/vpp-agent/plugins/vpp/model/interfaces
github.com/ligato/sfc-controller/vendor/github.com/ligato/vpp-agent/plugins/vpp/model/l2
github.com/ligato/sfc-controller/vendor/github.com/ligato/vpp-agent/plugins/vpp/model/l3
github.com/ligato/sfc-controller/vendor/github.com/prometheus/client_golang/prometheus
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/logging/measure
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/db/keyval
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/rpc/rest/security
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/agent
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/db/keyval/kvproto
github.com/ligato/sfc-controller/plugins/controller/database
# github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/agent
vendor/github.com/ligato/cn-infra/agent/agent.go:230:9: undefined: strings.Builder
github.com/ligato/sfc-controller/plugins/controller/vppagent
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/rpc/rest
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/internal/transport
github.com/ligato/sfc-controller/vendor/github.com/gogo/protobuf/gogoproto
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/logging/logmanager
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/auth/authpb
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/mvcc/mvccpb
github.com/ligato/sfc-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp
github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/rpc/prometheus
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/etcdserver/etcdserverpb
github.com/ligato/sfc-controller/vendor/google.golang.org/grpc/health/grpc_health_v1
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/clientv3
github.com/ligato/sfc-controller/vendor/github.com/coreos/etcd/clientv3/namespace
make: *** [Makefile:108: build] Error 2
# installing sfc controller with plugins
# github.com/ligato/sfc-controller/vendor/github.com/ligato/cn-infra/agent
vendor/github.com/ligato/cn-infra/agent/agent.go:230:9: undefined: strings.Builder
make: *** [Makefile:112: install] Error 2
The command '/bin/sh -c ./build-controller.sh' returned a non-zero code: 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.