Merged
Conversation
63d4a39 to
0015431
Compare
Collaborator
|
We have a failing check, is that failure related to this change? |
jardondiego
reviewed
Mar 23, 2026
jardondiego
reviewed
Mar 23, 2026
Collaborator
|
/gcbrun |
javanlacerda
approved these changes
Mar 24, 2026
Collaborator
javanlacerda
left a comment
There was a problem hiding this comment.
LGTM. I'm just afraid we would need to generate a new base image and update it for the clusterfuzz instances for applying this change, and it seems the pipeline for building the base images is broken.
You think running the swarming containers with IS_K8S_ENV=True would mitigate it for now?
Collaborator
Author
Sure we can work with that till the main issue is fixed |
IvanBM18
added a commit
that referenced
this pull request
Mar 24, 2026
## Overview Swarming, as well as K8S has issues when trying to mount this volume to the container. ```bash mount /mnt/scratch0 -o remount,exec,suid,dev ``` So we added a validation to not mount when we are either in K8S or in swarming. Note: Uses SWARMING_BOT env var as its the one we [already use in the swarming request](https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/swarming/__init__.py#L134) ## Tests performed I created a custom bash script to test this: ```bash is_truthy() { [[ "$1" =~ ^([Tt]rue|1)$ ]] } should_mount() { if is_truthy "$IS_K8S_ENV" || is_truthy "$SWARMING_BOT"; then return 1 fi return 0 } test_mount() { unset IS_K8S_ENV SWARMING_BOT [[ "$1" != "unset" ]] && export IS_K8S_ENV=$1 [[ "$2" != "unset" ]] && export SWARMING_BOT=$2 printf "IS_K8S_ENV=%-5s | SWARMING_BOT=%-5s =>" "$1" "$2" if should_mount; then echo " [MOUNT EXECUTED]"; else echo " [MOUNT SKIPPED]"; fi } ' ``` Against multiple inputs: ```bash echo "=== DRY RUN OUTPUT USING is_truthy() ===" test_mount "unset" "unset" test_mount "1" "unset" test_mount "true" "unset" test_mount "false" "unset" test_mount "False" "unset" test_mount "0" "unset" test_mount "unset" "True" test_mount "unset" "1" test_mount "unset" "false" test_mount "false" "false" ``` And got this results: ```bash === DRY RUN OUTPUT USING is_truthy() === IS_K8S_ENV=unset | SWARMING_BOT=unset => [MOUNT EXECUTED] IS_K8S_ENV=1 | SWARMING_BOT=unset => [MOUNT SKIPPED] IS_K8S_ENV=true | SWARMING_BOT=unset => [MOUNT SKIPPED] IS_K8S_ENV=false | SWARMING_BOT=unset => [MOUNT EXECUTED] IS_K8S_ENV=False | SWARMING_BOT=unset => [MOUNT EXECUTED] IS_K8S_ENV=0 | SWARMING_BOT=unset => [MOUNT EXECUTED] IS_K8S_ENV=unset | SWARMING_BOT=True => [MOUNT SKIPPED] IS_K8S_ENV=unset | SWARMING_BOT=1 => [MOUNT SKIPPED] IS_K8S_ENV=unset | SWARMING_BOT=false => [MOUNT EXECUTED] IS_K8S_ENV=false | SWARMING_BOT=false => [MOUNT EXECUTED] ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Swarming, as well as K8S has issues when trying to mount this volume to the container.
So we added a validation to not mount when we are either in K8S or in swarming.
Note: Uses SWARMING_BOT env var as its the one we already use in the swarming request
Tests performed
I created a custom bash script to test this:
Against multiple inputs:
And got this results: