use chroot/umount/pivotroot instead of jailing#2091
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3bce20caf8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
dobrac
left a comment
There was a problem hiding this comment.
Have you considered using library for at least some parts of the functionality?
(I suppose Kubernetes ecosystem could have pretty good ones)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Unused
nfs_mount_optionsvariable in persistent-volume-types module- Removed the unused
nfs_mount_optionsinput from the module call and deleted its unreferenced variable declaration from the module.
- Removed the unused
Or push these changes by commenting:
@cursor push dc2268a65b
Preview (dc2268a65b)
diff --git a/iac/provider-gcp/persistent-volume-types/variables.tf b/iac/provider-gcp/persistent-volume-types/variables.tf
--- a/iac/provider-gcp/persistent-volume-types/variables.tf
+++ b/iac/provider-gcp/persistent-volume-types/variables.tf
@@ -44,8 +44,3 @@
})
default = null
}
-
-variable "nfs_mount_options" {
- type = list(string)
- default = []
-}
diff --git a/iac/provider-gcp/persistent-volumes.tf b/iac/provider-gcp/persistent-volumes.tf
--- a/iac/provider-gcp/persistent-volumes.tf
+++ b/iac/provider-gcp/persistent-volumes.tf
@@ -9,7 +9,6 @@
location = each.value.location
network_name = var.network_name
nfs_version = each.value.nfs_version
- nfs_mount_options = each.value.mount_options
prefix = var.prefix
tier = each.value.tier
performance_config = each.value.performance_configThis Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


Tasks remaining:
Follow up tasks:
Note
Medium Risk
Introduces new mount-namespace +
pivot_rootchroot implementation and changes NFS mount behavior, which can break volume isolation/mount reliability or require elevated privileges in production. Also expands IaC/env configurability, increasing risk of misconfiguration at deploy time.Overview
Switches the orchestrator’s volume filesystem isolation to a new
internal/chrootedimplementation that uses a dedicated mount namespace plusmount/pivot_root/umount, and adds a small builder to derive per-team/per-volume paths fromPERSISTENT_VOLUME_MOUNTS. The orchestrator config now includes NFS proxy logging/tracing/level env vars (with custom parsing fornfs.LogLevel),envdnow waits for all NFS mounts to complete and uses more resilient mount options, and the Terraform/Nomad job wiring is extended to pass arbitrary extra env vars and to make GCP persistent volume types support custom NFS mount options and optional performance (IOPS) config; multiple Go modules also get dependency bumps and mockery generation is moved into the orchestrator package.Written by Cursor Bugbot for commit efdf97b. This will update automatically on new commits. Configure here.