Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qfix: Update to latest sdks #334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/edwarnicke/exechelper v1.0.2
github.com/edwarnicke/grpcfd v0.1.1
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f
github.com/networkservicemesh/sdk-k8s v0.0.0-20211102193828-c29ab6e0f743
github.com/networkservicemesh/sdk-sriov v0.0.0-20211102191041-14443e9017ce
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a
github.com/networkservicemesh/sdk v0.5.1-0.20211117074913-f62d80574fd5
github.com/networkservicemesh/sdk-k8s v0.0.0-20211117075428-eeccde1d290a
github.com/networkservicemesh/sdk-sriov v0.0.0-20211117213205-b1980f419277
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.7.0
github.com/spiffe/go-spiffe/v2 v2.0.0-alpha.4.0.20200528145730-dc11d0c74e85
Expand Down
35 changes: 19 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -318,17 +318,16 @@ github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1t
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.10.0/go.mod h1:0jEuBXKauB1HHJswHM/lx05K48TJ1Yxj6VIfM4k+aB4=
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e h1:PO6tDo/bGLJqz1qiqCecht/HqMWCKunAds2U9Hvc0yM=
github.com/networkservicemesh/api v1.0.1-0.20210907194827-9a36433d7d6e/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20211102190503-0fcccf3562a8/go.mod h1:Y9dl3Y4VS+g5oIGQCr3n8fIDQmrPBxi2MD9Yz8ouCKA=
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f h1:eukVjhE/VfbWFBIyCdEAavJ0I1Rn35xD2FQNVuSALqk=
github.com/networkservicemesh/sdk v0.5.1-0.20211102193303-a94a249e2f5f/go.mod h1:Y9dl3Y4VS+g5oIGQCr3n8fIDQmrPBxi2MD9Yz8ouCKA=
github.com/networkservicemesh/sdk-k8s v0.0.0-20211102193828-c29ab6e0f743 h1:m9spPqaJSec5s0SThcyQNS9n3BAZzaJAgIc2jQgYQ38=
github.com/networkservicemesh/sdk-k8s v0.0.0-20211102193828-c29ab6e0f743/go.mod h1:X3Yg2R7IuS3JwMKLpMF6hRqs382A+mLDXZOfQtgHrTI=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211102190724-e38e38ca3d04 h1:78CQjp5PeGSdHob18zkIz1YgS9z6N7yeyFSr1zcZ8yE=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211102190724-e38e38ca3d04/go.mod h1:ra50zW0cNeSWPKFhMSUZisfK/9hBeaWHa9RLQKs7IH4=
github.com/networkservicemesh/sdk-sriov v0.0.0-20211102191041-14443e9017ce h1:LzM86NksQ9VfiU7ZPg72u+8LtqPgYKd4vFqV4JhCyk0=
github.com/networkservicemesh/sdk-sriov v0.0.0-20211102191041-14443e9017ce/go.mod h1:sjE8DN8LZTU4ACwJkEHmVtsirL7q3iy3orw7Av513/8=
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a h1:gSujYHmGiOpJyzPGZdW2ymMpmDHCMBdbUMXCVzOtrh8=
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20211117074913-f62d80574fd5 h1:Ef5fjrCWe2Z9TYzrDPrsAsQ0FV9qdplaC6znZC1PhK0=
github.com/networkservicemesh/sdk v0.5.1-0.20211117074913-f62d80574fd5/go.mod h1:9ZCaoauLu+52PLj/BXnYH5w9Pk9jdhaeMA14zb0PUxA=
github.com/networkservicemesh/sdk-k8s v0.0.0-20211117075428-eeccde1d290a h1:qUUqV4mXe92z+/9Sdim8BW1G4Nq0/4EcE53sST/0XHg=
github.com/networkservicemesh/sdk-k8s v0.0.0-20211117075428-eeccde1d290a/go.mod h1:ddvupPgVSVn1Wyp6eFQTOs1FucI58ZkqAFeCDJMlpSk=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211117075134-67cd16f0d5c7 h1:p6NE8a+lMDC5n1c9WiiPmyxj/Z1y0zORfIKSeEQIOF4=
github.com/networkservicemesh/sdk-kernel v0.0.0-20211117075134-67cd16f0d5c7/go.mod h1:sOyzzsFfS7/vO4YmNahIwNFB8PDxJZHoKiwd/PmxPJ0=
github.com/networkservicemesh/sdk-sriov v0.0.0-20211117213205-b1980f419277 h1:FzDi+Ogpm6GMlx8AupMuiPlw8RyKYmZpg2YLJQZ6vDw=
github.com/networkservicemesh/sdk-sriov v0.0.0-20211117213205-b1980f419277/go.mod h1:3/Fucpztn8a0jBk/JIFCLBG5rjkfwrsbFeN61G1DpZY=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
Expand Down Expand Up @@ -446,6 +445,7 @@ github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b/go.mo
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zeebo/errs v1.2.2 h1:5NFypMTuSdoySVTqlNs1dEoU21QVamMQJxW/Fii5O7g=
github.com/zeebo/errs v1.2.2/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
Expand Down Expand Up @@ -558,8 +558,9 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -624,8 +625,9 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down Expand Up @@ -684,8 +686,9 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion internal/imports/imports_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
_ "github.com/networkservicemesh/sdk-k8s/pkg/tools/k8stest/podresources"
_ "github.com/networkservicemesh/sdk-k8s/pkg/tools/podresources"
_ "github.com/networkservicemesh/sdk-k8s/pkg/tools/socketpath"
_ "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/xconnectns"
_ "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/forwarder"
_ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/config"
_ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/pci"
_ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource"
Expand Down
12 changes: 7 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
registryapi "github.com/networkservicemesh/api/pkg/api/registry"
k8sdeviceplugin "github.com/networkservicemesh/sdk-k8s/pkg/tools/deviceplugin"
k8spodresources "github.com/networkservicemesh/sdk-k8s/pkg/tools/podresources"
"github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/xconnectns"
forwarder "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/forwarder"
sriovconfig "github.com/networkservicemesh/sdk-sriov/pkg/sriov/config"
"github.com/networkservicemesh/sdk-sriov/pkg/sriov/pci"
"github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource"
Expand All @@ -62,8 +62,9 @@ import (
// Config - configuration for cmd-forwarder-sriov
type Config struct {
Name string `default:"sriov-forwarder" desc:"name of Endpoint"`
NSName string `default:"sriovns" desc:"Name of Network Service to Register with Registry"`
NSName string `default:"forwarder" desc:"Name of Network Service to Register with Registry"`
ConnectTo url.URL `default:"unix:///var/lib/networkservicemesh/nsm.io.sock" desc:"URL to connect to" split_words:"true"`
DialTimeout time.Duration `default:"50ms" desc:"Timeout for the dial the next endpoint" split_words:"true"`
MaxTokenLifetime time.Duration `default:"10m" desc:"maximum lifetime of tokens" split_words:"true"`
ResourcePollTimeout time.Duration `default:"30s" desc:"device plugin polling timeout" split_words:"true"`
DevicePluginPath string `default:"/var/lib/kubelet/device-plugins/" desc:"path to the device plugin directory" split_words:"true"`
Expand Down Expand Up @@ -123,7 +124,7 @@ func main() {
log.FromContext(ctx).Infof("5: retrieve spiffe svid")
log.FromContext(ctx).Infof("6: create sriovns network service endpoint")
log.FromContext(ctx).Infof("7: create grpc server and register sriovns")
log.FromContext(ctx).Infof("8: register xconnectns with the registry")
log.FromContext(ctx).Infof("8: register forwarder with the registry")
log.FromContext(ctx).Infof("a final success message with start time duration")

// ********************************************************************************
Expand Down Expand Up @@ -201,7 +202,7 @@ func main() {
// ********************************************************************************
log.FromContext(ctx).Infof("executing phase 6: create sriovns network service endpoint (time since start: %s)", time.Since(starttime))
// ********************************************************************************
endpoint := xconnectns.NewServer(
endpoint := forwarder.NewServer(
ctx,
config.Name,
authorize.NewServer(),
Expand All @@ -211,6 +212,7 @@ func main() {
sriovConfig,
config.VFIOPath, config.CgroupPath,
&config.ConnectTo,
config.DialTimeout,
grpc.WithTransportCredentials(
grpcfd.TransportCredentials(
credentials.NewTLS(tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())),
Expand Down Expand Up @@ -261,7 +263,7 @@ func main() {
),
)

nseRegistryClient := registryclient.NewNetworkServiceEndpointRegistryInterposeClient(ctx, &config.ConnectTo, registryclient.WithDialOptions(clientOptions...))
nseRegistryClient := registryclient.NewNetworkServiceEndpointRegistryClient(ctx, &config.ConnectTo, registryclient.WithDialOptions(clientOptions...))
_, err = nseRegistryClient.Register(ctx, &registryapi.NetworkServiceEndpoint{
Name: config.Name,
NetworkServiceNames: []string{config.NSName},
Expand Down
6 changes: 3 additions & 3 deletions suite_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ func (f *ForwarderTestSuite) SetupSuite() {
})
f.Require().NoError(err)

regEndpoint, err := recv.Recv()
nseResp, err := recv.Recv()
f.Require().NoError(err)
log.FromContext(ctx).Infof("Received regEndpoint: %+v (time since start: %s)", regEndpoint, time.Since(starttime))
log.FromContext(ctx).Infof("Received regEndpoint: %+v (time since start: %s)", nseResp, time.Since(starttime))

// ********************************************************************************
log.FromContext(f.ctx).Infof("Creating grpc.ClientConn to SUT (time since start: %s)", time.Since(starttime))
// ********************************************************************************
clientCreds := credentials.NewTLS(tlsconfig.MTLSClientConfig(f.x509source, f.x509bundle, tlsconfig.AuthorizeAny()))
clientCreds = grpcfd.TransportCredentials(clientCreds)
f.sutCC, err = grpc.DialContext(f.ctx,
regEndpoint.GetUrl(),
nseResp.GetNetworkServiceEndpoint().GetUrl(),
grpc.WithTransportCredentials(clientCreds),
grpc.WithBlock(),
)
Expand Down