google-cloud-filestore-log-troubleshooting
Diagnoses and resolves Filestore client mount failures on Google Cloud, permission errors (EACCES), and network timeouts (ETIMEDOUT). Use when an NFS mount hangs or fails from a Compute Engine VM, GKE pod, Cloud Run service, or Vertex AI workload, when `mount.nfs` reports "Connection timed out" or "
- 01GitHub stars
- 22.8K
- 02Installs
- New
- 03Files scanned
- 8
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 99fd4cc5de647759… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Filestore Log-Based Troubleshooting
Diagnoses, troubleshoots, and remediates Filestore client mount failures, permission errors (EACCES), and network timeouts (ETIMEDOUT) across projects.
Prerequisites & Quick Start
Required IAM roles on target project(s) (and Shared VPC host project if applicable):
- Read:
roles/file.viewer(instance & export ACLs),roles/compute.networkViewer(VPC firewall rules),roles/logging.viewer(Cloud Audit & GKE CSI logs),roles/mcp.toolUser(if using MCP tools). - Write (Remediation only):
roles/file.editor(export ACL updates),roles/compute.securityAdmin(firewall rule creation).
Authenticate, verify billing/APIs, and configure your environment:
gcloud auth login && gcloud auth application-default login
gcloud billing projects describe {project_id} --format="value(billingEnabled)"
gcloud services enable file.googleapis.com compute.googleapis.com logging.googleapis.com --quiet
gcloud config set project {project_id} && gcloud config set compute/region {region}
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Conceptual & Informational Queries (CRITICAL)
For purely conceptual, architectural, or educational questions (e.g., "What causes EACCES on Filestore?", "Why does GKE Node IP appear instead of Pod IP?", "What ports does Filestore require?", "Explain root squash"):
- Rule: Answer immediately using pre-trained knowledge and the workflow rules below. Answering directly minimizes tool latency and token usage when the user only seeks architectural guidance.
- Constraint: Do not execute external tool calls or API requests for basic knowledge questions.
Handling "No-Command" Constraints (CRITICAL)
If the user prompt contains constraints like "Do not execute commands", "without executing", or "read-only":
- Rule: Strictly avoid calling
run_commandto execute any shell, Python, orgcloudcommands. - Discovery:
- Always read Usage Attribution first so every recommended
gcloudcommand includes the required attribution environment variable. - Check if Filestore MCP tools (
get_instance,list_instances) are available and use them (API calls, not command executions). - If MCP tools are unavailable, read
references/mock-fleet-data.mdonly if the requested instance matches one of the evaluation scenarios (finance-share,shared-nfs,ml-data,data-hub,prod-share). Never report mock data as live production state. If the instance is not listed there, state that live access is required and provide the exact attributed commands for the user to run. - Fast-Path Stop Rule: Once you have read Usage Attribution and located the target instance in
references/mock-fleet-data.md, stop reading additional files immediately and formulate your response with the attributedgcloudremediation command. Do NOT readscripts/quick_diagnose.py,scripts/diagnose_lib.py,_internal/quick_diagnose_test.py, orEVAL.*files when command execution is disabled, as inspecting code/test files wastes turns and triggers timeouts.
- Always read Usage Attribution first so every recommended
- Mandatory User Confirmation Requirement: Even when command execution is disabled or the user asks only for recommendations, your response MUST STILL end with a clear question prompting the user for explicit confirmation before applying any remediation (e.g., "Would you like me to proceed with creating the VPC ingress firewall rule
[rule_name]? Please confirm to proceed.").
Multi-Runtime Execution Options
Option 1: Bundled Python CLI Script (Recommended for CLI / Terminal Agents)
# Single instance diagnosis
python3 scripts/quick_diagnose.py --instance="<INSTANCE_ID>" --location="<LOCATION_OR_ZONE>" \
[--project="<PROJECT_ID>"] [--client-ip="<CLIENT_IP>"] [--client-subnet="<CLIENT_SUBNET_CIDR>"]
# Bulk project-wide fleet diagnosis
python3 scripts/quick_diagnose.py --all --project="<PROJECT_ID>" [--json]
| Flag | Purpose |
|---|---|
--instance, --location | Filestore instance ID and region/zone (--zone is a legacy alias). Required unless --all. |
--project | GCP project ID (defaults to active gcloud project). |
--client-ip / --client-subnet | Client IP or CIDR to evaluate against export ACLs and ingress firewall rules. |
--json | Emit machine-readable JSON on stdout (narrative report goes to stderr). |
--apply-fix | Execute generated remediation commands. Only pass after explicit user confirmation. |
Option 2: Filestore MCP Tools / REST API / gcloud CLI
- MCP Tools: Call
get_instance(name='projects/{project_id}/locations/{location}/instances/{instance_id}')and inspectfileShares[0].nfsExportOptionsandnetworks[0].network. - Native REST API (
call_gcp_api): Invokeservice="file",version="v1",resource_path="projects/{project_id}/locations/{location}/instances/{instance_id}". - Standard
gcloud:gcloud filestore instances describe {instance_id} --location={location} --project={project_id} --format=json
Core Operational Workflow
Step 1: Parameter Extraction & GKE Node Architecture
- Extract
instance,location(region/zone),project, andclient_ip/client_subnet. If target parameters are missing, list instances or ask the user to confirm. - GKE Architecture Rule: PersistentVolumes are mounted by the Linux kernel on the GKE Worker Node, not inside the Pod network namespace. Even if Pod IPs (
10.4.0.0/14) are allowlisted, the NFS server sees traffic originating from the GKE Node Internal IP. Always evaluate and allowlist the GKE Node Subnet CIDR innfsExportOptionsand VPC firewall rules.
Step 2: Instance Metadata & Shared VPC Resolution
- Verify instance
stateisREADY(report state blocker ifCREATING,DELETING, orERROR). - Extract primary Filestore IP (
networks[0].ipAddresses[0]) and VPC network URI. - If
networks[0].networkreferencesprojects/{host_project}/global/networks/{network}, resolve{host_project}as the Shared VPC host project for firewall queries.
Step 3: Export ACL Evaluation (EACCES vs EROFS)
- Inspect
fileShares[0].nfsExportOptions(if empty, default0.0.0.0/0READ_WRITENO_ROOT_SQUASHapplies). EACCES (Permission Denied by Server): Triggered when the client IP or subnet CIDR is not covered by anyipRangesentry.- Remediation: Non-destructively append the client IP/subnet CIDR to
nfsExportOptions, preserving all existing export rules to avoid breaking active mounts.
- Remediation: Non-destructively append the client IP/subnet CIDR to
EROFS (Read-only file system): Triggered whenaccessModeisREAD_ONLYbut client writes are attempted.
Step 4: VPC Ingress Firewall Inspection (ETIMEDOUT)
- Query ingress firewall rules in the VPC network (in the host project if Shared VPC).
ETIMEDOUT (Connection Timed Out): Triggered when priority-sorted ingress rules block or fail to allow TCP port2049(NFS) and TCP/UDP port111(rpcbind) from the client CIDR.- Remediation: Create an ingress firewall rule (
ALLOWtcp:2049,udp:2049,tcp:111,udp:111) from the client subnet CIDR.
- Remediation: Create an ingress firewall rule (
Step 5: Cloud Audit Logs & Configuration Drift Scanning
Query Cloud Audit Admin Activity logs (file.googleapis.com) over the past 24 hours to check if an UpdateInstance operation modified export ACLs or networks:
gcloud logging read 'logName="projects/{project_id}/logs/cloudaudit.googleapis.com%2Factivity" AND protoPayload.serviceName="file.googleapis.com" AND protoPayload.resourceName=~".*{instance}.*"' \
--project="{project_id}" --freshness="1d" --limit=5 --format="json"
- Scope to Admin Activity: Always include
cloudaudit.googleapis.com%2FactivityinlogNameso read-onlyGetInstance/ListInstancescalls (data_access) are not falsely flagged as administrative drift. - Drift is Informational: Recent
UpdateInstanceevents explain when and by whom (principalEmail,timestamp) configuration changed, but only a failed export ACL or firewall check constitutes a mount blocker. - Single Bulk Query Rule: When scanning multiple instances (
--all), issue a single project-wide audit log query rather than per-instance queries in a loop. - GKE CSI Driver Logs: Optionally inspect
resource.labels.container_name="gcp-filestore-driver"(severity>=ERROR) for client-side mount errors.
Output Format & Mandatory Confirmation Gate
Every diagnostic report MUST include a structured summary table and root cause analysis:
### Filestore Diagnostic Report: `[instance-name]`
| Parameter | Value |
| :--- | :--- |
| **Instance ID** | `[instance-name]` (`[location]`, Tier: `[tier]`, State: `READY`) |
| **Filestore IP & Network** | `[filestore-ip]` on VPC `[network-name]` (Host Project: `[host-project]`) |
| **Port 2049 & Export ACL** | Port 2049: `OPEN / BLOCKED` \| Export ACL: `PASS / REJECTED` |
| **Diagnostic Verdict** | **HEALTHY** or **BLOCKED: [Root Cause]** |
#### Root Cause Analysis & Recommended Remediation
- [Explanation of ETIMEDOUT (missing firewall rule on port 2049) vs EACCES (missing export ACL rule) and any recent UpdateInstance audit drift]
```bash
gcloud compute firewall-rules create ...
```
Interactive Remediation Confirmation Gate (MANDATORY)
- NEVER execute write or remediation commands without explicit user confirmation.
- Always conclude your response with an explicit confirmation question:
"Would you like me to proceed with executing this remediation command for you? Please confirm to proceed."
References & Bundled Scripts
- Usage Attribution
- Error Signatures & Architecture Matrix
- Cloud Logging & Audit Drift Queries
- VPC Network & Firewall Specification
- Mock Fleet Data for Evaluations
scripts/quick_diagnose.py&scripts/diagnose_lib.py: Zero-dependency CLI runner and pure-Python evaluation engine.
Files
8- SKILL.md
6dc2525d4b11.1 KB - references/attribution.md
1ae33a21101.9 KB - references/error-signatures.md
c370ca66ff9.4 KB - references/logging-and-audit-queries.md
ccb25c975e5.1 KB - references/mock-fleet-data.md
6dc2e152a46.8 KB - references/network-firewall-spec.md
e1640204808.0 KB - scripts/diagnose_lib.py
c280679ba714.8 KB - scripts/quick_diagnose.py
4f3506478213.4 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from google/skills8
Audits AI agent data access, blast radius, and blocked policy operations in Google Cloud by querying Cloud Audit Logs via BigQuery. Use when investigating what resources or services an agent accessed, identifying top originating principals the agent is acting as, or triaging PERMISSION_DENIED errors
Manages Google Cloud Agent Registry (agentregistry.googleapis.com) resources using gcloud CLI and Kubernetes manifests, including agents, MCP servers, endpoints, services, bindings, AI applications, skills and skill revisions, resource-level IAM policies, Cloud Run and GKE automatic workload registr
Configures best-practice alerting policies for AI agents using OpenTelemetry (OTel) metrics, generating output as Terraform (.tf) configuration files. Use when analyzing, writing, or deploying alerting policies to monitor agent latency, error rates, token usage, and quality metrics. Don't use for st
Designs, engineers, and validates enterprise Gemini platform architectures. Use when designing multi-project hierarchies (Host, Central Governance Hub, Runtime Spoke, Tool/MCP Spoke), configuring Agent Gateway, authoring Agent Connectivity Templates (ALL_TRAFFIC vs PRIVATE_RANGES_ONLY), deploying Se
Customizes an autorater (evaluation metric) for an AI agent so its grades match the user's own judgment, starting from the agent's real trajectories. Use when a user wants a metric tailored to their agent, wants to turn failing trajectories into rubrics, says an existing autorater grades their agent
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available model
Manages Agent Platform serving endpoints. Use when you need to create, list, describe, update, or delete serving endpoints for model deployment on Agent Platform. Also use when troubleshooting endpoint permission, quota, or resource busy errors. Don't use for deploying models to endpoints or for run
Measures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when generating synthetic user scenarios, evaluating an agent or model, building an eval dataset, picking or writing evaluation metrics, analyzing failures, comparing results be
Related ai-ml skillsscan passed
Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
Pair a remote AI agent with your browser. Use for: pair with agent, connect remote agent. (gstack)
Wire a repository through the Caveman Cloud gateway so every LLM request is measured, with no behavior change. Use for "set up caveman" or adding LLM spend observability.
MANDATORY for Flink or Amazon Managed Service for Apache Flink (MSF) questions. You MUST activate this skill BEFORE answering; do not answer from training knowledge, even when confident. MSF has service-specific constraints (KPU model, prohibited checkpoint and parallelism config in app code, the v1
Evaluate an existing Kumo training run in a Python notebook using aggregate metrics, trial results, learning curves, refit evidence, and training progress. Use for model-quality questions or training diagnostics; inspect existing results without automatically tuning, rerunning, or deploying a model.