Code Monkey home page Code Monkey logo

Comments (6)

sbezverk avatar sbezverk commented on August 22, 2024

Please see this for details:
ligato/cn-infra#312

from vpp-agent.

ondrej-fabry avatar ondrej-fabry commented on August 22, 2024

The vpp-agent, both master and pantheon-dev already have cn-infra released just few days ago.

How did you come to a conslusion that it's not there?

Gopkg.toml describing cn-infra dependency:
https://github.com/ligato/vpp-agent/blob/master/Gopkg.toml#L39

Part that checks for socket type:
https://github.com/ligato/vpp-agent/blob/master/vendor/github.com/ligato/cn-infra/rpc/grpc/listen_and_serve.go#L50

What is the version of vpp-agent you are running? Are you sure it's the latest one?

from vpp-agent.

sbezverk avatar sbezverk commented on August 22, 2024

@ondrej-fabry

commit 2e3a708ce83c7ac6a8228a55a8fe2ad1222ed1c9 (HEAD -> master, tag: v1.4.1, origin/master, origin/HEAD)
Merge: f8744581 90d66b84
Author: Ondrej Fabry <[email protected]>
Date:   Mon Jun 11 12:26:26 2018 +0200

    Merge pull request #681 from VladoLavor/release-1.4.1
    
    version 1.4.1 changelog

When I look at this tag's version of grpc listen_and_serve.go which is stored in vendor, it differs a lot from the master of cn-infra.
It is missing completely unix socket support.

from vpp-agent.

sbezverk avatar sbezverk commented on August 22, 2024

Here is what I currently see:

sbezverk@kube-4:~/developing/go/src/github.com/ligato/vpp-agent$ cat vendor/github.com/ligato/cn-infra/rpc/grpc/listen_and_serve.go
// Copyright (c) 2017 Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package grpc

import (
        "io"
        "net"
        "time"

        "google.golang.org/grpc"
)

// ListenAndServe is a function that uses <config> & <handler> to handle
// GRPC Requests.
// It return an instance of io.Closer to close the Server (net listener) during cleanup.
type ListenAndServe func(config Config, grpcServer *grpc.Server) (
        netListener io.Closer, err error)

// FromExistingServer is used mainly for testing purposes
func FromExistingServer(listenAndServe ListenAndServe) *Plugin {
        return &Plugin{listenAndServe: listenAndServe}
}

// ListenAndServeGRPC starts a netListener.
func ListenAndServeGRPC(config *Config, grpcServer *grpc.Server) (netListener net.Listener, err error) {
        netListener, err = net.Listen("tcp", config.Endpoint)
        if err != nil {
                return nil, err
        }

        var errCh chan error
        go func() {
                if err := grpcServer.Serve(netListener); err != nil {
                        errCh <- err
                } else {
                        errCh <- nil
                }
        }()

        select {
        case err := <-errCh:
                return nil, err
                // Wait 100ms to create a new stream, so it doesn't bring too much
                // overhead when retry.
        case <-time.After(100 * time.Millisecond):
                //everything is probably fine
                return netListener, nil
        }
}

from vpp-agent.

ondrej-fabry avatar ondrej-fabry commented on August 22, 2024

v1.4.1 was released on June 11th. Latest version is v1.5, please use that.

Find the latest here always: https://github.com/ligato/vpp-agent/releases/latest

from vpp-agent.

ondrej-fabry avatar ondrej-fabry commented on August 22, 2024

Closing this issue for now, if you still have some problems with new version please open new issue.

from vpp-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.