ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
252 stars 125 forks source link

There are two VPP running together with one VPP agent #1752

Closed wxxxxxz closed 4 years ago

wxxxxxz commented 4 years ago

In my environment There are two VPP running together with the one VPP agent; I want that,one vpp-agent can control all vpp.

i read the doc https://docs.ligato.io/en/latest/plugins/vpp-plugins/#govppmux-plugin

The default behaviour assumes that there is only a single VPP running in an environment together with the VPP agent. In the case where VPP runs with a customized SHM prefix, or there are several VPP instances running side-by-side, GoVPP must know the SHM prefix in order to connect to the desired VPP instance. The prefix must be included in the GoVPPMux conf file, with the key shm-prefix, and the value matching the VPP shared memory prefix name.

so .I edited the govpp.conf this

binapi-socket-path:  
 - /run/vpp/capi.sock #vpp2
 - /run/vpp/api.sock  # vpp1
log 
 level=fatal msg="1 error(s) decoding:\n\n* 'binapi-socket-path' expected type                                                                                                'string', got unconvertible type '[]interface {}'" loc="vpp-agent/main.go(87)" logger=defaultLogger

but not useful,what should i do.

ondrej-fabry commented 4 years ago

There is no support for multiple VPP instances being managed by a single vpp-agent. The documentation mentions multiple VPPs running, but that is not for a single vpp-agent.

The binapi-socket-path is a string not a string list:

//...
BinAPISocketPath string `json:"binapi-socket-path"`
//...

https://github.com/ligato/vpp-agent/blob/master/plugins/govppmux/config.go#L35

That's why you are getting error.

Perhaps you could try to explain your use-case and we might be able to suggest some solution for you. However normal behavior is < one vpp-agent > - < one VPP >, usually together in a container. So I would recommend to sumply run another instance like this.

wxxxxxz commented 4 years ago

Thx.I already read code。:-))