From 3187403c9eed1c99ca01edbac0312a604f307408 Mon Sep 17 00:00:00 2001 From: Nitin Garg Date: Thu, 22 Jun 2023 18:04:38 +0530 Subject: [PATCH] Upgrade to go version 1.20.5 (#1196) Brief list of changes * Changes gcsfuse binary to be statically-linked, removes dependency on libc. * Prefixed/exported CGO_ENABLED=0 for every go build|run|test for every gcsfuse program * Replaced all golang:1.20.4 based base images to corresponding golang:1.20.5 based images in all docker files and all docker run commands * Updated golang 1.20.4 dependencies to golang 1.20.5 * Updated troubleshooting guide * Replaced os.user.Current() with os.Getuid() and os.Getgid() to remove dependency on glibc * Added unit tests for perms.go --- .github/workflows/ci.yml | 4 +- Dockerfile | 2 +- docs/troubleshooting.md | 2 +- go.mod | 6 +- go.sum | 6 ++ internal/perms/perms.go | 32 +++------- internal/perms/perms_test.go | 63 +++++++++++++++++++ .../scripts/compare_fuse_types_using_fio.py | 2 +- .../continuous_test/gcp_ubuntu/build.sh | 6 +- .../ml_tests/pytorch/dino/setup_container.sh | 5 +- .../ml_tests/run_image_recognition_models.py | 2 +- perfmetrics/scripts/ml_tests/setup.sh | 2 +- .../resnet/setup_scripts/setup_container.sh | 4 +- .../presubmit_test/pr_perf_test/build.sh | 10 +-- tools/build_gcsfuse/main.go | 1 + tools/cd_scripts/e2e_test.sh | 2 +- tools/containerize_gcsfuse_docker/Dockerfile | 2 +- .../run_tests_mounted_directory.sh | 1 + tools/package_gcsfuse_docker/Dockerfile | 2 +- 19 files changed, 107 insertions(+), 47 deletions(-) create mode 100644 internal/perms/perms_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd15dcadea..3b70fc7263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,11 +26,11 @@ jobs: run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse-dev - name: Build run: | - go build ./... + CGO_ENABLED=0 go build ./... go install ./tools/build_gcsfuse build_gcsfuse . /tmp ${GITHUB_SHA} - name: Test - run: go test -p 1 -count 1 -v -cover ./... + run: CGO_ENABLED=0 go test -p 1 -count 1 -v -cover ./... lint: name: Lint runs-on: ubuntu-20.04 diff --git a/Dockerfile b/Dockerfile index cb12d822db..62dd0aee4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ # Mount the gcsfuse to /mnt/gcs: # > docker run --privileged --device /fuse -v /mnt/gcs:/gcs:rw,rshared gcsfuse -FROM golang:1.20.4-alpine as builder +FROM golang:1.20.5-alpine as builder RUN apk add git diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4015dd11a2..eebc50746a 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -6,7 +6,7 @@ This page enumerates some common user facing issues around GCSFuse and also disc | Generic Mounting Issue | Most of the common mount point issues are around permissions on both local mount point and the Cloud Storage bucket. It is highly recommended to retry with --foreground --debug_fuse --debug_fs --debug_gcs --debug_http flags which would provide much more detailed logs to understand the errors better and possibly provide a solution. | | Mount successful but files not visible | Try mounting the gcsfuse with --implicit-dir flag. Read the [semantics](https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/semantics.md) to know the reasoning. | | Mount failed with fusermount3 exit status 1 | It comes when the bucket is already mounted in a folder and we try to mount it again. You need to unmount first and then remount. | -| Mount failed with error: Current requires cgo or $USER set in environment | It comes when we try mounting by building the gcsfuse codebase. To fix this, build the gcsfuse package by enabling the CGO_ENABLED flag in the go env and then mount back.
  1. Check the current value using - ```go env``` command.
  2. If it is unset, set this using - ```export CGO_ENABLED=1``` command.
| +| version `GLIBC_x.yz` not found | GCSFuse should not be linking to glibc. Please either `export CGO_ENABLED=0` in your environment or prefix `CGO_ENABLED=0` to any `go build\|run\|test` commands that you're invoking. | | Mount get stuck with error: DefaultTokenSource: google: could not find default credentials | Run ```gcloud auth application-default login``` command to fetch default credentials to the VM. This will fetch the credentials to the following locations:
  1. For linux - $HOME/.config/gcloud/application_default_credentials.json
  2. For windows - %APPDATA%/gcloud/applicateion_default_credentials.json
| | Input/Output Error | It’s a generic error, but the most probable culprit is the bucket not having the right permission for Cloud Storage FUSE to operate on. Ref - [here](https://stackoverflow.com/questions/36382704/gcsfuse-input-output-error) | | Generic NO_PUBKEY Error - while installing Cloud Storage FUSE on ubuntu 22.04 | It happens while running - ```sudo apt-get update``` - working on installing Cloud Storage FUSE. You just have to add the pubkey you get in the error using the below command: ```sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ``` And then try running ```sudo apt-get update``` | diff --git a/go.mod b/go.mod index 388019c9a2..c00e9393f8 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 github.com/urfave/cli v1.22.5 go.opencensus.io v0.24.0 - golang.org/x/net v0.8.0 + golang.org/x/net v0.12.0 golang.org/x/oauth2 v0.6.0 google.golang.org/api v0.111.0 ) @@ -53,8 +53,8 @@ require ( github.com/sirupsen/logrus v1.9.0 // indirect github.com/stretchr/testify v1.8.2 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect diff --git a/go.sum b/go.sum index fee96d3e3c..29176b26ac 100644 --- a/go.sum +++ b/go.sum @@ -368,6 +368,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= 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= @@ -455,6 +457,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -470,6 +474,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/internal/perms/perms.go b/internal/perms/perms.go index 42834a2c9b..067469bebd 100644 --- a/internal/perms/perms.go +++ b/internal/perms/perms.go @@ -17,35 +17,23 @@ package perms import ( "fmt" - "os/user" - "strconv" + "os" ) // MyUserAndGroup returns the UID and GID of this process. -func MyUserAndGroup() (uid uint32, gid uint32, err error) { - // Ask for the current user. - user, err := user.Current() - if err != nil { - err = fmt.Errorf("Fetching current user: %w", err) - return - } - - // Parse UID. - uid64, err := strconv.ParseUint(user.Uid, 10, 32) - if err != nil { - err = fmt.Errorf("Parsing UID (%s): %w", user.Uid, err) - return - } +func MyUserAndGroup() (uid, gid uint32, err error) { + // An improvement idea is to invoke os.current.User() and use its partial output + // even when the call itself returned error. + signed_uid := os.Getuid() + signed_gid := os.Getgid() - // Parse GID. - gid64, err := strconv.ParseUint(user.Gid, 10, 32) - if err != nil { - err = fmt.Errorf("Parsing GID (%s): %w", user.Gid, err) + if signed_gid == -1 || signed_uid == -1 { + err = fmt.Errorf("failed to get uid/gid. UID = %d, GID = %d", signed_uid, signed_gid) return } - uid = uint32(uid64) - gid = uint32(gid64) + uid = uint32(signed_uid) + gid = uint32(signed_gid) return } diff --git a/internal/perms/perms_test.go b/internal/perms/perms_test.go new file mode 100644 index 0000000000..625d67b626 --- /dev/null +++ b/internal/perms/perms_test.go @@ -0,0 +1,63 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// 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. + +// System permissions-related code unit tests. +package perms_test + +import ( + "syscall" + "testing" + + "github.com/googlecloudplatform/gcsfuse/internal/perms" + . "github.com/jacobsa/ogletest" +) + +func TestPerms(t *testing.T) { RunTests(t) } + +//////////////////////////////////////////////////////////////////////// +// Boilerplate +//////////////////////////////////////////////////////////////////////// + +type PermsTest struct { +} + +var _ SetUpInterface = &PermsTest{} +var _ TearDownInterface = &PermsTest{} + +func init() { RegisterTestSuite(&PermsTest{}) } + +func (t *PermsTest) SetUp(ti *TestInfo) { +} + +func (t *PermsTest) TearDown() { +} + +//////////////////////////////////////////////////////////////////////// +// Tests +//////////////////////////////////////////////////////////////////////// + +func (t *PermsTest) Default() { + _, _, err := perms.MyUserAndGroup() + ExpectEq(err, nil) +} + +func (t *PermsTest) ChangedUidGid() { + new_uid, new_gid := 111, 117 + if err1, err2 := syscall.Setuid(new_uid), syscall.Setgid(new_gid); err1 == nil && err2 == nil { + uid, gid, err := perms.MyUserAndGroup() + ExpectEq(uid, new_uid) + ExpectEq(gid, new_gid) + ExpectEq(err, nil) + } +} diff --git a/perfmetrics/scripts/compare_fuse_types_using_fio.py b/perfmetrics/scripts/compare_fuse_types_using_fio.py index 513baa6b31..bb1ad1d7a2 100644 --- a/perfmetrics/scripts/compare_fuse_types_using_fio.py +++ b/perfmetrics/scripts/compare_fuse_types_using_fio.py @@ -61,7 +61,7 @@ def _install_gcsfuse_source(gcs_bucket, gcsfuse_flags) -> None: os.system(f'''git clone {GCSFUSE_REPO} mkdir gcs cd gcsfuse - go run . {gcsfuse_flags} {gcs_bucket} ../gcs + CGO_ENABLED=0 go run . {gcsfuse_flags} {gcs_bucket} ../gcs cd .. ''') diff --git a/perfmetrics/scripts/continuous_test/gcp_ubuntu/build.sh b/perfmetrics/scripts/continuous_test/gcp_ubuntu/build.sh index 3886b08a20..324c9207a9 100644 --- a/perfmetrics/scripts/continuous_test/gcp_ubuntu/build.sh +++ b/perfmetrics/scripts/continuous_test/gcp_ubuntu/build.sh @@ -6,8 +6,8 @@ echo "Installing git" sudo apt-get install git echo "Installing pip" sudo apt-get install pip -y -echo "Installing go-lang 1.20.4" -wget -O go_tar.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz +echo "Installing go-lang 1.20.5" +wget -O go_tar.tar.gz https://go.dev/dl/go1.20.5.linux-amd64.tar.gz sudo rm -rf /usr/local/go && tar -xzf go_tar.tar.gz && sudo mv go /usr/local export PATH=$PATH:/usr/local/go/bin echo "Installing fio" @@ -28,7 +28,7 @@ commitId=$(git log --before='yesterday 23:59:59' --max-count=1 --pretty=%H) git checkout $commitId echo "Executing integration tests" -GODEBUG=asyncpreemptoff=1 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=gcsfuse-integration-test +GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=gcsfuse-integration-test # Checkout back to master branch to use latest CI test scripts in master. git checkout master diff --git a/perfmetrics/scripts/ml_tests/pytorch/dino/setup_container.sh b/perfmetrics/scripts/ml_tests/pytorch/dino/setup_container.sh index 1af6bd1f55..be82b16994 100644 --- a/perfmetrics/scripts/ml_tests/pytorch/dino/setup_container.sh +++ b/perfmetrics/scripts/ml_tests/pytorch/dino/setup_container.sh @@ -1,13 +1,14 @@ #!/bin/bash -wget -O go_tar.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz +# Install golang +wget -O go_tar.tar.gz https://go.dev/dl/go1.20.5.linux-amd64.tar.gz rm -rf /usr/local/go && tar -C /usr/local -xzf go_tar.tar.gz export PATH=$PATH:/usr/local/go/bin # Clone and build the gcsfuse master branch. git clone https://github.com/GoogleCloudPlatform/gcsfuse.git cd gcsfuse -go build . +CGO_ENABLED=0 go build . cd - # Create a directory for gcsfuse logs diff --git a/perfmetrics/scripts/ml_tests/run_image_recognition_models.py b/perfmetrics/scripts/ml_tests/run_image_recognition_models.py index 9ceaf7e5ca..34675cccc3 100644 --- a/perfmetrics/scripts/ml_tests/run_image_recognition_models.py +++ b/perfmetrics/scripts/ml_tests/run_image_recognition_models.py @@ -105,7 +105,7 @@ def _run_from_source(gcs_bucket, data_directory_name) -> None: os.system(f'''mkdir {data_directory_name} git clone {GITHUB_REPO} cd gcsfuse - go run . --implicit-dirs --stat-cache-capacity 1000000 --max-conns-per-host 100 --stackdriver-export-interval=60s {gcs_bucket} ../{data_directory_name} + CGO_ENABLED=0 go run . --implicit-dirs --stat-cache-capacity 1000000 --max-conns-per-host 100 --stackdriver-export-interval=60s {gcs_bucket} ../{data_directory_name} cd .. ''') diff --git a/perfmetrics/scripts/ml_tests/setup.sh b/perfmetrics/scripts/ml_tests/setup.sh index f0990cdd63..0f0987f6ee 100644 --- a/perfmetrics/scripts/ml_tests/setup.sh +++ b/perfmetrics/scripts/ml_tests/setup.sh @@ -4,7 +4,7 @@ # >> source setup.sh # Go version to be installed. -GO_VERSION=go1.20.4.linux-amd64.tar.gz +GO_VERSION=go1.20.5.linux-amd64.tar.gz # This function will install the given module/dependency if it's not alredy # installed. diff --git a/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh b/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh index 1d6ec891cc..f6299d6b61 100644 --- a/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh +++ b/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh @@ -5,14 +5,14 @@ # and epochs functionality, and runs the model # Install go lang -wget -O go_tar.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz +wget -O go_tar.tar.gz https://go.dev/dl/go1.20.5.linux-amd64.tar.gz sudo rm -rf /usr/local/go && tar -xzf go_tar.tar.gz && sudo mv go /usr/local export PATH=$PATH:/usr/local/go/bin # Clone the repo and build gcsfuse git clone "https://github.com/GoogleCloudPlatform/gcsfuse.git" cd gcsfuse -go build . +CGO_ENABLED=0 go build . cd - # Mount the bucket and run in background so that docker doesn't keep running after resnet_runner.py fails diff --git a/perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh b/perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh index 49072ef6ef..9720b1b434 100644 --- a/perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh +++ b/perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh @@ -22,8 +22,8 @@ pip install google-cloud pip install google-cloud-vision pip install google-api-python-client pip install prettytable -echo Installing go-lang 1.20.4 -wget -O go_tar.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz +echo Installing go-lang 1.20.5 +wget -O go_tar.tar.gz https://go.dev/dl/go1.20.5.linux-amd64.tar.gz sudo rm -rf /usr/local/go && tar -xzf go_tar.tar.gz && sudo mv go /usr/local export PATH=$PATH:/usr/local/go/bin echo Installing fio @@ -38,7 +38,7 @@ GCSFUSE_FLAGS="--implicit-dirs --max-conns-per-host 100" BUCKET_NAME=presubmit-perf-tests MOUNT_POINT=gcs # The VM will itself exit if the gcsfuse mount fails. -go run . $GCSFUSE_FLAGS $BUCKET_NAME $MOUNT_POINT +CGO_ENABLED=0 go run . $GCSFUSE_FLAGS $BUCKET_NAME $MOUNT_POINT touch result.txt # Running FIO test chmod +x perfmetrics/scripts/presubmit/run_load_test_on_presubmit.sh @@ -53,13 +53,13 @@ echo checkout PR branch git checkout pr/$KOKORO_GITHUB_PULL_REQUEST_NUMBER # Executing integration tests -GODEBUG=asyncpreemptoff=1 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=gcsfuse-integration-test +GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=gcsfuse-integration-test # Executing perf tests echo Mounting gcs bucket from pr branch mkdir -p gcs # The VM will itself exit if the gcsfuse mount fails. -go run . $GCSFUSE_FLAGS $BUCKET_NAME $MOUNT_POINT +CGO_ENABLED=0 go run . $GCSFUSE_FLAGS $BUCKET_NAME $MOUNT_POINT # Running FIO test chmod +x perfmetrics/scripts/presubmit/run_load_test_on_presubmit.sh ./perfmetrics/scripts/presubmit/run_load_test_on_presubmit.sh diff --git a/tools/build_gcsfuse/main.go b/tools/build_gcsfuse/main.go index bb52ea1191..b1a4022481 100644 --- a/tools/build_gcsfuse/main.go +++ b/tools/build_gcsfuse/main.go @@ -158,6 +158,7 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro fmt.Sprintf("GOROOT=%s", runtime.GOROOT()), fmt.Sprintf("GOPATH=%s", gopath), fmt.Sprintf("GOCACHE=%s", gocache), + "CGO_ENABLED=0", } // Build. diff --git a/tools/cd_scripts/e2e_test.sh b/tools/cd_scripts/e2e_test.sh index c9ff6cb244..18184c7dc0 100644 --- a/tools/cd_scripts/e2e_test.sh +++ b/tools/cd_scripts/e2e_test.sh @@ -108,7 +108,7 @@ git checkout $(sed -n 2p ~/details.txt) |& tee -a ~/logs.txt #run tests with testbucket flag set +e -GODEBUG=asyncpreemptoff=1 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=$(sed -n 3p ~/details.txt) --testInstalledPackage --timeout=60m &>> ~/logs.txt +GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/... -p 1 --integrationTest -v --testbucket=$(sed -n 3p ~/details.txt) --testInstalledPackage --timeout=60m &>> ~/logs.txt if [ $? -ne 0 ]; then diff --git a/tools/containerize_gcsfuse_docker/Dockerfile b/tools/containerize_gcsfuse_docker/Dockerfile index a36d394c97..b638978d4b 100644 --- a/tools/containerize_gcsfuse_docker/Dockerfile +++ b/tools/containerize_gcsfuse_docker/Dockerfile @@ -34,7 +34,7 @@ ARG OS_VERSION ARG OS_NAME # Image with gcsfuse installed and its package (.deb) -FROM golang:1.20.4 as gcsfuse-package +FROM golang:1.20.5 as gcsfuse-package RUN apt-get update -qq && apt-get install -y ruby ruby-dev rubygems build-essential rpm fuse && gem install --no-document bundler diff --git a/tools/integration_tests/run_tests_mounted_directory.sh b/tools/integration_tests/run_tests_mounted_directory.sh index 9e07509562..5cabf79eee 100644 --- a/tools/integration_tests/run_tests_mounted_directory.sh +++ b/tools/integration_tests/run_tests_mounted_directory.sh @@ -21,6 +21,7 @@ TEST_BUCKET_NAME=$1 MOUNT_DIR=$2 +export CGO_ENABLED=0 # Run integration tests for operations directory with static mounting gcsfuse --enable-storage-client-library=true --implicit-dirs=true $TEST_BUCKET_NAME $MOUNT_DIR diff --git a/tools/package_gcsfuse_docker/Dockerfile b/tools/package_gcsfuse_docker/Dockerfile index 48abaaa077..623984b49a 100644 --- a/tools/package_gcsfuse_docker/Dockerfile +++ b/tools/package_gcsfuse_docker/Dockerfile @@ -17,7 +17,7 @@ # Copy the gcsfuse packages to the host: # > docker run -it -v /tmp:/output gcsfuse-release cp -r /packages /output -FROM golang:1.20.4 as builder +FROM golang:1.20.5 as builder RUN apt-get update -qq && apt-get install -y ruby ruby-dev rubygems build-essential rpm && gem install --no-document bundler