Skip to content

Instantly share code, notes, and snippets.

@stanislav-chlebec
stanislav-chlebec / gist:3042a0eeb56819aea8217dfaf5e60647
Created October 30, 2019 13:09
Cross platform compiling of VPP on x86_64 (target aarch64)
vagrant@ubuntu-bionic:~/vpp$ git log -1
commit 7977e4efc8116caf790a0cc254defec81712b291 (HEAD)
Author: juraj.linkes <juraj.linkes@pantheon.tech>
Date: Fri Aug 2 16:47:36 2019 +0200
ebuild: Cross compilation aarch64 Ubuntu support
Rework the build system to support cross compilation:
- Use the PLATFORM variable to specify target platform
- Target platforms defined in build-data/platforms/$(PLATFORM).mk
@stanislav-chlebec
stanislav-chlebec / gist:d9f01a43cd70fe9cc6689ab522f32540
Created October 15, 2019 07:30
contiv/vpp vswitch crashing VPP
stanislav@adam:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
contivvpp/vswitch-arm64 v3.3.1-90-gd936d4045 650fc0f9766f 16 hours ago 306MB
contivvpp/dev-vswitch-arm64 v3.3.1-90-gd936d4045 923adb5e8b9f 16 hours ago 3.67GB
contivvpp/dev-vswitch-arm64 v3.3.1-90-gd936d4045-f4dcae4164f93dac80d4af19af0ee20e712ec673 923adb5e8b9f 16 hours ago 3.67GB
contivvpp/vpp-binaries-arm64 f4dcae4164f93dac80d4af19af0ee20e712ec673 90426e623e62 16 hours ago 102MB
contivvpp/vpp-arm64 f4dcae4164f93dac80d4af19af0ee20e712ec673 6ec12b3fef4b 16 hours ago 2.86GB
contivvpp/ui-arm64 v3.3.1-90-gd936d4045 c23d655
stanislav@adam:~/work/contiv/vpp/k8s/contiv-vpp$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system contiv-crd-zrn5n 1/1 Running 0 11m
kube-system contiv-etcd-0 1/1 Running 0 11m
kube-system contiv-ksr-psp6n 1/1 Running 0 11m
kube-system contiv-vswitch-hw65s 0/1 CrashLoopBackOff 6 11m
kube-system coredns-5644d7b6d9-dzlqm 0/1 Completed 1 3d4h
kube-system coredns-5644d7b6d9-rkqsx 0/1 Completed 1 3d4h
kube-system etcd-adam 1/1 Running 0 3d4h
stanislav@ArmDev:~/go/src/github.com/ligato/vpp-agent$ DOCKER_ARGS="-e INITIAL_LOGLVL=debug" VPP_IMG=ligato/vpp-base:19.08 ./tests/integration/vpp_integration.sh -test.v -test.run TestBd
=============================================================
VPP Integration Test - 19.08-rc2~6-g6bde1f4cd~b31
=============================================================
time="2019-08-20 06:54:28.84069" level=debug msg="initial log level: debug" loc="logrus/registry.go(39)" logger=defaultLogger
=== RUN TestBd
time="2019-08-20 06:54:29.20190" level=debug msg="version 19.01 not compatible: unknown message: \"show_threads_reply_6942fb35\"" loc="logging/log_api.go(37)" logger=defaultLogger
time="2019-08-20 06:54:29.20195" level=debug msg="version 19.04 not compatible: unknown message: \"show_threads_reply_6942fb35\"" loc="logging/log_api.go(37)" logger=defaultLogger
time="2019-08-20 06:54:29.20198" level=debug msg="found compatible version:19.08" loc="logging/log_api.go(34)" logger=defaultLogger
--- FAIL: TestBd (0.41s)
https://play.golang.org/p/D40ir_eZ3f1
stanislav@ArmDev:~/go/src/github.com/ligato/vpp-agent$ VPP_IMG=ligato/vpp-base:19.08 ./tests/integration/vpp_integration.sh -test.v -test.run TestBd
=============================================================
VPP Integration Test - 19.08-rc2~4-g62e4d8422~b29
=============================================================
=== RUN TestBd
stanislav@vppagent:~$
stanislav@vppagent:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
contivvpp/ui-arm64 latest 824b36d0b5ab 4 days ago 12.3MB
contivvpp/ui-arm64 v3.1.0-108-g41fe7d01e 824b36d0b5ab 4 days ago 12.3MB
contivvpp/stn-arm64 latest 25e74f240a83 4 days ago 9.78MB
contivvpp/stn-arm64 v3.1.0-108-g41fe7d01e 25e74f240a83 4 days ago 9.78MB
contivvpp/ksr-arm64 latest b058f1d0779a 4 days ago 28.6MB
stanislav@test:~/work/networkservicemesh$
stanislav@test:~/work/networkservicemesh$ uname -a
Linux test 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
stanislav@test:~/work/networkservicemesh$
stanislav@test:~/work/networkservicemesh$
stanislav@test:~/work/networkservicemesh$ git log -n1
commit c14e85eca1997269f7f9f2d981f4cf1677763168 (HEAD -> arm64_cross_build, chlebec/arm64_cross_build)
Author: Stanislav Chlebec <stanislav.chlebec@pantheon.tech>
Date: Tue Jun 25 15:52:13 2019 +0200
@stanislav-chlebec
stanislav-chlebec / gist:310882e66f6fcfc62eaeba5ab55fcb77
Created June 19, 2019 09:39
List of typical errors (while running the integration tests with arm64 docker images built on x86_64 )
I encountered these errors while running the integration tests with arm64 docker images built on x86_64 (cross build - go native arm64 build support combined with using qemu-aarch64-static)
This is processed list of errors - trying to eliminate duplicates
http://147.75.83.101:8080/view/NSM/job/N13%20make%20k8s-integration-tests/46/consoleText
n2019-06-19 08:39:12,785 DEBG 'vppagent-dataplane' stdout output: n2019/06/19 08:39:12 Reporting span 5bddd9895b122d72:5bddd9895b122d72:0:1 ntime= "2019-06-19T08:39:12Z " level=info msg= "Finished resetting vppagent... " n n2019-06-19 08:39:12,786 DEBG 'vppagent-dataplane' stdout output: ntime= "2019-06-19T08:39:12Z " level=info msg= "Waiting for liveness probe: tcp:localhost:9111 " n n2019-06-19 08:39:12,789 DEBG 'vppagent-dataplane' stdout output: ntime= "2019-06-19T08:39:12Z " level=info msg= "Setting up Mgmt Interface update:<vpp_config:<interfaces:<name: "mgmt " type:AF_PACKET enabled:true phys_address: "02:bb:98:c3:7f:96 " ip_addresses: "10.32.0.4/12
@stanislav-chlebec
stanislav-chlebec / gist:ba1dc6268a34d6c614d4408b0e61d47a
Created March 18, 2019 10:50
Pinging between two instance of VPP AGENT
(env) stanislav@contivvpp:~/work/ligato/vpp-agent$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
17d51b080797 ligato/vpp-agent-arm64:v2.0.0-beta-190-g19f3215d "bash" 2 minutes ago Up 2 minutes 0.0.0.0:9197->9191/tcp node_3
803a471b3d5d ligato/vpp-agent-arm64:v2.0.0-beta-190-g19f3215d "bash" 2 minutes ago Up 2 minutes 0.0.0.0:9196->9191/tcp node_2
8cd3cc2cf17c ligato/vpp-agent-arm64:v2.0.0-beta-190-g19f3215d "bash" 2 minutes ago Up 2 minutes 0.0.0.0:9195->9191/tcp node_1
b140243f398e ligato/vpp-agent-arm64:v2.0.0-beta-190-g19f3215d "/bin/sh -c 'rm -f /…" 3 minutes ago Up 3 minutes 0.0.0.0:9191->9191/tcp, 0.0.0.0:5001->5002/tcp agent_vpp_1
(env) stanislav@vppagent:~/work/ligato/vpp-agent$ ./pybot -v VARIABLES:arm64_local tests/robot/suites/crud/afpacket_crud.robot
==============================================================================
Afpacket Crud
==============================================================================
/home/stanislav/work/ligato/vpp-agent/env/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
m.add_string(self.Q_C.public_numbers().encode_point())
/home/stanislav/work/ligato/vpp-agent/env/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurve