Skip to content

Commit 08cf7df

Browse files
Merge pull request #8 from projectcalico/fix
Fix generate_binapi script & go.sum
2 parents b78314f + 775ab16 commit 08cf7df

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H7
425425
github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58=
426426
github.com/lunixbochs/struc v0.0.0-20190916212049-a5c72983bc42 h1:PzBD7QuxXSgSu61TKXxRwVGzWO5d9QZ0HxFFpndZMCg=
427427
github.com/lunixbochs/struc v0.0.0-20190916212049-a5c72983bc42/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg=
428+
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 h1:EnfXoSqDfSNJv0VBNqY/88RNnhSGYkrHaO0mmFGbVsc=
429+
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg=
428430
github.com/magiconair/properties v1.7.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
429431
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
430432
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=

vpp-manager/main.go

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import (
2929
"syscall"
3030
"time"
3131

32-
"github.com/projectcalico/vpp-dataplane/vpplink"
33-
"github.com/projectcalico/vpp-dataplane/vpplink/types"
3432
"github.com/pkg/errors"
3533
calicoapi "github.com/projectcalico/libcalico-go/lib/apis/v3"
3634
calicocli "github.com/projectcalico/libcalico-go/lib/clientv3"
3735
calicoopts "github.com/projectcalico/libcalico-go/lib/options"
36+
"github.com/projectcalico/vpp-dataplane/vpplink"
37+
"github.com/projectcalico/vpp-dataplane/vpplink/types"
3838
log "github.com/sirupsen/logrus"
3939
"github.com/vishvananda/netlink"
4040
)
@@ -961,40 +961,45 @@ func clearVppManagerFiles() error {
961961
return writeFile("-1", VppManagerTapIdxFile)
962962
}
963963

964-
func setCorePattern() {
964+
func setCorePattern() error {
965965
if params.corePattern == "" {
966-
return
966+
return nil
967967
}
968968
log.Infof("Setting corePattern to : %s", params.corePattern)
969969
err := writeFile(params.corePattern, "/proc/sys/kernel/core_pattern")
970970
if err != nil {
971-
log.Errorf("Error writing corePattern: %+v", err)
971+
return errors.Wrap(err, "Error writing corePattern")
972972
}
973+
return nil
973974
}
974975

975976
func main() {
976977
vppDeadChan = make(chan bool, 1)
977978
vppAlive = false
978979

979-
/* Run this first in case this is a script
980-
* that's responsible for creating a VF */
981-
err := generateVppConfigExecFile()
980+
err := parseEnvVariables()
982981
if err != nil {
983-
log.Errorf("Error generating VPP config Exec: %s", err)
982+
log.Errorf("Error parsing env varibales: %+v", err)
984983
return
985984
}
986-
987985
err = clearVppManagerFiles()
988986
if err != nil {
989987
log.Errorf("Error clearing config files: %+v", err)
990988
return
991989
}
992-
err = parseEnvVariables()
990+
/* Run this before getLinuxConfig() in case this is a script
991+
* that's responsible for creating the interface */
992+
err = generateVppConfigExecFile()
993993
if err != nil {
994-
log.Errorf("Error parsing env varibales: %+v", err)
994+
log.Errorf("Error generating VPP config Exec: %s", err)
995+
return
996+
}
997+
998+
err = setCorePattern()
999+
if err != nil {
1000+
log.Errorf("Error setting core pattern: %s", err)
9951001
return
9961002
}
997-
setCorePattern()
9981003

9991004
err = configureContainer()
10001005
if err != nil {

vpplink/binapi/generate_binapi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function update_version_number ()
107107

108108
if [[ x$RESP = xyes ]]; then
109109
find . -path ./binapi -prune -o -name '*.go' \
110-
-exec sed -i '[email protected]/calico-vpp/vpplink/binapi/[.~0-9a-z_-]*/'"@github.com/calico-vpp/vpplink/binapi/$VPP_VERSION/@g" {} \;
110+
-exec sed -i '[email protected]/projectcalico/vpp-dataplane/vpplink/binapi/[.~0-9a-z_-]*/'"@github.com/projectcalico/vpp-dataplane/vpplink/binapi/$VPP_VERSION/@g" {} \;
111111
fi
112112
}
113113

0 commit comments

Comments
 (0)