Skip to content
This repository was archived by the owner on Jul 28, 2021. It is now read-only.

Conversation

@thaJeztah
Copy link
Contributor

@thaJeztah thaJeztah commented Mar 18, 2021

relates to microsoft/hcsshim#973 (comment)

also updated github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3 (linuxkit/virtsock@8e79449...f8cee7d)

Testing locally;

docker build -t opengcs .
docker run --privileged opengcs make -f /go/src/github.com/Microsoft/opengcs/Makefile all test

mv deps/service/gcsutils/gcstools.gomake.new deps/service/gcsutils/gcstools.gomake
mv deps/service/gcs.gomake.new deps/service/gcs.gomake
cc -O2 -Wall  -c -o init/init.o /go/src/github.com/Microsoft/opengcs/init/init.c
cc -O2 -Wall  -c -o vsockexec/vsock.o /go/src/github.com/Microsoft/opengcs/vsockexec/vsock.c
cc -static -s  -o bin/init init/init.o vsockexec/vsock.o
cc -O2 -Wall  -c -o vsockexec/vsockexec.o /go/src/github.com/Microsoft/opengcs/vsockexec/vsockexec.c
cc -static -s  -o bin/vsockexec vsockexec/vsockexec.o vsockexec/vsock.o
CGO_ENABLED=0 go build -ldflags "-s -w"   -o bin/service/gcs.new /go/src/github.com/Microsoft/opengcs//service/gcs
GO="go" /go/src/github.com/Microsoft/opengcs//hack/gomakedeps.sh bin/service/gcs /go/src/github.com/Microsoft/opengcs//service/gcs -ldflags "-s -w"   > deps/service/gcs.godeps.new
mv deps/service/gcs.godeps.new deps/service/gcs.godeps
mv bin/service/gcs.new bin/service/gcs
CGO_ENABLED=0 go build -ldflags "-s -w"   -o bin/service/gcsutils/gcstools.new /go/src/github.com/Microsoft/opengcs//service/gcsutils/gcstools
GO="go" /go/src/github.com/Microsoft/opengcs//hack/gomakedeps.sh bin/service/gcsutils/gcstools /go/src/github.com/Microsoft/opengcs//service/gcsutils/gcstools -ldflags "-s -w"   > deps/service/gcsutils/gcstools.godeps.new
mv deps/service/gcsutils/gcstools.godeps.new deps/service/gcsutils/gcstools.godeps
mv bin/service/gcsutils/gcstools.new bin/service/gcsutils/gcstools
rm -rf rootfs
mkdir -p rootfs/bin/
cp bin/init rootfs/
cp bin/vsockexec rootfs/bin/
cp bin/service/gcs rootfs/bin/
cp bin/service/gcsutils/gcstools rootfs/bin/
for tool in nvidiaPrestartHook; do ln -s gcstools rootfs/bin/$tool; done
git -C /go/src/github.com/Microsoft/opengcs/ rev-parse HEAD > rootfs/gcs.commit && \
git -C /go/src/github.com/Microsoft/opengcs/ rev-parse --abbrev-ref HEAD > rootfs/gcs.branch
tar -zcf out/delta.tar.gz -C rootfs .
rm -rf rootfs
/go/src/github.com/Microsoft/opengcs//hack/catcpio.sh "base.tar.gz" out/delta.tar.gz > out/initrd.img.uncompressed
gzip -c out/initrd.img.uncompressed > out/initrd.img
rm out/initrd.img.uncompressed
rm -rf rootfs-conv
mkdir rootfs-conv
gunzip -c out/initrd.img | (cd rootfs-conv && cpio -imd)
42220 blocks
tar -zcf out/rootfs.tar.gz -C rootfs-conv .
rm -rf rootfs-conv
cd /go/src/github.com/Microsoft/opengcs/ && go test ./service/gcsutils/...
go: downloading github.com/sirupsen/logrus v1.7.0
go: downloading github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
go: extracting github.com/sirupsen/logrus v1.7.0
go: downloading golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
go: extracting github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
go: extracting golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
go: finding github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
go: finding github.com/sirupsen/logrus v1.7.0
go: finding golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
?   	github.com/Microsoft/opengcs/service/gcsutils/gcstools	[no test files]
?   	github.com/Microsoft/opengcs/service/gcsutils/gcstools/commoncli	[no test files]
cd /go/src/github.com/Microsoft/opengcs//service/gcs && ginkgo -r -keepGoing
go: downloading go.opencensus.io v0.22.3
go: downloading github.com/opencontainers/runc v1.0.0-rc93
go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: downloading github.com/mattn/go-shellwords v1.0.6
go: downloading github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
go: downloading github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3
go: downloading github.com/vishvananda/netlink v1.1.0
go: extracting github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: extracting github.com/mattn/go-shellwords v1.0.6
go: downloading github.com/pkg/errors v0.9.1
go: extracting github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3
go: extracting github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
go: downloading github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e
go: extracting github.com/vishvananda/netlink v1.1.0
go: extracting github.com/pkg/errors v0.9.1
go: downloading github.com/docker/go-units v0.4.0
go: extracting go.opencensus.io v0.22.3
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: extracting github.com/docker/go-units v0.4.0
go: extracting github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e
go: extracting github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
go: downloading github.com/godbus/dbus/v5 v5.0.3
go: downloading github.com/coreos/go-systemd/v22 v22.1.0
go: extracting github.com/opencontainers/runc v1.0.0-rc93
go: extracting github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: extracting github.com/godbus/dbus/v5 v5.0.3
go: extracting github.com/coreos/go-systemd/v22 v22.1.0
go: extracting github.com/gogo/protobuf v1.3.2
go: finding go.opencensus.io v0.22.3
go: finding github.com/pkg/errors v0.9.1
go: finding github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
go: finding github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3
go: finding github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: finding github.com/gogo/protobuf v1.3.2
go: finding github.com/vishvananda/netlink v1.1.0
go: finding github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: finding github.com/mattn/go-shellwords v1.0.6
go: finding github.com/opencontainers/runc v1.0.0-rc93
go: finding github.com/coreos/go-systemd/v22 v22.1.0
go: finding github.com/docker/go-units v0.4.0
go: finding github.com/godbus/dbus/v5 v5.0.3

=== RUN   Test_Bridge_Mux_New
--- PASS: Test_Bridge_Mux_New (0.00s)
=== RUN   Test_Bridge_Mux_New_Success
--- PASS: Test_Bridge_Mux_New_Success (0.00s)
=== RUN   TestBridgeMux_Handle_NilHandler_Panic
--- PASS: TestBridgeMux_Handle_NilHandler_Panic (0.00s)
=== RUN   TestBridgeMux_Handle_NilMap_Panic
--- PASS: TestBridgeMux_Handle_NilMap_Panic (0.00s)
=== RUN   Test_Bridge_Mux_Handle_Succeeds
--- PASS: Test_Bridge_Mux_Handle_Succeeds (0.00s)
=== RUN   TestBridgeMux_HandleFunc_NilHandleFunc_Panic
--- PASS: TestBridgeMux_HandleFunc_NilHandleFunc_Panic (0.00s)
=== RUN   TestBridgeMux_HandleFunc_NilMap_Panic
--- PASS: TestBridgeMux_HandleFunc_NilMap_Panic (0.00s)
=== RUN   Test_Bridge_Mux_HandleFunc_Succeeds
--- PASS: Test_Bridge_Mux_HandleFunc_Succeeds (0.00s)
=== RUN   Test_Bridge_Mux_Handler_NilRequest_Panic
--- PASS: Test_Bridge_Mux_Handler_NilRequest_Panic (0.00s)
=== RUN   Test_Bridge_Mux_Handler_NotAdded_Default
--- PASS: Test_Bridge_Mux_Handler_NotAdded_Default (0.00s)
=== RUN   Test_Bridge_Mux_Handler_Added_NotMatched
--- PASS: Test_Bridge_Mux_Handler_Added_NotMatched (0.00s)
=== RUN   Test_Bridge_Mux_Handler_Success
--- PASS: Test_Bridge_Mux_Handler_Success (0.00s)
=== RUN   Test_Bridge_Mux_ServeMsg_NotAdded_Default
--- PASS: Test_Bridge_Mux_ServeMsg_NotAdded_Default (0.00s)
=== RUN   Test_Bridge_Mux_ServeMsg_Added_NotMatched
--- PASS: Test_Bridge_Mux_ServeMsg_Added_NotMatched (0.00s)
=== RUN   Test_Bridge_Mux_ServeMsg_Success
--- PASS: Test_Bridge_Mux_ServeMsg_Success (0.00s)
=== RUN   Test_Bridge_ListenAndServe_UnknownMessageHandler_Success
--- PASS: Test_Bridge_ListenAndServe_UnknownMessageHandler_Success (0.00s)
=== RUN   Test_Bridge_ListenAndServe_CorrectHandler_Success
--- PASS: Test_Bridge_ListenAndServe_CorrectHandler_Success (0.00s)
=== RUN   Test_Bridge_ListenAndServe_HandlersAreAsync_Success
--- PASS: Test_Bridge_ListenAndServe_HandlersAreAsync_Success (0.00s)
PASS

Ginkgo ran 1 suite in 9.498966346s
Test Suite Passed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@dcantah
Copy link
Contributor

dcantah commented Mar 18, 2021

@katiewasnothere @anmaxvl @ambarve @kevpar, can somebody take a quick peek at this. Main motivation is that updating to this containerd version gets rid of our indirect docker dependency. As we're hoping to merge opengcs in hcsshim we'd also bring this along indirectly. k8s vendors hcsshim and they've gone through a lot to try and get rid of this dependency

Copy link

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too. Sorry, I took a look earlier and then got distracted looking into the recent runc update haha

@katiewasnothere katiewasnothere merged commit b72a022 into microsoft:master Mar 18, 2021
@thaJeztah thaJeztah deleted the bump_deps branch March 18, 2021 23:09
@thaJeztah
Copy link
Contributor Author

no worries, thanks for reviewing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants