Bind-mount Bazel's outputBase off Windows container's VHDX#53758
Open
rdesgroppes wants to merge 1 commit into
Open
Bind-mount Bazel's outputBase off Windows container's VHDX#53758rdesgroppes wants to merge 1 commit into
outputBase off Windows container's VHDX#53758rdesgroppes wants to merge 1 commit into
Conversation
### What does this PR do? Bind-mounts a per-job directory for Bazel's `--output_base` on Windows CI jobs, instead of leaving it on the container's own scratch disk. ### Motivation `--output_base` must stay container-scoped to avoid concurrent instances racing on the same server lock (bazelbuild/bazel#12591, etc.). That container-local path is the container's dynamically-expanding and differencing `sandbox.vhdx`, which has documented allocate-on-write and differencing overhead (https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/storage-io-performance) and no way to be made fixed-size. Writes there have also hit "not enough space on disk" in earlier `bazel:test:windows-amd64` job, well under the configured `--storage-opt` quota, on hosts otherwise showing hundreds of GB free. `$CI_PROJECT_DIR` is already real disk, unique per concurrency slot, and swept at job startup, so no separate uniqueness scheme or cleanup of our own is needed. ### Describe how you validated your changes Ran the real `bazel:test:windows-amd64` job with this bind mount in place, where `bazel` wrote hundreds of MB to tens of GB into `C:\bob` across several runs with no permission or disk errors, so no additional ACL handling was needed on top of the existing disk-cache ACL fix. ### Additional Notes About [There is not enough space on the disk](https://app.datadoghq.com/logs?query=service%3Agitlab-ci%20%40ci.pipeline.name%3A%22DataDog%2Fdatadog-agent%22%20%22not%20enough%22&agg_m=count&agg_m_source=base&agg_t=count&clustering_pattern_field_path=message&cols=host%2Cservice%2Cci.node.name&index=ci-app-pipeline-logs-gitlab-datadog-agent&messageDisplay=inline&refresh_mode=sliding&storage=hot&stream_sort=time%2Cdesc&viz=stream&from_ts=1782924925026&to_ts=1784220925026&live=true): - I confirm that that `--storage-opt "size=100GB"` genuinely sets the _virtual_ size of the VHDX (via `docker inspect`, `diskpart detail vdisk`, and in-container `DriveInfo`/`fsutil`), ruling out a silently-capped quota, - my broader diagnostic investigation also ruled out host disk saturation, concurrent containers sharing a host, Hyper-V isolation, NTFS quotas, and instance-store volumes,. The present change is therefore to be considered as a reliability improvement regardless of which mechanism was responsible.
rdesgroppes
marked this pull request as ready for review
July 16, 2026 17:13
Contributor
Files inventory check summaryFile checks results against ancestor 3b3183fd: Results for datadog-agent_7.83.0~devel.git.163.436df56.pipeline.125077402-1_amd64.deb:No change detected |
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.
What does this PR do?
Bind-mounts a per-job directory for Bazel's
--output_baseon Windows CI jobs, instead of leaving it on the container's own scratch disk.Motivation
As settled in #51154,
--output_basemust stay container-scoped to avoid concurrent instances racing on the same server lock (bazelbuild/bazel#12591, etc.).That container-local path is the container's dynamically-expanding and differencing
sandbox.vhdx, which has documented allocate-on-write and differencing overhead and no way to be made fixed-size.Writes there have also hit "not enough space on disk" in earlier
bazel:test:windows-amd64job, well under the configured--storage-optquota, on hosts otherwise showing hundreds of GB free.$CI_PROJECT_DIRis already real disk, unique per concurrency slot, and swept at job startup, so no separate uniqueness scheme or cleanup of our own is needed.Describe how you validated your changes
Ran the real
bazel:test:windows-amd64job with this bind mount in place, wherebazelwrote hundreds of MB to tens of GB intoC:\bobacross several runs with no permission or disk errors, so no additional ACL handling was needed on top of the existing disk-cache ACL fix.Additional Notes
About
There is not enough space on the disk:--storage-opt "size=100GB"genuinely sets the virtual size of the VHDX (viadocker inspect,diskpart detail vdisk, and in-containerDriveInfo/fsutil), ruling out a silently-capped quota,The present change is therefore to be considered as a reliability improvement regardless of which mechanism was responsible.