ligato / vpp-agent

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

running vpp-agent v2.3.0 encount error #1510

Closed liudf0716 closed 4 years ago

liudf0716 commented 4 years ago

I used vpp-agent v2.3.0 and vpp 20.01rc0, after the following operations, encount error

my vpp.env is

VPP_REPO_URL=https://github.com/FDio/vpp.git
VPP_DEFAULT=2001

# VPP 19.04
VPP_IMG_1904=ligato/vpp-base:19.04
VPP_BINAPI_1904=plugins/vpp/binapi/vpp1904
VPP_BRANCH_1904=stable/1904

# VPP 19.08
VPP_IMG_1908=ligato/vpp-base:19.08
VPP_BINAPI_1908=plugins/vpp/binapi/vpp1908
VPP_BRANCH_1908=stable/1908

# VPP 20.01
VPP_IMG_2001=ligato/vpp-base:20.01-rc0.161-ge5948fb49
VPP_BINAPI_2001=plugins/vpp/binapi/vpp2001
VPP_BRANCH_2001=stable/2001

make agent it's ok, then execute vpp-agent, show the following error

 _  _____  ___ _______ ____ ____ ___ / /_
| |/ / _ \/ _ /___/ _ '/ _ '/ -_/ _ / __/
|___/ .__/ .__/   \_'_/\_' /\__/_//_\__/  v2.3.0-dirty
   /_/  /_/           /___/

INFO[0000] Starting agent version: v2.3.0-dirty          BuildDate="2019-10-07T16:46+08:00" CommitHash=6d18d39033a7c6887cffb1b6524d2b4f06f0433e loc="agent/agent.go(134)" logger=agent
INFO[0000] ETCD config not found, skip loading this plugin  loc="etcd/plugin_impl_etcd.go(293)" logger=etcd
INFO[0000] Consul config not found, skip loading this plugin  loc="consul/plugin.go(137)" logger=consul
INFO[0000] Redis config not found, skip loading this plugin  loc="redis/plugin_impl_redis.go(123)" logger=redis
panic: no compatible version available

goroutine 1 [running]:
github.com/ligato/vpp-agent/plugins/govppmux/vppcalls.CompatibleVpeHandler(0x1698de0, 0xc000196ba0, 0x64, 0xc000196ba0)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/vppcalls/vppcalls_api.go:69 +0x2ba
github.com/ligato/vpp-agent/plugins/govppmux.(*Plugin).updateVPPInfo(0x234c460, 0x0, 0x0)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/plugin_impl_govppmux.go:218 +0xec
github.com/ligato/vpp-agent/plugins/govppmux.(*Plugin).Init(0x234c460, 0x14c18c3, 0xd)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/plugin_impl_govppmux.go:144 +0x5b6
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).start(0xc0003c82a0, 0xa00a5c, 0x234a980)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:221 +0xc1c
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).starter(0xc0003c82a0, 0x0, 0xc0002a7d28)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:173 +0x2d6
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once.(*ReturnError).Do.func1()
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once/return_error.go:32 +0x2f
sync.(*Once).doSlow(0xc0003c8310, 0xc0002a7de8)
        /usr/lib/golang/src/sync/once.go:66 +0xe3
sync.(*Once).Do(...)
        /usr/lib/golang/src/sync/once.go:57
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once.(*ReturnError).Do(0xc0003c8310, 0xc0002a7e30, 0x2, 0x0)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once/return_error.go:31 +0x85
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).Start(0xc0003c82a0, 0xc0003c6030, 0xc0003c6060)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:117 +0x54
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).Run(0xc0003c82a0, 0x3, 0x3)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:127 +0x2b
main.main()
        /root/go/src/github.com/ligato/vpp-agent/cmd/vpp-agent/main.go:64 +0x200

I add log in file vendor/git.fd.io/govpp.git/core/channel.go

func (ch *Channel) CheckCompatiblity(msgs ...api.Message) error {
    for _, msg := range msgs {
        // TODO: collect all incompatible messages and return summarized error
        _, err := ch.msgIdentifier.GetMessageID(msg)
        if err != nil {
            log.Info("err is: ", err);
            return err
        }
    }
    return nil
}

after make agent and execute vpp-agent, show the following error

                                      __
 _  _____  ___ _______ ____ ____ ___ / /_
| |/ / _ \/ _ /___/ _ '/ _ '/ -_/ _ / __/
|___/ .__/ .__/   \_'_/\_' /\__/_//_\__/  v2.3.0-dirty
   /_/  /_/           /___/

INFO[0000] Starting agent version: v2.3.0-dirty          BuildDate="2019-10-07T16:46+08:00" CommitHash=6d18d39033a7c6887cffb1b6524d2b4f06f0433e loc="agent/agent.go(134)" logger=agent
INFO[0000] ETCD config not found, skip loading this plugin  loc="etcd/plugin_impl_etcd.go(293)" logger=etcd
INFO[0000] Consul config not found, skip loading this plugin  loc="consul/plugin.go(137)" logger=consul
INFO[0000] Redis config not found, skip loading this plugin  loc="redis/plugin_impl_redis.go(123)" logger=redis
INFO[0000] err is: unknown message: "show_threads_reply_6942fb35" 
INFO[0000] err is: unknown message: "cli_inband_f8377302" 
INFO[0000] err is: unknown message: "cli_inband_f8377302" 
panic: no compatible version available

goroutine 1 [running]:
github.com/ligato/vpp-agent/plugins/govppmux/vppcalls.CompatibleVpeHandler(0x1698ee0, 0xc0002b96e0, 0x64, 0xc0002b96e0)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/vppcalls/vppcalls_api.go:69 +0x2ba
github.com/ligato/vpp-agent/plugins/govppmux.(*Plugin).updateVPPInfo(0x234c460, 0x0, 0x0)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/plugin_impl_govppmux.go:218 +0xec
github.com/ligato/vpp-agent/plugins/govppmux.(*Plugin).Init(0x234c460, 0x14c194b, 0xd)
        /root/go/src/github.com/ligato/vpp-agent/plugins/govppmux/plugin_impl_govppmux.go:144 +0x5b6
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).start(0xc000114540, 0x811449, 0x234a980)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:221 +0xc1c
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).starter(0xc000114540, 0x0, 0xc0001d9d28)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:173 +0x2d6
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once.(*ReturnError).Do.func1()
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once/return_error.go:32 +0x2f
sync.(*Once).doSlow(0xc0001145b0, 0xc0001d9de8)
        /usr/lib/golang/src/sync/once.go:66 +0xe3
sync.(*Once).Do(...)
        /usr/lib/golang/src/sync/once.go:57
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once.(*ReturnError).Do(0xc0001145b0, 0xc0001d9e30, 0x2, 0x0)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/utils/once/return_error.go:31 +0x85
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).Start(0xc000114540, 0xc0002fcb40, 0xc0002fcb70)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:117 +0x54
github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent.(*agent).Run(0xc000114540, 0x3, 0x3)
        /root/go/src/github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/agent/agent.go:127 +0x2b
main.main()
        /root/go/src/github.com/ligato/vpp-agent/cmd/vpp-agent/main.go:64 +0x200
liudf0716 commented 4 years ago

it seems vpp must checkout to 5b786fb89483a77614dd40e8959463816d79fcbb to solve above problem

VladoLavor commented 4 years ago

@liudf0716 the VPP 20.01 you've used before contained changes in the API not compatible with the VPP agent (i.e. newer than supported), so as you already mentioned you have to use the exact commit.

liudf0716 commented 4 years ago

@VladoLavor thanks for your kindly answer. anyway, I have a question : why not use v20.01-rc0 tag but that commit?

ondrej-fabry commented 4 years ago

@liudf0716 It's because we usually update current development version (master branch) of VPP several times between XX.YY-rc0 and XX.YY-release to minimize the amount of work needed (small batches of API changes) and catch possible issues more early.

liudf0716 commented 4 years ago

@ondrej-fabry thanks maybe it will lead to confusion for newcomer

ondrej-fabry commented 4 years ago

@liudf0716 The requirements to support a particular commit from the VPP master branch comes from other project that collaborate with Ligato. We always inform about changes of VPP compatibility in our CHANGELOG.

liudf0716 commented 4 years ago

@ondrej-fabry Ok, get it thanks!