No files visible after mounting on Google Cloud Run #1244
-
I'm following the tutorial here: https://cloud.google.com/run/docs/tutorials/network-filesystems-fuse I deployed my docker image to cloud run, and I can see in the logs that the filesystem is mounted successfully, but when I Here is my
I confirmed that my service account has access to the buckets (uniform access). #!/usr/bin/env bash
# Copyright 2021 Google LLC
#
# 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.
# [START cloudrun_fuse_script]
#!/usr/bin/env bash
set -eo pipefail
# Create mount directory for service
mkdir -p $MNT_DIR_REPO
mkdir -p $MNT_DIR_ARTIFACTS
echo "Mounting GCS Fuse."
gcsfuse --debug_gcs --debug_fuse $BUCKET_REPO $MNT_DIR_REPO
echo "Mounting completed."
echo "Mounting GCS Fuse."
gcsfuse --debug_gcs --debug_fuse $BUCKET_ARTIFACTS $MNT_DIR_ARTIFACTS
echo "Mounting completed."
echo "Enumerating directories."
ls -l $MNT_DIR_REPO
ls -l $MNT_DIR_ARTIFACTS
# Run the web service on container startup. Here we use the gunicorn
# webserver, with one worker process and 8 threads.
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available.
# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
exec dotnet Server.dll --urls http://0.0.0.0:80 &
# Exit immediately when one of the background processes terminate.
wait -n
# [END cloudrun_fuse_script] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @TrieBr, We've seen this behaviour commonly occur when Incase implicit-dir flag doesn't work, can you try debugging with the Also, just wanted to confirm that you're using Thanks, |
Beta Was this translation helpful? Give feedback.
Hi @TrieBr,
We've seen this behaviour commonly occur when
--implicit-dir
flag is not used in the mount command. Please check the documentation here and evaluate if you need to add this flag.Incase implicit-dir flag doesn't work, can you try debugging with the
foreground
flag as mentioned here. Please share the logs to help us debug the issue.Also, just wanted to confirm that you're using
--execution-environment gen2
flag withgcloud run deploy
command?Thanks,
Ashmeen