Skip to content

Commit

Permalink
Fixes for run on gce vm
Browse files Browse the repository at this point in the history
Don't create package bucket with google in name
ignore FileNotFoundError for mash not installed
  • Loading branch information
gargnitingoogle committed Aug 21, 2024
1 parent d30bc7f commit 20e38a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions perfmetrics/scripts/testing_on_gke/examples/run-gke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ test -z "${gcsfuse_mount_options}" || (echo "gcsfuse_mount_options set by user i
# Test runtime configuration
test -n "${pod_wait_time_in_seconds}" || export pod_wait_time_in_seconds="${DEFAULT_POD_WAIT_TIME_IN_SECONDS}"
test -n "${instance_id}" || export instance_id="${DEFAULT_INSTANCE_ID}"

if test -n "${workload_config}"; then
workload_config="$(realpath "${workload_config}")"
test -f "${workload_config}"
Expand Down Expand Up @@ -183,7 +184,7 @@ function installDependencies() {
which python3
# Ensure that make is installed.
which make || (sudo apt-get update && sudo apt-get install -y make time)
# Ensure that go is installed
# Ensure that go is installed.
which go || (version=1.22.4 && wget -O go_tar.tar.gz https://go.dev/dl/go${version}.linux-amd64.tar.gz 1>/dev/null && sudo rm -rf /usr/local/go && tar -xzf go_tar.tar.gz 1>/dev/null && sudo mv go /usr/local && echo $PATH && export PATH=$PATH:/usr/local/go/bin && echo $PATH && echo 'export PATH=$PATH:/usr/local/go/bin'>>~/.bashrc && go version)
# for some reason, the above is unable to update the value of $PATH, so doing it explicitly below.
export PATH=$PATH:/usr/local/go/bin
Expand Down Expand Up @@ -413,7 +414,7 @@ function createCustomCsiDriverIfNeeded() {
echo "Building custom CSI driver ..."

# Create a bucket for storing custom-csi driver.
test -n "${package_bucket}" || export package_bucket=${USER}-gcsfuse-binary-package
test -n "${package_bucket}" || export package_bucket=${USER/google/}-gcsfuse-binary-package
(gcloud storage buckets list | grep -wqo ${package_bucket}) || (region=$(echo ${zone} | rev | cut -d- -f2- | rev) && gcloud storage buckets create gs://${package_bucket} --location=${region})

# Build a new gcsfuse binary
Expand Down
2 changes: 2 additions & 0 deletions perfmetrics/scripts/testing_on_gke/examples/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def is_mash_installed() -> bool:
return True
except subprocess.CalledProcessError:
return False
except FileNotFoundError:
return False


def get_memory(
Expand Down

0 comments on commit 20e38a7

Please sign in to comment.